CryptRegisterDefaultOIDFunction function (wincrypt.h)

The CryptRegisterDefaultOIDFunction registers a DLL containing the default function to be called for the specified encoding type and function name. Unlike CryptRegisterOIDFunction, the function name to be exported by the DLL cannot be overridden.

Syntax

BOOL CryptRegisterDefaultOIDFunction(
  [in] DWORD   dwEncodingType,
  [in] LPCSTR  pszFuncName,
  [in] DWORD   dwIndex,
  [in] LPCWSTR pwszDll
);

Parameters

[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 being registered.

[in] dwIndex

Index location for the insertion of the DLL in the list of DLLs. If dwIndex is zero, the DLL is inserted at the beginning of the list. If it is CRYPT_REGISTER_LAST_INDEX, the DLL is appended at the end of the list.

[in] pwszDll

Optional environment-variable string to be expanded using ExpandEnvironmentStrings function before loading the DLL.

Return value

If the function succeeds, the return value is nonzero (TRUE).

If the function fails, the return value is zero (FALSE).

Requirements

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

See also

OID Support Functions