@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: TODO - a short description !!!!C# Signature: [DllImport("advapi32.dll", SetLastError=true)] static extern TODO GetExplicitEntriesFromAcl(TODO); !!!!VB Signature: Declare Auto Function GetExplicitEntriesFromAcl Lib "AdvAPI32.DLL" ( _ ByVal pacl As IntPtr, _ ByRef pcCountOfExplicitEntries As Integer, _ ByRef pListOfExplicitEntries As IntPtr _ ) As Integer !!!!User-Defined Types: None. !!!!Notes: 'DWORD GetExplicitEntriesFromAcl( ' PACL pacl, ' PULONG pcCountOfExplicitEntries, ' PEXPLICIT_ACCESS* pListOfExplicitEntries '); !!!!Tips & Tricks: Please add some! !!!!VB.Net Sample Code: Dim pSecDesc, pDACL, ACE_ptr, iPtr, StringPtr As IntPtr Dim i, num, Ptr_num As Integer Dim SidString, NameBuf As String ' get the Security Descriptor and DACL If GetNamedSecurityInfo(Path, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, Nothing, Nothing, pDACL, Nothing, pSecDesc) <> 0 Then Exit Sub End If ' Get an array of ACEs If GetExplicitEntriesFromAcl(pDACL, num, ACE_ptr) <> 0 Then Exit Sub End If Marshal.FreeHGlobal(ACE_ptr) Marshal.FreeHGlobal(pSecDesc) !!!!Alternative Managed API: If you have .NET v2.0: For Files System.Security.AccessControl.FileSecurity For Registry Keys System.Security.AccessControl.RegistrySecurity For Directories System.Security.AccessControl.DirectorySecurity Sample Code { System.Security.AccessControl.FileSecurity secDesc = new System.Security.AccessControl.FileSecurity(Path, System.Security.AccessControl.AccessControlSections.Access); System.Security.AccessControl.AuthorizationRuleCollection aceCollection = pSecDesc.GetAccessRules(true, false, typeof(System.Security.Principal.NTAccount)); } Documentation: GetExplicitEntriesFromAcl@msdn on MSDN
Edit advapi32.GetExpli...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.