Jump to content
  • Advertisement
Sign in to follow this  
ratha

Setting Access Control to a File

This topic is 2759 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi!
How to set Full Control & Write Unlock to a file from C++/CLI? The reason why I want this is:
I'm creating a log in form. While clicking a button, I'm writing the log in information to a file(to implement "Remember Me" functionality). While creating installer for this application, this works fine under Win XP. But did not work with Windows 7. There I've to manually set Full Control to the file. Users of my app won't like this. I used the following code to set Access control:


path = L"RememberMe.ini";
System::IO::File::SetAccessControl(path,System::Security::AccessControl::FileSecurity::WriteUnlock());


But this results in the following error:

error C3767: 'System::Security::AccessControl::ObjectSecurity::WriteUnlock': candidate function(s) not accessible

How to set access control from C++/CLI? or Can any one suggest an alternative solution to my problem?<br>I'm using Visual Studio 2008 Deployment Project to write setup file.<br>

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!