Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function loads the DLL containing a default function address. It can also be used to return the address of first or next installed default OID function in an initialized function set and load the DLL containing that function address.

Syntax

BOOL WINAPI CryptGetDefaultOIDFunctionAddress(
  HCRYPTOIDFUNCSET 
hFuncSet,
  DWORD 
dwEncodingType,
  LPCWSTR 
pwszDll,
  DWORD 
dwFlags,
  void** 
ppvFuncAddr,
  HCRYPTOIDFUNCADDR* 
phFuncAddr
);

Parameters

hFuncSet

[in] Handle previously obtained from a call to the CryptInitOIDFunctionSetfunction.

dwEncodingType

[in] Specifies the encoding type to be matched. Currently, only X509_ASN_ENCODING is used; however, additional encoding types may be added in the future.

pwszDll

[in] Optional. Set to NULL.

dwFlags

[in] Reserved for future use and must be set to zero.

ppvFuncAddr

[out] Pointer to the return function's address. If the function fails, a NULL is returned in the ppvFuncAddrparameter.

phFuncAddr

[in, out] On the first call to the function, this parameter must be NULL to acquire the first installed function.

When this function is successful, this parameter is set to a function handle. The function's handle reference count is incremented.

After the first call to the function, this parameter is set to the pointer returned by the previous call. This input pointer is always freed within the function through a call to the CryptFreeOIDFunctionAddressfunction by this function. The call to free the pointer is always made even if the main function returns an error

A non-NULL phFuncAddrparameter must be freed either through a call to the CryptFreeOIDFunctionAddressfunction or by being passed back as input to this function or as input to the CryptGetOIDFunctionAddressfunction.

Return Value

If the function succeeds, the return value is nonzero, or TRUE.

If the function fails, the return value is zero, or FALSE.

Remarks

The desktop operating system supports the flag PKCS_7_ASN_ENCODING, but Windows Embedded CE does not and ignores the flag when it is specified.

Requirements

Header wincrypt.h
Library crypt32.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also