10-24-2014 04:10 PM
I have an application in Labwindows that when a user clicks on a button, 'Save data', the button launches a file selection dialog box. For security reasons I want to disable the user from right clicking any where on the 'file selection dialog box' and being able to delete/rename existing files and/or create/delete existing folders/directories.
This can be done in windows with keyboard hook but thought there might be something easier in Labwindows. I have already tried setting the allowMakeDirectory attribute to 0 but this did nothing and the 'FileSelectPopupEx' function does not have an 'allowMakeDirectory' attribute to set.
I'm developing on windows7 and running the app on Vista.
Any suggestions would be appreciated.
Thanks
10-25-2014 01:26 PM
Additonaly note: Is there anyway to trap mouse clicks/events once a call to 'FileSelectPopup' has been launched? If I could trap the right mouse click and/or key events I might be able to accomplish what I need.
10-26-2014 02:12 PM
I don't think it's possible to customize FileSelectPopup function: as far as I remember, it is calling some OS API function and its behaviour is not under CVI control.
As an alternative, you may try looking at the FileBrowser instrument offered by CVI: it's located in <cvidir>\toolslib\cutsctrl folder. The instrument permits to navigate into local resources and select files, but does not include the ability to create files and folders, unless you explicitly add an item to its context menu.
10-27-2014 02:50 PM
Is there anyway to set user access/rights overall on the application dependent if the user is admin/user/guest?
Thanks
10-28-2014 07:55 PM
Hi atomic928,
I don't know of a CVI-specific way of doing this, but I would suggest looking into the Windows API for functions that return system information. The GetUserName function from Advapi32.dll might be a good place to start.
-Myriam
10-29-2014 02:42 AM
Is this question somewhat related to the original one? 'Cause I cannot succeed in finding a connection...
10-29-2014 09:57 AM