Windows API to get folder security

  • Thread starter Thread starter Nautilus
  • Start date Start date
N

Nautilus

How can i use windows API in VB.Net to get the windows security on
folders? I am trying to show the folder to the user (in an ASP.Net
app) only if they have access to it.. thanks
 
Thanks Mattias,
I could nto find the GetFileSecurity function in .Net framework.. is
it from Windows class?
I am also having problems refrencing the windows APIs in the project.
Could you please give brief steps about which DLLs I need to
reference? DO I have to use DllImport?
 
I could nto find the GetFileSecurity function in .Net framework.. is
it from Windows class?

It's not in the framework, it's a Win32 API function. I don't think
the framework has any support for this. The function is documented at

http://msdn.microsoft.com/library/en-us/security/security/getfilesecurity.asp

Could you please give brief steps about which DLLs I need to
reference? DO I have to use DllImport?

Yes, or the VB.NET Declare statement. GetFileSecurity is implemented
in Advapi32.dll.



Mattias
 
Back
Top