Platform SDK: Access Control

GetSecurityDescriptorControl

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

BOOL GetSecurityDescriptorControl(
  PSECURITY_DESCRIPTOR pSecurityDescriptor,  // SD
  PSECURITY_DESCRIPTOR_CONTROL pControl,     // control
  LPDWORD lpdwRevision                       // revision
);

Parameters

pSecurityDescriptor
[in] Pointer to a SECURITY_DESCRIPTOR structure whose control and revision information the function retrieves.
pControl
[out] Pointer to a SECURITY_DESCRIPTOR_CONTROL structure that receives the security descriptor's control information.
lpdwRevision
[out] Pointer to a variable that receives the security descriptor's revision value. This value is always set, even when GetSecurityDescriptorControl returns an error.

Return Values

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

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Header: Declared in Winbase.h; include Windows.h.
  Library: Use Advapi32.lib.

See Also

Access Control Overview, Access Control Functions, GetSecurityDescriptorDacl, GetSecurityDescriptorGroup, GetSecurityDescriptorLength, GetSecurityDescriptorOwner, GetSecurityDescriptorSacl, IsValidSecurityDescriptor, SECURITY_DESCRIPTOR, SECURITY_DESCRIPTOR_CONTROL