I'm developing a C-program with VS2005 and I found out that when folder access is restricted in a way that I can't create folders or delete anything from a folder the _stat function for the folder does not set errno correctly. errno is set to value ENOENT. I absolutely cannot modify the permissions so I could get value EACCES. Either _stat returns 0 (no error) or the errno is set to ENOENT. Can u tell me how to make distinction between folder really existing and user not having enough permissions for folder? Another thing i don't uderstand is that what particular permission results _stat to return -1. When I look at the Effective permissions of the folder I've been testing _stat with it has nothing in 'Deny'-column. Even 'Create folders / Append data' is checked while i cannot create folders into it.
Thanks & BR -Matti