This topic has not yet been rated - Rate this topic

CryptFreeOIDFunctionAddress function

Applies to: desktop apps only

The CryptFreeOIDFunctionAddress function releases a handle returned by CryptGetOIDFunctionAddress or CryptGetDefaultOIDFunctionAddress by decrementing the reference count on the function handle. In some cases, the DLL file associated with the function is unloaded. For details, see Remarks.

Syntax

BOOL WINAPI CryptFreeOIDFunctionAddress(
  __in  HCRYPTOIDFUNCADDR hFuncAddr,
  __in  DWORD dwFlags
);

Parameters

hFuncAddr [in]

Handle of the function previously obtained from a call to CryptGetOIDFunctionAddress or CryptGetDefaultOIDFunctionAddress.

dwFlags [in]

Reserved for future use and must be zero.

Return value

If the function succeeds, the function returns nonzero (TRUE).

If the function fails, it returns zero (FALSE).

Remarks

If the reference count becomes zero and a DLL is loaded for the function being freed, the DLL might be unloaded. If the DLL exports the DLLCanUnloadNow function, that function is called and its return is checked. An S_FALSE return from this function cancels the unloading of the DLL at this time. If the function returns S_TRUE or if the DLL does not export the DLLCanUnloadNow function, an unloading process is started. In this case, actual unloading is deferred for 15 seconds. If another CryptFreeOIDFunctionAddress or CryptGetDefaultOIDFunctionAddress that requires the DLL occurs before the 15 seconds elapse, the deferred unload process is canceled.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Wincrypt.h

Library

Crypt32.lib

DLL

Crypt32.dll

See also

CryptGetDefaultOIDFunctionAddress
CryptGetOIDFunctionAddress
DLLCanUnloadNow
OID Support Functions

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ