Platform SDK: Certificate Enrollment Control

ICEnroll::RequestStoreType [C++]

CEnroll.RequestStoreType [Visual Basic]

The RequestStoreType property specifies the type of store to use for the store specified by the RequestStoreName property. The value for RequestStoreType is passed directly on to CertOpenStore. By default RequestStoreType's value is sz_CERT_STORE_PROV_SYSTEM. If the default is not to be used, this property must be set to the same value before calls to createPKCS10/createFilePKCS10 and again before calls to acceptPKCS7/acceptFilePKCS7.

Currently only system stores are supported.

Typically, modification of the RequestStoreType property is only performed in advanced applications.

[Visual Basic]
objEnroll.RequestStoreType [ = Type ]
[C++]
HRESULT put_RequestStoreType(BSTR Type);
HRESULT get_RequestStoreType(BSTR * pType);

Parameters

[Visual Basic] objEnroll
Object expression that resolves to a CEnroll object.
[Visual Basic,C++] Type
The string value assigned to the RequestStoreType property. It is one of the following currently supported store provider types:
Store provider type Value
sz_CERT_STORE_PROV_SYSTEM_W "System"
sz_CERT_STORE_PROV_SYSTEM "System"

[C++] pType
Pointer to retrieved property value.

Remarks

RequestStoreType affects the behavior of the following methods:

Example Code [C++]

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 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 ); 

Example Code [Visual Basic]

' declare Certificate Enrollment Control object
Dim objXen As Object

Dim strStoreType As String

' instantiate the object
Set objXen = CreateObject("CEnroll.CEnroll.1")

' retrieve and display the RequestStoreType
strStoreType = objXen.RequestStoreType
MsgBox strStoreType, vbOKOnly, "RequestStoreType"

' set the RequestStoreType
' (strNewType previously set to a valid store type)
objXen.RequestStoreType = strNewType

Requirements

  Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with the Windows NT 4.0 Option Pack).
  Header: Declared in Xenroll.h.
  Library: Use Uuid.lib.