HI,
I have created a file and removed all users and groups from the Security tab (file properties).
In the Advanced window in the Security tab, I also removed the check box for "Inherit from parent the permission..."
When I try to open the file from the Explorer I get a "Access is denied" error message.
But when I try to check this file for READ permissions using the _access() function I get return code "0" which means that the file has reading permission.
I get the same result if I check WRITE permission.
I got the function to work as expected only when I checked existence of file.
The line of code is: _access("c:\filename", 4).
- Do you know of problems with XP when using _access()?
- Maybe the function is OK but I didn't remove the READ permission correctly?
I have created a file and removed all users and groups from the Security tab (file properties).
In the Advanced window in the Security tab, I also removed the check box for "Inherit from parent the permission..."
When I try to open the file from the Explorer I get a "Access is denied" error message.
But when I try to check this file for READ permissions using the _access() function I get return code "0" which means that the file has reading permission.
I get the same result if I check WRITE permission.
I got the function to work as expected only when I checked existence of file.
The line of code is: _access("c:\filename", 4).
- Do you know of problems with XP when using _access()?
- Maybe the function is OK but I didn't remove the READ permission correctly?