Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy
geteffectiverightsfromacl (advapi32)
 
.
Summary
TODO - a short description

C# Signature:

[DllImport("advapi32.dll", SetLastError=true)]
static extern uint GetEffectiveRightsFromAcl(IntPtr pDacl, ref TRUSTEE pTrustee, ref int pAccessRights);

VB Signature:

     Private Declare Auto Function GetEffectiveRightsFromAcl Lib "advapi32.dll" ( _
    ByVal pacl As IntPtr, _
    ByVal pTrustee As IntPtr, _
    ByRef pAccessRights As Integer _
    ) As Integer

User-Defined Types:

TRUSTEE

Notes:

    'DWORD GetEffectiveRightsFromAcl(
    '  PACL pacl,
    '  PTRUSTEE pTrustee,
    '  PACCESS_MASK pAccessRights
    ');

Tips & Tricks:

Please add some!

VB.Net Sample Code:

    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!

Documentation

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).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions