CryptInstallOIDFunctionAddress function (wincrypt.h)

The CryptInstallOIDFunctionAddress function installs a set of callable object identifier (OID) function addresses.

Syntax

BOOL CryptInstallOIDFunctionAddress(
  [in] HMODULE                       hModule,
  [in] DWORD                         dwEncodingType,
  [in] LPCSTR                        pszFuncName,
  [in] DWORD                         cFuncEntry,
  [in] const CRYPT_OID_FUNC_ENTRY [] rgFuncEntry,
  [in] DWORD                         dwFlags
);

Parameters

[in] hModule

This parameter is updated with the hModule parameter passed to DllMain to prevent the DLL that contains the function addresses from being unloaded by CryptGetOIDFunctionAddress or CryptFreeOIDFunctionAddress. This would be the case when the DLL has also registered OID functions through CryptRegisterOIDFunction.

[in] dwEncodingType

Specifies the encoding type to be matched. Currently, only X509_ASN_ENCODING and PKCS_7_ASN_ENCODING are being used; however, additional encoding types may be added in the future. To match both current encoding types, use:

X509_ASN_ENCODING | PKCS_7_ASN_ENCODING

[in] pszFuncName

Name of the function set being installed.

[in] cFuncEntry

Number of array elements in rgFuncEntry[].

[in] rgFuncEntry

Array of CRYPT_OID_FUNC_ENTRY structures, each containing an OID and the starting address of its correlated routine.

Default functions are installed by setting the pszOID member of the CRYPT_OID_FUNC_ENTRY structure for their array element to CRYPT_DEFAULT_OID.

[in] dwFlags

By default, a new function set is installed at the end of the list of function sets. Setting the CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG flag installs the function set at the beginning of the list.

Return value

If the function succeeds, the function returns nonzero (TRUE).

If the function fails, it returns zero (FALSE).

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header wincrypt.h
Library Crypt32.lib
DLL Crypt32.dll

See also

CRYPT_OID_FUNC_ENTRY

OID Support Functions