Platform SDK: Certificate Enrollment Control |
The MyStoreName property specifies where certificates with linked private keys are kept. The value of MyStoreName specifies the store in which to place the new certificate produced from acceptPKCS7 or acceptFilePKCS7. By default, this is set to the "MY" system store.
[Visual Basic] objEnroll.MyStoreName [ = Name ] [C++] HRESULT put_MyStoreName(BSTR Name); HRESULT get_MyStoreName(BSTR * pName);
MyStoreName 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_MyStoreName( &bstrStoreName ); if ( FAILED ( hr ) ) printf("Failed getting MyStoreName - %x\n", hr ); else printf( "MyStoreName: %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_MyStoreName( bstrNewName ); if ( FAILED ( hr ) ) printf("Failed setting MyStoreName - %x\n", hr ); else printf( "MyStoreName 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 MyStoreName strStoreName = objXen.MyStoreName MsgBox strStoreName, vbOKOnly, "MyStoreName" ' set the MyStoreName ' (strOtherStoreName previously set to a valid store name) objXen.MyStoreName = 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.