Platform SDK: Certificate Enrollment Control |
The ProviderFlags property is dependent on the provider in use. The value for ProviderFlags is passed directly through to calls to CryptAcquireContext. By default, this value is set to 0.
[Visual Basic] objEnroll.ProviderFlags [ = Flags ] [C++] HRESULT put_ProviderFlags(DWORD Flags); HRESULT get_ProviderFlags(DWORD * pFlags);
ProviderFlags affects the behavior of the following methods:
DWORD dwProvFlags; HRESULT hr; // pEnroll is previously instantiated ICEnroll interface pointer // get the ProviderFlags value hr = pEnroll->get_ProviderFlags( &dwProvFlags ); if (FAILED( hr )) printf("Failed get_ProviderFlags - %x\n", hr ); else printf( "ProviderFlags: %d\n", dwProvFlags ); // set the ProviderType value hr = pEnroll->put_ProviderFlags( CRYPT_MACHINE_KEYSET ); if (FAILED( hr )) printf("Failed put_ProviderFlags - %x\n", hr ); else printf( "ProviderFlags set to %d\n", CRYPT_MACHINE_KEYSET );
Const CRYPT_MACHINE_KEYSET As Long = &H20 ' declare Certificate Enrollment Control object Dim objXen As Object Dim ProvFlags As Long ' instantiate the object Set objXen = CreateObject("CEnroll.CEnroll.1") ' retrieve and display the ProviderFlags ProvFlags = objXen.ProviderFlags MsgBox ProvFlags, vbOKOnly, "ProviderFlags" ' set the ProviderFlags objXen.ProviderFlags = CRYPT_MACHINE_KEYSET
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.