| Platform SDK: Certificate Enrollment Control |
The RequestStoreFlags property value is passed directly to CertOpenStore when the REQUEST store is opened. This value is passed as CertOpenStore's dwFlags parameter. For details, see CertOpenStore in the CryptoAPI documentation. The default value for RequestStoreFlags is CERT_SYSTEM_STORE_CURRENT_USER. If the default is not used, this property must be set prior to making calls to createPKCS10/createFilePKCS10 and again before calls to acceptPKCS7/acceptFilePKCS7.
Typically, modification of the RequestStoreFlags property is only performed in advanced applications.
[Visual Basic] objEnroll.RequestStoreFlags [ = Flags ] [C++] HRESULT put_RequestStoreFlags(DWORD Flags); HRESULT get_RequestStoreFlags(DWORD * pFlags);
RequestStoreFlags affects the behavior of the following methods:
DWORD dwFlags;
HRESULT hr;
// pEnroll is previously instantiated ICEnroll interface pointer
// retrieve the flag value
hr = pEnroll->get_RequestStoreFlags( &dwFlags );
if ( FAILED ( hr ) )
printf("Failed retrieving RequestStoreFlags - %x\n", hr );
else
printf("RequestStoreFlags is %x\n", dwFlags );
// set the flag
hr = pEnroll->put_RequestStoreFlags( CERT_SYSTEM_STORE_LOCAL_MACHINE );
if ( FAILED ( hr ) )
printf("Failed updating RequestStoreFlags - %x\n", hr );
else
printf("Updated RequestStoreFlags\n");
Const CERT_SYSTEM_STORE_LOCAL_MACHINE As Long = &H20000
' declare Certificate Enrollment Control object
Dim objXen As Object
Dim flags As Long
' instantiate the object
Set objXen = CreateObject("CEnroll.CEnroll.1")
' retrieve and display the RequestStoreFlags value
flags = objXen.RequestStoreFlags
MsgBox flags, vbOKOnly, "RequestStoreFlags"
' set the RequestStoreFlags value
objXen.RequestStoreFlags = CERT_SYSTEM_STORE_LOCAL_MACHINE
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.