Windows Dev Center

ICEnroll4::RootStoreType property

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

The RootStoreType property sets or retrieves the type of store to use for the store specified by the RootStoreName property. This store type is passed directly on to the CertOpenStore function.

The default value for this property is sz_CERT_STORE_PROV_SYSTEM. Only system stores are supported. This property was first defined in the ICEnroll interface.

This property is read/write.

Syntax


HRESULT put_RootStoreType(
  [in]  BSTR Type
);

HRESULT get_RootStoreType(
  [out] BSTR *pType
);

Property value

A string that contains the type of store to use for the store specified by the RootStoreName property. The following table shows the possible values.

ValueMeaning
sz_CERT_STORE_PROV_SYSTEM_W

"System"

sz_CERT_STORE_PROV_SYSTEM

"System"

 

Error codes

If the property access methods put_RootStoreType and get_RootStoreType succeed, they return S_OK.

Any other HRESULT value indicates that the call failed.

Remarks

RootStoreType 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     bstrStoreType = NULL;
HRESULT  hr;

// pEnroll is previously instantiated ICEnroll interface pointer

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

// set the storetype
// bstrNewType is a BSTR that is previously set to a valid store type
hr = pEnroll->put_RootStoreType( bstrNewType );
if ( FAILED ( hr ) )
    printf("Failed setting RootStoreType - %x\n", hr );
else
    printf( "RootStoreType was set to %ws\n", bstrNewType );

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

 

 

Community Additions

ADD
Show:
© 2015 Microsoft