Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than advapi32, prefix the name with the module name and a period.
Private Declare Auto Function GetEffectiveRightsFromAcl Lib "advapi32.dll" ( _
ByVal pacl As IntPtr, _
ByVal pTrustee As IntPtr, _
ByRef pAccessRights As Integer _
) As Integer
Dim pDACL, pSD As IntPtr
Dim Mask, ret As Integer
Dim Win32Error As Win32Exception
' Get the DACL from the file
ret = GetNamedSecurityInfo(_Path, SE_OBJECT_TYPE.SE_FILE_OBJECT, SECURITY_INFORMATION.DACL_SECURITY_INFORMATION, Nothing, Nothing, pDACL, Nothing, pSD)
If ret <> 0 Then
Win32Error = New Win32Exception(ret)
Throw New Exception(Win32Error.Message)
End If
' Get the Access Mask using the supplied user account
ret = GetEffectiveRightsFromAcl(pDACL, pTrustee, Mask)
If ret <> 0 Then
Win32Error = New Win32Exception(ret)
Throw New Exception(Win32Error.Message)
End If
Marshal.FreeHGlobal(pSD)
Alternative Managed API:
Do you know one? Please contribute it!
Identifies the user account, group account, or logon session to which an ACE applies
4/1/2014 11:16:42 PM - -202.32.254.242
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).