okay, so I\'m a bit of a C newbie. How does one test whether a file is read only on windows.
I tried to get something working with the GetFileAttributes function, but to
GetFileAttributes is the correct Windows call - see MSDN example for use
The example tests read only and the test is check dwAttrs & FILE_ATTRIBUTE_READONLY
and that will be non zero if the file is read only.
You are forgetting about the ACL. A file can have it's read-only bit clear but still have a restrictive ACL. You can call CreateFile and check the return code. Or call `AuthzAccessCheck'.