RtlCreateSecurityDescriptor function (wdm.h)

The RtlCreateSecurityDescriptor routine initializes a new absolute-format security descriptor. On return, the security descriptor is initialized with no system ACL, no discretionary ACL, no owner, no primary group, and all control flags set to zero.

Syntax

NTSYSAPI NTSTATUS RtlCreateSecurityDescriptor(
  [out] PSECURITY_DESCRIPTOR SecurityDescriptor,
  [in]  ULONG                Revision
);

Parameters

[out] SecurityDescriptor

Pointer to the buffer for the SECURITY_DESCRIPTOR to be initialized.

[in] Revision

Specifies the revision level to assign to the security descriptor. Set this parameter to SECURITY_DESCRIPTOR_REVISION.

Return value

RtlCreateSecurityDescriptor can return one of the following.

Return code Description
STATUS_SUCCESS
The call completed successfully.
STATUS_UNKNOWN_REVISION
The caller specified an unsupported value for Revision.

Remarks

A successful call to this routine initializes a security descriptor. The fields in this descriptor are set to initial values that indicate that there are no security constraints.

Requirements

Requirement Value
Minimum supported client Available in Windows 2000 and later versions of Windows.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe (kernel mode); Ntdll.dll (user mode)
IRQL PASSIVE_LEVEL

See also

RtlLengthSecurityDescriptor

RtlSetDaclSecurityDescriptor

RtlValidSecurityDescriptor

SECURITY_DESCRIPTOR