ICEnroll4::RootStoreFlags property

[This property is no longer available for use as of Windows Server 2008 and Windows Vista.]

The RootStoreFlags property sets or retrieves the registry location used for the root store.

The default value for this property is CERT_SYSTEM_STORE_CURRENT_USER. This property was first defined in the ICEnroll interface.

This property is read/write.

Syntax


HRESULT put_RootStoreFlags(
  [in]  LONG Flags
);

HRESULT get_RootStoreFlags(
  [out] LONG *pFlags
);

Property value

A Long that contains the registry location used for the root store. The following list shows the possible values:

  • CERT_SYSTEM_STORE_CURRENT_USER
  • CERT_SYSTEM_STORE_LOCAL_MACHINE
  • CERT_SYSTEM_STORE_SERVICES
  • CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY
  • CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY

When the Certificate Enrollment Control is executed as a scripted control, CERT_SYSTEM_STORE_CURRENT_USER and CERT_SYSTEM_STORE_LOCAL_MACHINE are the only possible values. If this property is set to CERT_SYSTEM_STORE_LOCAL_MACHINE, then the RootStoreName property is changed to "CA".

Error codes

If the property access methods put_RootStoreFlags and get_RootStoreFlags succeed, they return S_OK.

Any other HRESULT value indicates that the call failed.

Remarks

The RootStoreFlags property value is passed to the CertOpenStore CryptoAPI function by using its dwFlags parameter.

The RootStoreFlags property should be set before using the following methods:

Examples


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");

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

End of client support

Windows XP

End of server support

Windows Server 2003

Header

Xenroll.h

Library

Uuid.lib

DLL

Xenroll.dll

IID

IID_ICEnroll4 is defined as c1f1188a-2eb5-4a80-841b-7e729a356d90

 

 

Show: