The CryptGetDefaultOIDFunctionAddress function either gets the first or next installed DEFAULT function or loads the Dll containing the DEFAULT function.
#include <wincrypt.h>
BOOL WINAPI CryptGetDefaultOIDFunctionAddress(
HCRYPTOIDFUNCSET hFuncSet, // in
DWORD dwEncodingType, // in
LPCWSTR pwszDll, // in, optional
DWORD dwFlags, // in
void **ppvFuncAddr, // out
HCRYPTOIDFUNCADDR *phFuncAddr // in, out
);
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 pwszDll is not NULL, then an attempt is made to load the Dll and the DEFAULT function. *phFuncAddr is ignored upon entry and is not freed via a call to CryptFreeOIDFunctionAddress.
When this function is successful, *phFuncAddr is updated with the function address's handle. The function's handle count is incremented. CryptFreeOIDFunctionAddress needs to be called to release it, or CryptGetOIDFunctionAddress can also be called for a NULL value of pwszDll.
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.