Platform SDK: Certificate Enrollment Control

ICEnroll::CAStoreName [C++]

CEnroll.CAStoreName [Visual Basic]

The CAStoreName property specifies where all non-"ROOT" and non-"MY" certificates are kept. By default, this is set to the "CA" system store.

[Visual Basic]
objEnroll.CAStoreName [ = Name ]
[C++]
HRESULT put_CAStoreName(BSTR Name);
HRESULT get_CAStoreName(BSTR * pName);

Parameters

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

Remarks

CAStoreName 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_CAStoreName( &bstrStoreName );
if ( FAILED ( hr ) )
    printf("Failed getting CAStoreName - %x\n", hr );
else
    printf( "CAStoreName: %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_CAStoreName( bstrNewName );
if ( FAILED ( hr ) )
    printf("Failed setting CAStoreName - %x\n", hr );
else
    printf( "CAStoreName 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 CAStoreName
strStoreName = objXen.CAStoreName
MsgBox strStoreName, vbOKOnly, "CAStoreName"

' set the CAStoreName
' (strOtherStoreName previously set to a valid store name)
objXen.CAStoreName = 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.