CryptEnumOIDFunction function

The CryptEnumOIDFunction function enumerates the registered object identifier (OID) functions. OID functions that are enumerated can be screened to include those identified by their encoding type, function name, OID, or any combination of encoding type, function name, and OID. For each OID function that matches the selection criteria, an application-provided callback function, pfnEnumOIDFunc, is called.


BOOL CryptEnumOIDFunction(
  DWORD                   dwEncodingType,
  LPCSTR                  pszFuncName,
  LPCSTR                  pszOID,
  DWORD                   dwFlags,
  void                    *pvArg,



Specifies the encoding type to match. Setting this parameter to CRYPT_MATCH_ANY_ENCODING_TYPE matches any encoding type. Note that if CRYPT_MATCH_ANY_ENCODING_TYPE is not specified, either a certificate or message encoding type is required. If the low-order word that contains the certificate encoding type is nonzero, it is used; otherwise, the high-order word that contains the message encoding type is used. If both are specified, the certificate encoding type in the low-order word is used.

Currently defined encoding types are:



Name of a function for which a case insensitive match search is performed. Setting this parameter to NULL results in a match being found for any function name.


If the high-order word of pszOID is nonzero, pszOID specifies the object identifier for which a case insensitive match search is performed. If the high-order word of pszOID is zero, pszOID is used to match a numeric object identifier. Setting this parameter to NULL matches any object identifier. Setting this parameter to CRYPT_DEFAULT_OID restricts the enumeration to only the default functions.


Reserved for future use and must be zero.


A pointer to arguments to be passed through to the CRYPT_ENUM_OID_FUNCTION callback function.


A pointer to the callback function that is executed for each OID function that matches the input parameters. For details, see CRYPT_ENUM_OID_FUNCTION.

Return Value

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

If the function fails, it returns zero (FALSE). For extended error information, call GetLastError.


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

OID Support Functions