Platform SDK: Certificate Enrollment Control |
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);
CAStoreName Affects the behavior of the following methods:
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 );
' 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
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.