CoFreeUnusedLibraries

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function unloads any DLLs that are no longer in use and that, when loaded, were specified to be freed automatically.

Syntax

void CoFreeUnusedLibraries();

Parameters

None.

Return Value

None.

Remarks

Applications can call CoFreeUnusedLibraries periodically to free resources. It is most efficient to call it either at the top of a message loop or in some idle-time task. DLLs that are to be freed automatically have been loaded with the bAutoFree parameter of the CoLoadLibrary function set to TRUE. CoFreeUnusedLibraries internally calls DllCanUnloadNow for DLLs that implement and export that function.

Passing into this function any invalid and, under some circumstances, NULL pointers results in unexpected termination of the application.

To determine whether the platform supports this function, see Determining Supported COM APIs.

Requirements

Header objbase.h
Library ole32.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

CoLoadLibrary
DllCanUnloadNow