GetSecurityDescriptorControl function (securitybaseapi.h)

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

Syntax

BOOL GetSecurityDescriptorControl(
  [in]  PSECURITY_DESCRIPTOR         pSecurityDescriptor,
  [out] PSECURITY_DESCRIPTOR_CONTROL pControl,
  [out] LPDWORD                      lpdwRevision
);

Parameters

[in] pSecurityDescriptor

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

[out] pControl

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

[out] 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

Requirement Value
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