ICEnroll::get_ProviderName method (xenroll.h)

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

The ProviderName property sets or retrieves the name of the cryptographic service provider (CSP) to use.

If the CSP has not been specified, the default value for this property is "Microsoft Base Cryptographic Provider", and the ProviderName property is set to an empty string. This property was first defined in the ICEnroll interface.

This property is read/write.

Syntax

HRESULT get_ProviderName(
  BSTR *pbstrProvider
);

Parameters

pbstrProvider

Return value

None

Remarks

The ProviderName property affects the behavior of the following methods:

Examples

BSTR     bstrProvName = NULL;
BSTR     bstrMyProvName = NULL;
HRESULT  hr;

// pEnroll is previously instantiated ICEnroll interface pointer

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

// set the ProviderName value
bstrMyProvName = SysAllocString(TEXT("Microsoft Base DSS")
                                TEXT(" Cryptographic Provider"));
hr = pEnroll->put_ProviderName( bstrMyProvName );
if (FAILED( hr ))
    printf("Failed put_ProviderName - %x\n", hr );
else
    printf( "ProviderName set to %ws\n", bstrMyProvName );
// free BSTR when done
if ( NULL != bstrMyProvName )
    SysFreeString( bstrMyProvName );

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header xenroll.h
Library Uuid.lib
DLL Xenroll.dll