• Advertisement
Sign in to follow this  

Setting Access Control to a File

This topic is 2572 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

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";

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
Sign in to follow this  

  • Advertisement