ICEnroll4::GetSupportedKeySpec method

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

The GetSupportedKeySpec method retrieves information regarding the current cryptographic service provider (CSP) support for signature and/or exchange operations. This method was first defined in the ICEnroll3 interface.

The values retrieved by this method are dependent upon the current CSP.

Syntax


HRESULT GetSupportedKeySpec(
  [out] LONG *pdwKeySpec
);

Parameters

pdwKeySpec [out]

A pointer to a LONG that receives a bit flag that indicates whether the current CSP supports exchange and signature keys.

Return value

C++

If the method succeeds, the method returns S_OK.

If the method fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.

VB

Returns a value that indicates whether the current CSP supports exchange and signature keys. If the CSP does not support this method, an error is returned.

Remarks

Call this method to determine whether the current CSP supports exchange keys, signature keys, or both. The pdwKeySpec parameter will contain one or more of the following constants (defined in in Wincrypt.h):

  • AT_KEYEXCHANGE
  • AT_SIGNATURE

Examples


DWORD dwKeySpec;

// Determine the supported key specifications.
// hr is HRESULT variable.
hr = pEnroll->GetSupportedKeySpec( &dwKeySpec );
if ( FAILED( hr ) )    
    printf("Failed GetSupportedKeySpec [%x]\n", hr);
else
{
    printf("Exchange keys are %s. Signature keys are %s.\n",
           dwKeySpec & AT_KEYEXCHANGE ? "supported" : "not supported",
           dwKeySpec & AT_SIGNATURE ? "supported" : "not supported" );
}

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

See also

ICEnroll4
CEnroll
ICEnroll3

 

 

Show: