Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving File/Dir Permissions 1

Status
Not open for further replies.

peterpruimboom

Programmer
Apr 28, 2002
20
NL
I'm looking for a way to retrieve the permissions on a file or directory on Windows 2000. I know it must be possible because I'm using cacls.exe now to retrieve the permissions. But I woul'd prefer a programmatic solution to do this. Is there anyone who knows of an API or what so ever?

Thanks in advance,

Peter.
 
Can't see that link JavaJoe posted (firewall!), but if it doesn't mention it, have a look at the GetAttr() function

mmilan
 
mmilan, is one web site you should really get unblocked, excellent resource. I beleive the GetAttr function is going to only tell you if the file is readonly, a system file, Hidden file, etc. but not permissions.

"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
 
Alas DrJavaJoe, I deal in version 6 and not dotnet.

The allapi link however WILL be getting a closer look.

mmilan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top