The CryptRegisterDefaultOIDFunction registers the Dll containing the default function to be called for the specified encoding type and function name.
Unlike CryptRegisterOIDFunction, you can't override the function name needing to be exported by the Dll.
#include <wincrypt.h>
BOOL WINAPI CryptRegisterDefaultOIDFunction(
DWORD dwEncodingType, // in
LPCSTR pszFuncName, // in
DWORD dwIndex, // in
LPCWSTR pwszDll // in
);
Currently defined encoding types are shown in the following table:
Encoding type | Value |
---|---|
None | 0x00000000 |
CRYPT_ASN_ENCODING | 0x00000001 |
X509_ASN_ENCODING | 0x00000001 |
PKCS_7_ASN_ENCODING | 0x00010000 |
When dwIndex == 0, the insert is at the beginning the list.
When dwIndex == CRYPT_REGISTER_LAST_INDEX, the insert appends at the end of the list.
TRUE if the function succeeded. FALSE if the function failed.
Call GetLastError to see the reason for any failures.
Windows NT: Requires version 4.0 SP3 or later. Available also in IE 3.02 and later.
Windows: Requires Windows 98 (or Windows 95 with IE 3.02 or later).
Windows CE: Unsupported.
Header: Declared in wincrypt.h.
Import Library: Use crypt32.lib.