GetSecurityDescriptorGroup 函式 (securitybaseapi.h)

GetSecurityDescriptorGroup 函式會從安全性描述元擷取主要群組資訊。

語法

BOOL GetSecurityDescriptorGroup(
  [in]  PSECURITY_DESCRIPTOR pSecurityDescriptor,
  [out] PSID                 *pGroup,
  [out] LPBOOL               lpbGroupDefaulted
);

參數

[in] pSecurityDescriptor

函式所擷取之主要群組資訊的 SECURITY_DESCRIPTOR 結構的指標。

[out] pGroup

在函式傳回時識別主要群組 (SID 之安全性標識碼 指標的指標) 。 如果安全性描述元不包含主要群組,函式會將 pGroup 指向的指標設定為 NULL ,並忽略其餘的輸出參數 lpbGroupDefaulted。 如果安全性描述元包含主要群組,函式會將 pGroup 指向的指標設定為安全性描述項群組 SID 的位址,併為 lpbGroupDefaulted 所指向的變數提供有效的值。

[out] lpbGroupDefaulted

當函式傳回時,旗標的指標會設定為SECURITY_DESCRIPTOR_CONTROL 結構中 SE_GROUP_DEFAULTED 旗標的值。 如果 pGroup 參數指向的變數中所儲存的值是 NULL,則不會設定任何值。

傳回值

如果函式成功,函式會傳回非零。

如果函式失敗,它會傳回零。 若要取得擴充的錯誤資訊,請呼叫 GetLastError

規格需求

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

另請參閱

GetSecurityDescriptorControl

GetSecurityDescriptorDacl

GetSecurityDescriptorLength

GetSecurityDescriptorOwner

GetSecurityDescriptorSacl

IsValidSecurityDescriptor

低階 存取控制

低階 存取控制 函式

SECURITY_DESCRIPTOR

SECURITY_DESCRIPTOR_CONTROL

SetSecurityDescriptorGroup