CryptGetDefaultOIDDllList function (wincrypt.h)

The CryptGetDefaultOIDDllList function acquires the list of the names of DLL files that contain registered default object identifier (OID) functions for a specified function set and encoding type.


BOOL CryptGetDefaultOIDDllList(
  [in]      HCRYPTOIDFUNCSET hFuncSet,
  [in]      DWORD            dwEncodingType,
  [out]     WCHAR            *pwszDllList,
  [in, out] DWORD            *pcchDllList


[in] hFuncSet

Function set handle previously obtained by a call to CryptInitOIDFunctionSet.

[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:


Note  Either a certificate or message encoding type is required. X509_ASN_ENCODING is the default. If that type is indicated, it is used; otherwise, if the PKCS7_ASN_ENCODING type is indicated, it is used.

[out] pwszDllList

A pointer to a buffer to receive the list of zero or more null-terminated file names. The returned list is terminated with a terminating NULL character. For example, a list of two names could be:

L"first.dll\0" L"second.dll\0" L"\0"

To retrieve the number of wide characters the buffer must hold, this parameter can be NULL. For more information, see Retrieving Data of Unknown Length.

[in, out] pcchDllList

A pointer to a DWORD that specifies the size, in wide characters, of the returned list pointed to by the pwszDllList parameter. When the function returns, the variable pointed to by the pcchDllList parameter contains the number of wide characters stored in the buffer.

Note  When processing the data returned in the buffer, applications need to use the actual size of the data returned. The actual size can be slightly smaller than the size of the buffer specified on input. On input, buffer sizes are usually specified large enough to ensure that the largest possible output data will fit in the buffer. On output, the variable pointed to by this parameter is updated to reflect the actual size of the data copied to the buffer.

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.

This function has the following error codes.

Return code Description
If the buffer specified by the pwszDllList parameter is not large enough to hold the returned data, the function sets the ERROR_MORE_DATA code and stores the required buffer size, in wide characters, in the variable pointed to by pcchDllList.


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

OID Support Functions