CryptGetOIDFunctionAddress function (wincrypt.h)
The CryptGetOIDFunctionAddress function searches the list of registered and installed functions for an encoding type and object identifier (OID) match. If a match is found, the DLL that contains the function is, if necessary, loaded. If a match is found, a pointer to the function address and a pointer to the function handle are also returned. The reference count on the function handle is incremented.
BOOL CryptGetOIDFunctionAddress( [in] HCRYPTOIDFUNCSET hFuncSet, [in] DWORD dwEncodingType, [in] LPCSTR pszOID, [in] DWORD dwFlags, [out] void **ppvFuncAddr, [out] HCRYPTOIDFUNCADDR *phFuncAddr );
The function set handle previously obtained from a call to the CryptInitOIDFunctionSet function.
Specifies the encoding type to be matched. Currently, only X509_ASN_ENCODING and PKCS_7_ASN_ENCODING are used; however, additional encoding types can be added in the future. To match both current encoding types, use:
X509_ASN_ENCODING | PKCS_7_ASN_ENCODING
For functions that do not use an encoding type, set this parameter to zero.
If the high-order word of the OID is nonzero, pszOID is a pointer to either an OID string such as "220.127.116.11" or an ASCII string such as "file". If the high-order word of the OID is zero, the low-order word specifies the numeric identifier to be used as the object identifier. This resulting OID maps to the function that was either installed or registered with the same OID.
This parameter can be the following value.
||Searches only the installed list of functions.|
A pointer to a pointer to a function address. If a match is found, ppvFuncAddr points to the function address.
If a match is found, phFuncAddr points to the function handle. The reference count for the handle is incremented. When you have finished using the handle, release the handle by calling the CryptFreeOIDFunctionAddress function.
If the function succeeds and a match is found, the function returns nonzero (TRUE).
If the function fails or no match is found, it returns zero (FALSE). For extended error information, call GetLastError.
You can call CryptGetOIDFunctionAddress with the pszOID argument set to CMSG_DEFAULT_INSTALLABLE_FUNC_OID to get the default installable function for the following callback functions.
For retrieval of the default functions, set dwEncodingType to a bitwise OR combination of the following encoding types.
|Minimum supported client||Windows XP [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2003 [desktop apps | UWP apps]|