Article ID: 2513526 - Last Review: March 24, 2011 - Revision: 1.0

CryptSetProvider function or CryptSetProviderEx fails to change the user’s default cryptographic service provider (CSP).

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
Expand all | Collapse all

SYMPTOMS

When you try to change the user’s default cryptographic service provider (CSP) by calling the CryptSetProvider function or CryptSetProviderEx function with dwFlags set to CRYPT_USER_DEFAULT on the Microsoft products listed in the "Applies to" section, this results in the ERROR_CALL_NOT_IMPLEMENTED error.
This is by design.

CAUSE

The call to the CryptSetProvider or CryptSetProviderEx function does not succeed when a CSP specified to the function is different from the default CSP. This error occurs because the operating system does not let you to change the default cryptographic service provider (CSP).

RESOLUTION

To use a CSP that is different from the default one, specify the CSP to the pszProvider parameter of the CryptAcquireContext function.

MORE INFORMATION

For more information about the CryptSetProvider function and CryptSetProviderEx function, visit the following Microsoft Web site:

CryptSetProvider Function
http://msdn.microsoft.com/en-us/library/aa380274(VS.85).aspx (http://msdn.microsoft.com/en-us/library/aa380274(VS.85).aspx)

CryptSetProviderEx Function
http://msdn.microsoft.com/en-us/library/aa380275(VS.85).aspx (http://msdn.microsoft.com/en-us/library/aa380275(VS.85).aspx)


For additional information regarding Windows Server 2003, click the following article number to view the article in the Microsoft Knowledge Base:

A call to the CryptSetProvider function does not succeed on Windows Server 2003-based computer
http://support.microsoft.com/kb/840694/en-us (http://support.microsoft.com/kb/840694/en-us)

The default CSP for the operating system that you are using can be found by calling the CryptGetDefaultProvider function:

CryptGetDefaultProvider Function
http://msdn.microsoft.com/en-us/library/aa379945(VS.85).aspx (http://msdn.microsoft.com/en-us/library/aa379945(VS.85).aspx)
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use (http://go.microsoft.com/fwlink/?LinkId=151500) for other considerations.

APPLIES TO
  • Windows Vista Business
  • Windows Vista Business 64-bit Edition
  • Windows Vista Enterprise
  • Windows Vista Enterprise 64-bit Edition
  • Windows Vista Home Basic
  • Windows Vista Home Basic 64-bit Edition
  • Windows Vista Home Premium
  • Windows Vista Home Premium 64-bit Edition
  • Windows Vista Ultimate
  • Windows Vista Ultimate 64-bit Edition
  • Windows Vista Service Pack 1
  • Windows Vista Service Pack 2
  • Windows Server 2008 Standard
  • Windows Server 2008 Datacenter
  • Windows Server 2008 Enterprise
  • Windows Server 2008 R2 Standard
  • Windows Server 2008 R2 Datacenter
  • Windows Server 2008 R2 Enterprise
  • Windows 7 Enterprise
  • Windows 7 Home Basic
  • Windows 7 Home Premium
  • Windows 7 Professional
  • Windows 7 Service Pack 1
  • Windows 7 Starter
  • Windows 7 Ultimate
Keywords: 
KB2513526