BuildTrusteeWithObjectsAndNameW function (aclapi.h)
The BuildTrusteeWithObjectsAndName function initializes a TRUSTEE structure with the object-specific access control entry (ACE) information and initializes the remaining members of the structure to default values. The caller also specifies the name of the trustee.
Syntax
void BuildTrusteeWithObjectsAndNameW(
[in, out] PTRUSTEE_W pTrustee,
[in, optional] POBJECTS_AND_NAME_W pObjName,
[in, optional] SE_OBJECT_TYPE ObjectType,
[in, optional] LPWSTR ObjectTypeName,
[in, optional] LPWSTR InheritedObjectTypeName,
[in, optional] LPWSTR Name
);
Parameters
[in, out] pTrustee
A pointer to a TRUSTEE structure that will be initialized by this function. If the value of this parameter is NULL or a pointer that is not valid, the results are undefined.
[in, optional] pObjName
A pointer to an OBJECTS_AND_NAME structure that contains information about the trustee and the securable object.
[in, optional] ObjectType
A pointer to an SE_OBJECT_TYPE enumeration that contains information about the type of securable object.
[in, optional] ObjectTypeName
A pointer to a string that specifies the name that corresponds to the ObjectType GUID to be added to the TRUSTEE structure returned in the pTrustee parameter. This function determines the ObjectType GUID that corresponds to this name.
[in, optional] InheritedObjectTypeName
A pointer to a string that specifies the name that corresponds to the InheritedObjectType GUID to be added to the TRUSTEE structure returned in the pTrustee parameter. This function determines the InheritedObjectType GUID that corresponds to this name.
[in, optional] Name
A pointer to a string that specifies the name used to identify the trustee.
Return value
None
Remarks
This function does not allocate memory for the TRUSTEE and OBJECTS_AND_NAME structures.
For more information about object-specific ACEs, see Object-specific ACEs.
Note
The aclapi.h header defines BuildTrusteeWithObjectsAndName as an alias that 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 is 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 |