Platform SDK: Certificate Enrollment Control |
The ProviderType property is dependent on the provider in use. The value for ProviderType is passed directly through to calls to CryptAcquireContext. It has a default value of one, as set in the registry. This means that PROV_RSA_FULL for the default Microsoft Base Cryptographic Provider is used.
[Visual Basic] objEnroll.ProviderType [ = Type ] [C++] HRESULT put_ProviderType(BSTR Type); HRESULT get_ProviderType(BSTR * pType);
ProviderType affects the behavior of the following methods:
DWORD dwProvType; HRESULT hr; // get the ProviderType value // pEnroll is previously instantiated ICEnroll interface pointer hr = pEnroll->get_ProviderType( &dwProvType ); if (FAILED( hr )) printf("Failed get_ProviderType - %x\n", hr ); else printf( "ProviderType: %d\n", dwProvType ); // set the ProviderType value hr = pEnroll->put_ProviderType( PROV_MS_EXCHANGE ); if (FAILED( hr )) printf("Failed put_ProviderType - %x\n", hr ); else printf( "ProviderType set to %d\n", PROV_MS_EXCHANGE );
Const PROV_MS_EXCHANGE As Long = 5 ' declare Certificate Enrollment Control object Dim objXen As Object Dim ProvType As Long ' instantiate the object Set objXen = CreateObject("CEnroll.CEnroll.1") ' retrieve and display the ProviderType ProvType = objXen.ProviderType MsgBox ProvType, vbOKOnly, "ProviderType" ' set the ProviderType objXen.ProviderType = PROV_MS_EXCHANGE
Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with the Windows NT 4.0 Option Pack).
Header: Declared in Xenroll.h.
Library: Use Uuid.lib.