GetSecurityDescriptorLength 函式 (securitybaseapi.h)

GetSecurityDescriptorLength 函式會傳回結構化有效安全性描述元的長度,以位元組為單位。 長度包含所有相關聯結構的長度。

語法

DWORD GetSecurityDescriptorLength(
  [in] PSECURITY_DESCRIPTOR pSecurityDescriptor
);

參數

[in] pSecurityDescriptor

函式所傳回長度 之SECURITY_DESCRIPTOR 結構的指標。 指標假設為有效。

傳回值

如果函式成功,函式會傳回 SECURITY_DESCRIPTOR 結構的長度,以位元組為單位。

如果 SECURITY_DESCRIPTOR 結構無效,則傳回值未定義。

備註

安全性描述元的長度下限為SECURITY_DESCRIPTOR_MIN_LENGTH。 此長度的安全性描述元沒有相關聯的 安全性標識碼 (SID) 或 訪問控制清單 (ACL) 。

規格需求

需求
最低支援的用戶端 Windows XP [傳統型應用程式 |UWP 應用程式]
最低支援的伺服器 Windows Server 2003 [傳統型應用程式 |UWP 應用程式]
目標平台 Windows
標頭 securitybaseapi.h (包括 Windows.h)
程式庫 Advapi32.lib
Dll Advapi32.dll

另請參閱

GetSecurityDescriptorControl

GetSecurityDescriptorDacl

GetSecurityDescriptorGroup

GetSecurityDescriptorOwner

GetSecurityDescriptorSacl

IsValidSecurityDescriptor

低階 存取控制

低階 存取控制 函式

SECURITY_DESCRIPTOR