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

Applies to: Windows Vista BusinessWindows Vista Business 64-bit EditionWindows Vista Enterprise More

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

CryptSetProviderEx Function
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

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