BuildTrusteeWithNameA function (aclapi.h)

The BuildTrusteeWithName function initializes a TRUSTEE structure. The caller specifies the trustee name. The function sets other members of the structure to default values.

Syntax

void BuildTrusteeWithNameA(
  [in, out]      PTRUSTEE_A pTrustee,
  [in, optional] LPSTR      pName
);

Parameters

[in, out] pTrustee

A pointer to a TRUSTEE structure to initialize. The BuildTrusteeWithName function does not allocate any memory. If this parameter is NULL or a pointer that is not valid, the results are undefined.

[in, optional] pName

A pointer to a null-terminated string that contains the name of the trustee for the ptstrName member of the TRUSTEE structure. The BuildTrusteeWithName function sets the other members of the TRUSTEE structure as follows.

Value Meaning
pMultipleTrustee
NULL
MultipleTrusteeOperation
NO_MULTIPLE_TRUSTEE
TrusteeForm
TRUSTEE_IS_NAME
TrusteeType
TRUSTEE_IS_UNKNOWN

Return value

None

Remarks

Note

The aclapi.h header defines BuildTrusteeWithName as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header aclapi.h
Library Advapi32.lib
DLL Advapi32.dll

See also

Access Control Overview

Basic Access Control Functions

BuildTrusteeWithObjectsAndName

BuildTrusteeWithObjectsAndSid

BuildTrusteeWithSid

TRUSTEE