ICEnroll::put_KeySpec method (xenroll.h)

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

The KeySpec property sets or retrieves the type of key generated.

Valid values are determined by the cryptographic service provider (CSP) in use. This property was first defined in the ICEnroll interface.

This property is read/write.

Syntax

HRESULT put_KeySpec(
  LONG dw
);

Parameters

dw

Return value

None

Remarks

For the Microsoft Base Cryptographic Provider, the KeySpec property has a value of AT_KEYEXCHANGE for exchange keys, or AT_SIGNATURE for signature keys. The default is AT_SIGNATURE.

For information about the other Microsoft CSPs, see Cryptographic Service Providers in the CryptoAPI 2.0 documentation.

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

The KeySpec property affects the behavior of the following methods:

Examples

DWORD    dwKeySpec;
HRESULT  hr;

// pEnroll is previously instantiated ICEnroll interface pointer

// get the KeySpec value
hr = pEnroll->get_KeySpec( &dwKeySpec );
if (FAILED( hr ))
    printf("Failed get_KeySpec - %x\n", hr );
else
    printf( "KeySpec: %d\n", dwKeySpec );

// set the KeySpec value
hr = pEnroll->put_KeySpec( AT_KEYEXCHANGE );
if (FAILED( hr ))
    printf("Failed put_KeySpec - %x\n", hr );
else
    printf( "KeySpec set to %d\n", AT_KEYEXCHANGE );

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