Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

ICEnroll4::ProviderName property

[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 put_ProviderName(
  [in]   BSTR Name
);

HRESULT get_ProviderName(
  [out]  BSTR *pName
);

Property value

A string that contains the name of the CSP to use. The string can be any valid provider name.

Error codes

If the property access methods put_ProviderName and get_ProviderName succeed, they return S_OK.

Any other HRESULT value indicates that the call failed.

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

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

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.