ICEnroll::get_CAStoreName 方法 (xenroll.h)

[自 Windows Server 2008 和 Windows Vista 起,這個屬性已不再可供使用。]

CAStoreName 屬性會設定或擷取存放區的名稱,其中會保留所有非“ROOT” 和非“MY” 憑證。

此屬性的預設值為 「CA」。 此屬性最初是在 ICEnroll 介面中定義。

這是可讀寫的屬性。

語法

HRESULT get_CAStoreName(
  BSTR *pbstrName
);

參數

pbstrName

傳回值

備註

CAStoreName 屬性會影響下列方法的行為:

當憑證註冊控制執行為腳本控件時,會停用設定此屬性的功能。

範例

BSTR     bstrStoreName = NULL;
HRESULT  hr;

// pEnroll is previously instantiated ICEnroll interface pointer

// get the storename
hr = pEnroll->get_CAStoreName( &bstrStoreName );
if ( FAILED ( hr ) )
    printf("Failed getting CAStoreName - %x\n", hr );
else
    printf( "CAStoreName: %ws\n", bstrStoreName );
// free BSTR when done
if ( NULL != bstrStoreName )
    SysFreeString( bstrStoreName );

// set the storename
// bstrNewName previously set to a valid store name
hr = pEnroll->put_CAStoreName( bstrNewName );
if ( FAILED ( hr ) )
    printf("Failed setting CAStoreName - %x\n", hr );
else
    printf( "CAStoreName was set to : %ws\n", bstrNewName );

規格需求

需求
最低支援的用戶端 Windows XP [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2003 [僅限桌面應用程式]
目標平台 Windows
標頭 xenroll.h
程式庫 Uuid.lib
Dll Xenroll.dll