Platform SDK: Certificate Enrollment Control |
The RootStoreFlags property value is passed directly to CertOpenStore when the ROOT store is opened. This value is passed as CertOpenStore's dwFlags parameter. For details, see CertOpenStore in the CryptoAPI documentation. The default value for RootStoreFlags is CERT_SYSTEM_STORE_CURRENT_USER.
[Visual Basic] objEnroll.RootStoreFlags [ = Flags ] [C++] HRESULT put_RootStoreFlags(DWORD Flags); HRESULT get_RootStoreFlags(DWORD * pFlags);
RootStoreFlags 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_RootStoreFlags( &dwFlags ); if ( FAILED ( hr ) ) printf("Failed retrieving RootStoreFlags - %x\n", hr ); else printf("RootStoreFlags is %x\n", dwFlags ); // Set the flag. hr = pEnroll->put_RootStoreFlags( CERT_SYSTEM_STORE_LOCAL_MACHINE ); if ( FAILED ( hr ) ) printf("Failed updating RootStoreFlags - %x\n", hr ); else printf("Updated RootStoreFlags\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 RootStoreFlags value. flags = objXen.RootStoreFlags MsgBox flags, vbOKOnly, "RootStoreFlags" ' Set the RootStoreFlags value. objXen.RootStoreFlags = 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.