GetSecurityDescriptorControl function

The GetSecurityDescriptorControl function retrieves a security descriptor control and revision information.

Syntax

BOOL GetSecurityDescriptorControl(
  PSECURITY_DESCRIPTOR         pSecurityDescriptor,
  PSECURITY_DESCRIPTOR_CONTROL pControl,
  LPDWORD                      lpdwRevision
);

Parameters

pSecurityDescriptor

A pointer to a SECURITY_DESCRIPTOR structure whose control and revision information the function retrieves.

pControl

A pointer to a SECURITY_DESCRIPTOR_CONTROL structure that receives the security descriptor's control information.

lpdwRevision

A pointer to a variable that receives the security descriptor's revision value. This value is always set, even when GetSecurityDescriptorControl returns an error.

Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Requirements

   
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header securitybaseapi.h (include Windows.h)
Library Advapi32.lib
DLL Advapi32.dll

See Also

Access Control Overview

Basic Access Control Functions

GetSecurityDescriptorDacl

GetSecurityDescriptorGroup

GetSecurityDescriptorLength

GetSecurityDescriptorOwner

GetSecurityDescriptorSacl

IsValidSecurityDescriptor

SECURITY_DESCRIPTOR

SECURITY_DESCRIPTOR_CONTROL