Platform SDK: Certificate Enrollment Control

ICEnroll::RequestStoreName [C++]

CEnroll.RequestStoreName [Visual Basic]

The RequestStoreName property specifies where to store the dummy certificate with the added private keys until a certification authority processes the request and responds with a PKCS #7. By default the "REQUEST" system store is used. If the default is not to be used, this property must be set to the store to be used before calls to createPKCS10/createFilePKCS10 and again before calls to acceptPKCS7/acceptFilePKCS7.

Typically, modification of the RequestStoreName property is only performed in advanced applications; changing this value is not recommended for most applications.

[Visual Basic]
objEnroll.RequestStoreName [ = Name ]
[C++]
HRESULT put_RequestStoreName(BSTR Name);
HRESULT get_RequestStoreName(BSTR * pName);

Parameters

[Visual Basic] objEnroll
Object expression that resolves to a CEnroll object.
[Visual Basic,C++] Name
The string value assigned to the RequestStoreName property. It can be any defined store name, such as one of the following:
[C++] pName
Pointer to retrieved property value.

Remarks

RequestStoreName affects the behavior of the following methods:

Example Code [C++]

BSTR     bstrStoreName = NULL;
HRESULT  hr;

// pEnroll is previously instantiated ICEnroll interface pointer

// get the storename
hr = pEnroll->get_RequestStoreName( &bstrStoreName );
if ( FAILED ( hr ) )
    printf("Failed getting RequestStoreName - %x\n", hr );
else
    printf( "RequestStoreName: %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_RequestStoreName( bstrNewName );
if ( FAILED ( hr ) )
    printf("Failed setting RequestStoreName - %x\n", hr );
else
    printf( "RequestStoreName was set to : %ws\n", bstrNewName );

Example Code [Visual Basic]

' declare Certificate Enrollment Control object
Dim objXen As Object

Dim strStoreName As String

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

' retrieve and display the RequestStoreName
strStoreName = objXen.RequestStoreName
MsgBox strStoreName, vbOKOnly, "RequestStoreName"

' set the RequestStoreName
' (strOtherStoreName previously set to a valid store name)
objXen.RequestStoreName = strOtherStoreName

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.