ICEnroll4::RootStoreName property

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

The RootStoreName property sets or retrieves the name of the root store where all intrinsically trusted, self-signed root certificates are kept.

The default value for this property is "ROOT". Because of the level of trust associated with the root store, the user may be prompted (by means of the user interface) to accept the certificate. Although this property need not be changed for many applications, to avoid the user interface associated with trusting root certificates, a possibility is to set RootStoreName to "CA".

This property was first defined in the ICEnroll interface.

This property is read/write.

Syntax


HRESULT put_RootStoreName(
  [in]  BSTR Name
);

HRESULT get_RootStoreName(
  [out] BSTR *pName
);

Property value

A string that contains the name of the root store where all intrinsically trusted, self-signed root certificates are kept. The string can be any defined store name. The following list shows some possible values. The default value is "ROOT".

  • "ROOT"
  • "CA"
  • "MY"

Error codes

If the property access methods put_RootStoreName and get_RootStoreName succeed, they return S_OK.

Any other HRESULT value indicates that the call failed.

Remarks

RootStoreName affects the behavior of the following methods:

The ability to set this property is disabled when the Certificate Enrollment Control is executed as a scripted control.

Examples


BSTR     bstrStoreName = NULL;
HRESULT  hr;

// pEnroll is previously instantiated ICEnroll interface pointer

// get the storename
hr = pEnroll->get_RootStoreName( &bstrStoreName );
if ( FAILED ( hr ) )
    printf("Failed getting RootStoreName - %x\n", hr );
else
    printf( "RootStoreName: %ws\n", bstrStoreName );
// free BSTR when done
if ( NULL != bstrStoreName )
    SysFreeString( bstrStoreName );

// set the storename
// bstrNewName is a BSTR that is previously set to a valid store name
hr = pEnroll->put_RootStoreName( bstrNewName );
if ( FAILED ( hr ) )
    printf("Failed setting RootStoreName - %x\n", hr );
else
    printf( "RootStoreName was set to : %ws\n", bstrNewName );

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: