A call to the CryptSetProvider function does not succeed on Windows Server 2003-based computer (840694)



The information in this article applies to:

  • Microsoft Windows Server 2003, Standard Edition
  • Microsoft Windows Server 2003, Enterprise Edition
  • Microsoft Windows Server 2003, Datacenter Edition

SYMPTOMS

When you make a call to the CryptSetProvider function on your Microsoft Windows Server 2003-based computer, the call does not succeed. When this problem occurs, the GetLastError function returns the following error code:
ERROR_CALL_NOT_IMPLEMENTED

CAUSE

This error occurs because Windows Server 2003 does not let you change the default cryptographic service provider (CSP). Calls to the CryptSetProvider function do not succeed if the CSP that is specified is different from the current default CSP.

RESOLUTION

To resolve this issue, do not make calls to the CryptSetProvider function on a Windows Server 2003-based computer. To implement a CSP in your program, specify the CSP in a call to the CryptAcquireContext function that uses the phProv option.

MORE INFORMATION

For more information about the CryptAcquireContext function, visit the following Microsoft Web site:

Modification Type:MajorLast Reviewed:7/14/2004
Keywords:kbDev kbtshoot kbprb KB840694 kbAudDeveloper