Error Code Changes

The error codes were moved from wincrypt.h to winerror.h and were renamed or mapped to existing error codes as follows:

CRMSG_E_GENERAL to CRYPT_E_MSG_ERROR

CERT_BAD_PARAMETER to E_INVALIDARG

CERT_BAD_LENGTH to ERROR_MORE_DATA

CERT_BAD_ENCODE to CRYPT_E_BAD_ENCODE

CERT_OUT_OF_MEMORY to E_OUTOFMEMORY

CERT_MUST_COPY_ENCODED to E_INVALIDARG

CERT_OBJID_NOT_FOUND (not used)

CERT_OSS_ERROR to CRYPT_E_OSS_ERROR

CERT_STORE_BAD_PARAMETER to E_INVALIDARG

CERT_STORE_BAD_LEN to ERROR_MORE_DATA

CERT_STORE_BAD_FLAGS to E_INVALIDARG

CERT_STORE_BAD_FILE to CRYPT_E_FILE_ERROR

CERT_STORE_NO_SUCH_PROPERTY to CRYPT_E_NOT_FOUND

CERT_STORE_ALREADY_IN_STORE to CRYPT_E_EXISTS

CERT_STORE_NOT_IMPLEMENTED to E_NOTIMPL

CERT_STORE_NOT_FOUND to CRYPT_E_NOT_FOUND

CERT_STORE_NO_CRYPT_PROV to CRYPT_E_NO_PROVIDER

CERT_STORE_SELF_SIGNED to CRYPT_E_SELF_SIGNED

CERT_STORE_DELETED_PREV to CRYPT_E_DELETED_PREV

CERT_HELPER_NO_MATCH to CRYPT_E_NO_MATCH

SCA_BAD_LEN_PARAMETER to ERROR_MORE_DATA

SCA_BAD_PARAMETER to E_INVALIDARG

SCA_UNEXPECTED_MSG_TYPE to
CRYPT_E_UNEXPECTED_MSG_TYPE

SCA_NO_CERT_KEY_PROV to CRYPT_E_NO_KEY_PROPERTY

SCA_NO_XCHG_CERT to CRYPT_E_NO_DECRYPT_CERT

SCA_BAD_MSG to CRYPT_E_BAD_MSG