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
Download Visual Studio Add-In

Search Results for "TRUSTEE" in [All]

advapi32

.
Summary
The BuildExplicitAccessWithName function initializes an EXPLICIT_ACCESS structure with data specified by the caller. The trustee is identified by a name string
.

    string pTrusteeName,

.

    ByVal pTrusteeName As String, _

.

private static extern void BuildTrusteeWithSid(ref TRUSTEE pTrustee, IntPtr sid);

.

    Private Declare Auto Sub BuildTrusteeWithSid Lib "advapi32.dll" ( _

.

    ByVal pTrustee As IntPtr, _

.

TRUSTEE

.

        Dim t As TRUSTEE

.

        ' Build a trustee

.

        pTrustee = Marshal.AllocHGlobal(Marshal.SizeOf(t))

.

        BuildTrusteeWithSid(pTrustee, pSID)

.
Documentation
[BuildTrusteeWithSid] on MSDN
.

        Ace["Trustee"] = Win32_Trustee(Account);

.

    private static ManagementObject Win32_Trustee(string Account)

.

        ManagementObject Trustee = new System.Management.ManagementClass("Win32_Trustee").CreateInstance();

.

        Trustee["SID"] = SID;

.

        return Trustee;

.

static extern uint GetEffectiveRightsFromAcl(IntPtr pDacl, ref TRUSTEE pTrustee, ref int pAccessRights);

.

    ByVal pTrustee As IntPtr, _

.

TRUSTEE

.

    '  PTRUSTEE pTrustee,

.

    ret = GetEffectiveRightsFromAcl(pDACL, pTrustee, Mask)

.

    Dim Trustee As Trustee

Enums

.

    ///The client who called IAccessControl::IsAccessPermitted was not the trustee provided to the method

.

    [Description("The client who called IAccessControl::IsAccessPermitted was not the trustee provided to the method")]

.

    public const int CO_E_TRUSTEEDOESNTMATCHCLIENT = unchecked((int)0x80010127);

.

    ///One of the trustee strings provided by the user did not conform to the &lt;Domain>\<Name> syntax and it was not the "*" string

.

    [Description("One of the trustee strings provided by the user did not conform to the <Domain>\\<Name> syntax and it was not the \"*\" string")]

.

    public const int CO_E_WRONGTRUSTEENAMESYNTAX = unchecked((int)0x8001012C);

.

    ///Unable to convert a wide character trustee string to a multibyte trustee string

.

    [Description("Unable to convert a wide character trustee string to a multibyte trustee string")]

.

    ///Unable to find a security identifier that corresponds to a trustee string provided by the user

.

    [Description("Unable to find a security identifier that corresponds to a trustee string provided by the user")]

.

    ///Unable to find a trustee name that corresponds to a security identifier provided by the user

.

    [Description("Unable to find a trustee name that corresponds to a security identifier provided by the user")]

.

    '''The client who called IAccessControl::IsAccessPermitted was not the trustee provided to the method

.

    <Description("The client who called IAccessControl::IsAccessPermitted was not the trustee provided to the method")> _

.

    Public Const CO_E_TRUSTEEDOESNTMATCHCLIENT As Integer = CInt(&H80010127UI)

.

    '''One of the trustee strings provided by the user did not conform to the &lt;Domain>\<Name> syntax and it was not the "*" string

.

    <Description("One of the trustee strings provided by the user did not conform to the <Domain>\<Name> syntax and it was not the ""*"" string")> _

.

    Public Const CO_E_WRONGTRUSTEENAMESYNTAX As Integer = CInt(&H8001012cUI)

.

    '''Unable to convert a wide character trustee string to a multibyte trustee string

.

    <Description("Unable to convert a wide character trustee string to a multibyte trustee string")> _

.

    '''Unable to find a security identifier that corresponds to a trustee string provided by the user

.

    <Description("Unable to find a security identifier that corresponds to a trustee string provided by the user")> _

.

    '''Unable to find a trustee name that corresponds to a security identifier provided by the user

.

    <Description("Unable to find a trustee name that corresponds to a security identifier provided by the user")> _

.

enum TRUSTEE_FORM {

.

   TRUSTEE_IS_SID,

.

   TRUSTEE_IS_NAME,

.

   TRUSTEE_BAD_FORM,

.

   TRUSTEE_IS_OBJECTS_AND_SID,

.

   TRUSTEE_IS_OBJECTS_AND_NAME

.

    Enum TRUSTEE_FORM

.

    TRUSTEE_IS_SID

.

    TRUSTEE_IS_NAME

.

    TRUSTEE_BAD_FORM

.

    TRUSTEE_IS_OBJECTS_AND_SID

.

    TRUSTEE_IS_OBJECTS_AND_NAME

.
Documentation
[TRUSTEE_FORM] on MSDN

Constants

.

        /// The client who called IAccessControl::IsAccessPermitted was not the trustee provided to the method

.

        public const int CO_E_TRUSTEEDOESNTMATCHCLIENT = (int)(0x80010127 - 0x100000000);

.

        /// One of the trustee strings provided by the user did not conform to the <Domain>\<Name> syntax and it was not the "*" string

.

        public const int CO_E_WRONGTRUSTEENAMESYNTAX = (int)(0x8001012C - 0x100000000);

.

        /// Unable to convert a wide character trustee string to a multibyte trustee string

.

        /// Unable to find a security identifier that corresponds to a trustee string provided by the user

.

        /// Unable to find a trustee name that corresponds to a security identifier provided by the user

Structures

.
Summary
Defines access control information for a specified trustee
.

    TRUSTEE Trustee;

.

    Dim Trustee As TRUSTEE

.

TRUSTEE

.

private enum MULTIPLE_TRUSTEE_OPERATION

.

    NO_MULTIPLE_TRUSTEE,

.

    TRUSTEE_IS_IMPERSONATE

.

private enum TRUSTEE_FORM

.

    TRUSTEE_IS_SID,

.

    TRUSTEE_IS_NAME,

.

    TRUSTEE_BAD_FORM,

.

    TRUSTEE_IS_OBJECTS_AND_SID,

.

    TRUSTEE_IS_OBJECTS_AND_NAME

.

private enum TRUSTEE_TYPE

.

    TRUSTEE_IS_UNKNOWN,

.

    TRUSTEE_IS_USER,

.

    TRUSTEE_IS_GROUP,

.

    TRUSTEE_IS_DOMAIN,

.

    TRUSTEE_IS_ALIAS,

.

    TRUSTEE_IS_WELL_KNOWN_GROUP,

.

    TRUSTEE_IS_DELETED,

.

    TRUSTEE_IS_INVALID,

.

    TRUSTEE_IS_COMPUTER

.

private struct TRUSTEE : IDisposable

.

    public IntPtr pMultipleTrustee;

.

    public MULTIPLE_TRUSTEE_OPERATION MultipleTrusteeOperation;

.

    public TRUSTEE_FORM TrusteeForm;

.

    public TRUSTEE_TYPE TrusteeType;

.

    Public Structure TRUSTEE

.

    Dim pMultipleTrustee As IntPtr ' must be null

.

    Dim MultipleTrusteeOperation As Integer

.

    Dim TrusteeForm As Integer

.

    Dim TrusteeType As Integer


 
Access PInvoke.net directly from VS: