ICEnroll::p ut_RootStoreType 方法 (xenroll.h)

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

RootStoreType屬性會設定或擷取要用於RootStoreName屬性所指定存放區的存放區類型。 此存放區類型會直接傳遞至 CertOpenStore 函式。

此屬性的預設值為 sz_CERT_STORE_PROV_SYSTEM。 僅支援系統存放區。 此屬性最初是在 ICEnroll 介面中定義。

這是可讀寫的屬性。

語法

HRESULT put_RootStoreType(
  BSTR bstrType
);

參數

bstrType

傳回值

備註

RootStoreType 會影響下列方法的行為:

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

範例

BSTR     bstrStoreType = NULL;
HRESULT  hr;

// pEnroll is previously instantiated ICEnroll interface pointer

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

// set the storetype
// bstrNewType is a BSTR that is previously set to a valid store type
hr = pEnroll->put_RootStoreType( bstrNewType );
if ( FAILED ( hr ) )
    printf("Failed setting RootStoreType - %x\n", hr );
else
    printf( "RootStoreType was set to %ws\n", bstrNewType );

規格需求

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