Skip to content

Latest commit

 

History

History
128 lines (94 loc) · 5.26 KB

nf-wincrypt-cryptgetoidfunctionaddress.md

File metadata and controls

128 lines (94 loc) · 5.26 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wincrypt.CryptGetOIDFunctionAddress
CryptGetOIDFunctionAddress function (wincrypt.h)
Searches the list of registered and installed functions for an encoding type and object identifier (OID) match.
CRYPT_GET_INSTALLED_OID_FUNC_FLAG
CryptGetOIDFunctionAddress
CryptGetOIDFunctionAddress function [Security]
_crypto2_cryptgetoidfunctionaddress
security.cryptgetoidfunctionaddress
wincrypt/CryptGetOIDFunctionAddress
security\cryptgetoidfunctionaddress.htm
security
2eef6109-a840-48c6-936c-ec0875039c39
12/05/2018
CRYPT_GET_INSTALLED_OID_FUNC_FLAG, CryptGetOIDFunctionAddress, CryptGetOIDFunctionAddress function [Security], _crypto2_cryptgetoidfunctionaddress, security.cryptgetoidfunctionaddress, wincrypt/CryptGetOIDFunctionAddress
wincrypt.h
Windows
Windows XP [desktop apps \| UWP apps]
Windows Server 2003 [desktop apps \| UWP apps]
Crypt32.lib
Crypt32.dll
Windows
19H1
CryptGetOIDFunctionAddress
wincrypt/CryptGetOIDFunctionAddress
c++
APIRef
kbSyntax
DllExport
Crypt32.dll
CryptGetOIDFunctionAddress

CryptGetOIDFunctionAddress function

-description

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.

-parameters

-param hFuncSet [in]

The function set handle previously obtained from a call to the CryptInitOIDFunctionSet function.

-param dwEncodingType [in]

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.

-param pszOID [in]

If the high-order word of the OID is nonzero, pszOID is a pointer to either an OID string such as "2.5.29.1" 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.

-param dwFlags [in]

This parameter can be the following value.

Value Meaning
CRYPT_GET_INSTALLED_OID_FUNC_FLAG
Searches only the installed list of functions.

-param ppvFuncAddr [out]

A pointer to a pointer to a function address. If a match is found, ppvFuncAddr points to the function address.

-param phFuncAddr [out]

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.

Note  By default, both the registered and installed function lists are searched. To search only the installed list of functions, set CRYPT_GET_INSTALLED_OID_FUNC_FLAG. This flag would be set by a registered function to get the address of a preinstalled function it was replacing. For example, the registered function might handle a new special case and call the preinstalled function to handle the remaining cases.
 

-returns

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.

-remarks

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.

CRYPT_ASN_ENCODING X509_ASN_ENCODING

-see-also

OID Support Functions