CryptFreeOIDFunctionAddress

The CryptFreeOIDFunctionAddress function releases the handle that was incremented and returned by CryptGetOIDFunctionAddress or CryptGetDefaultOIDFunctionAddress. If a Dll was loaded for the function being freed, then it is unloaded. However, before doing the unload, the DllCanUnloadNow function exported by the local Dll is called. It should return S_FALSE to inhibit the unload or S_TRUE to enable the unload. If the Dll doesn't export DllCanUnloadNow, the Dll is unloaded. DllCanUnloadNow has the following signature:

STDAPI DllCanUnloadNow(void);

#include <wincrypt.h>
BOOL WINAPI CryptFreeOIDFunctionAddress(
  HCRYPTOIDFUNCADDR hFuncAddr,  // in
  DWORD dwFlags                 // in
);
 

Parameters

hFuncAddr
Handle to the function address, previously obtained from a call to CryptGetOIDFunctionAddress or CryptGetDefaultOIDFunctionAddress
dwFlags
Flag values. This parameter is reserved for future use and should be set to zero in the interim.

Return Values

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

Call GetLastError to see the reason for any failures.

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.