Export (0) Print
Expand All
Expand Minimize

InitializeSecurityDescriptor function

The InitializeSecurityDescriptor function initializes a new security descriptor.

Syntax


BOOL WINAPI InitializeSecurityDescriptor(
  _Out_  PSECURITY_DESCRIPTOR pSecurityDescriptor,
  _In_   DWORD dwRevision
);

Parameters

pSecurityDescriptor [out]

A pointer to a SECURITY_DESCRIPTOR structure that the function initializes.

dwRevision [in]

The revision level to assign to the security descriptor. This parameter must be SECURITY_DESCRIPTOR_REVISION.

Return value

If the function succeeds, the function returns nonzero.

If the function fails, it returns zero. To get extended error information, call GetLastError.

Remarks

The InitializeSecurityDescriptor function initializes a security descriptor in absolute format, rather than self-relative format.

The InitializeSecurityDescriptor function initializes a security descriptor to have no system access control list (SACL), no discretionary access control list (DACL), no owner, no primary group, and all control flags set to FALSE (NULL). Thus, except for its revision level, it is empty.

Examples

For an example that uses this function, see Creating a Security Descriptor for a New Object.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Winbase.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

See also

Low-level Access Control
Low-level Access Control Functions
GetSecurityDescriptorControl
GetSecurityDescriptorDacl
GetSecurityDescriptorGroup
GetSecurityDescriptorLength
GetSecurityDescriptorOwner
GetSecurityDescriptorSacl
IsValidSecurityDescriptor
SECURITY_DESCRIPTOR
SetSecurityDescriptorDacl
SetSecurityDescriptorGroup
SetSecurityDescriptorOwner
SetSecurityDescriptorSacl

 

 

Community Additions

ADD
Show:
© 2014 Microsoft