Share via


ICEnroll::get_RequestStoreType 方法 (xenroll.h)

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

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

此屬性的預設值為 sz_CERT_STORE_PROV_SYSTEM。 如果未使用預設值,在呼叫createPKCS10createFilePKCS10/ 之前,以及在呼叫acceptPKCS7acceptFilePKCS7/ 之前,此屬性必須設定為相同的值。

僅支援系統存放區。 此屬性最初是在 ICEnroll 介面中定義。

這是可讀寫的屬性。

語法

HRESULT get_RequestStoreType(
  BSTR *pbstrType
);

參數

pbstrType

傳回值

備註

一般而言,只有在進階應用程式中才執行 RequestStoreType 屬性的修改。

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

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

範例

BSTR     bstrStoreType = NULL;
HRESULT  hr;

// pEnroll is previously instantiated ICEnroll interface pointer

// get the storetype
hr = pEnroll->get_RequestStoreType( &bstrStoreType );
if ( FAILED ( hr ) )
    printf("Failed getting RequestStoreType - %x\n", hr );
else
    printf( "RequestStoreType: %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_RequestStoreType( bstrNewType );
if ( FAILED ( hr ) )
    printf("Failed setting RequestStoreType - %x\n", hr );
else
    printf( "RequestStoreType was set to %ws\n", bstrNewType );

規格需求

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