ICEnroll4::ProviderFlags property

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

The ProviderFlags property sets or retrieves the provider type.

The ProviderFlags property is passed to the CryptAcquireContext CryptoAPI function. Valid values are determined by the cryptographic service provider (CSP) in use.

The default value for this property is zero. This property was first defined in the ICEnroll interface.

This property is read/write.

Syntax


HRESULT put_ProviderFlags(
  [in]  LONG Flags
);

HRESULT get_ProviderFlags(
  [out] LONG *pFlags
);

Property value

A Long that contains the provider type. Valid values for this property are determined by the CSP in use. When the Certificate Enrollment Control is executed as a scripted control, CRYPT_MACHINE_KEYSET and zero are the only possible values.

Error codes

If the property access methods put_ProviderFlags and get_ProviderFlags succeed, they return S_OK.

Any other HRESULT value indicates that the call failed.

Remarks

For more information about valid ProviderFlags values for the Microsoft Base Cryptographic Provider, see the CryptAcquireContext CryptoAPI function.

For information about other CSPs, see the documentation provided with the CSP.

The ProviderFlags property value is passed to CryptAcquireContext by using its dwFlags parameter.

The ProviderFlags property affects the behavior of the following methods:

Examples


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 ProviderFlags 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  );

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

 

 

Show: