CRegKey::GetKeySecurity

呼叫這個方法會擷取保護開啟登錄機碼的安全性描述元的複本。

LONG GetKeySecurity(
   SECURITY_INFORMATION si,
   PSECURITY_DESCRIPTOR psd,
   LPDWORD pnBytes 
) throw( );

參數

  • si
    指示要求的安全性資訊的 SECURITY_INFORMATION 值。

  • psd
    對用戶端要求的安全性描述元的複本之緩衝區的指標。

  • pnBytes
    大小,以位元組為單位),緩衝區所指向的 psd。

傳回值

如果方法成功,則傳回值為 ERROR_SUCCESS。如果方法失敗,則傳回值為非零的錯誤碼定義於 WINERROR.H。

備註

如需詳細資訊,請參閱 RegGetKeySecurity

需求

Header: atlbase.h

請參閱

參考

CRegKey 類別

CRegKey::SetKeySecurity