CryptGetDefaultOIDDllList

The CryptGetDefaultOIDDllList function gets the list of registered default Dll entries for the specified function set and encoding type.

#include <wincrypt.h>
BOOL WINAPI CryptGetDefaultOIDDllList(
  HCRYPTOIDFUNCSET hFuncSet,  // in
  DWORD dwEncodingType,       // in
  LPWSTR pwszDllList,         // out
  DWORD *pcchDllList          // in, out
);
 

Parameters

hFuncSet
Function set handle previously obtained from a call to CryptInitOIDFunctionSet.
dwEncodingType
Type of encoding specified. Note that either a certificate or message encoding type is required. If the low-order word containing the certificate encoding type is nonzero, then it is used. Otherwise, the high-order word containing 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 shown in the following table:
Encoding type Value
None 0x00000000
CRYPT_ASN_ENCODING 0x00000001
X509_ASN_ENCODING 0x00000001
PKCS_7_ASN_ENCODING 0x00010000

pwszDllList
Pointer to a buffer that receives the returned list, which consists of either none, one, or more null-terminated file names. The returned list is terminated with a null entry in the list.
For exampe, L"first.dll" L"\0" L"second.dll" L"\0" L"\0"

This parameter can be NULL to set the number of wide characters in the list for memory allocation purposes. For more information, see Common In/Out Parameter Conventions.

pcchDllList
Pointer to a variable that specifies the size, in wide characters, of the returned list pointed to by pwszDllList parameter. When the function returns, the variable pointed to by the pcchDllList parameter contains the number of bytes stored in the buffer. This parameter can be NULL, only if pwszDllList is NULL.

Note that when processing the data returned in the buffer, applications need to use the actual size of the data returned. The actual size may be slightly smaller than the size of the buffer specified on input. (On input, buffer sizes are usually specified large enough to insure 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 Values

TRUE if the function succeeded. FALSE if the function failed.

Call GetLastError to see the reason for any failures.

This function has the following error codes.

Error code Description
ERROR_MORE_DATA 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 bytes, into the variable pointed to by pcchDllList.

QuickInfo

  Windows NT: Requires version 4.0 SP3 or later. Available also in IE 3.02 and later.
  Windows: Requires Windows 98 (or Windows 95 with IE 3.02 or later).
  Windows CE: Unsupported.
  Header: Declared in wincrypt.h.
  Import Library: Use crypt32.lib.