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

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

MyStoreType 屬性會設定或擷取 MyStoreName 屬性所指定的存放區類型。 此存放區類型會直接傳遞至 CertOpenStore

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

這是可讀寫的屬性。

語法

HRESULT put_MyStoreType(
  BSTR bstrType
);

參數

bstrType

傳回值

備註

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

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

範例

BSTR     bstrStoreType = NULL;
HRESULT  hr;

// pEnroll is previously instantiated ICEnroll interface pointer

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

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

規格需求

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