Platform SDK: Access Control

BuildTrusteeWithSid

The BuildTrusteeWithSid function initializes a TRUSTEE structure. The caller specifies the security identifier (SID) of the trustee. The function sets other members of the structure to default values. The function does not look up the name associated with the SID.

VOID BuildTrusteeWithSid(
  PTRUSTEE pTrustee,  // structure
  PSID pSid           // trustee name
);

Parameters

pTrustee
[in/out] Pointer to a TRUSTEE structure to initialize. The BuildTrusteeWithSid function does not allocate any memory. If this parameter is NULL, the function does nothing.
pSid
[in] Pointer to a SID structure that identifies the trustee. The BuildTrusteeWithSid function assigns this pointer to the ptstrName member of the TRUSTEE structure. The function sets the other members of the TRUSTEE structure as follows.
Member Value
pMultipleTrustee NULL
MultipleTrusteeOperation NO_MULTIPLE_TRUSTEE
TrusteeForm TRUSTEE_IS_SID
TrusteeType TRUSTEE_IS_UNKNOWN

Return Values

This function does not return a value.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Header: Declared in Aclapi.h.
  Library: Use Advapi32.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.

See Also

Access Control Overview, Access Control Functions, BuildTrusteeWithName, BuildTrusteeWithObjectsAndName, BuildTrusteeWithObjectsAndSid, TRUSTEE