PDA

You are currently viewing a search engine-friendly (archive) version of this page.

View Full Version : how to protect folders(directories) using visual C++?


anish
November 10, 2001, 02:57 am
How can i develop an application to protect or control access to a directory..ie, after setting

the protection to a particular directory using the application, nobody should be able to access

it (double clicking the directory on the "windows explorer" should display the message "no

access" to the user), add files to it (copy) or delete it? Please tell me, which commands in

VC++ can be used to perform this?Commands like SetNamedSecurityInfo,SetFileSecurity

will work only under Windows NT..but, i'm working in Windows 98..Please help me..

Tonker
November 15, 2001, 09:50 am
Hi Anish, welcome to HFT! :)

I'm not sure that what you're trying to do is possible with anything other than an NT based system. NT has a better security model which allows you to assign priviliges based on a user ID or group association. Dos based systems don't have that security. The best you can do, I think, is to set read only permissions to the file or folder.

Anyone else know anything about this?