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


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.


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).


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

CryptSetProviderEx Function

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

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

CryptGetDefaultProvider Function