function DllCanUnloadNow: HResult;
Tells Windows whether it can unload the in-process server exporting this function.
Do not call DllCanUnloadNow directly. DllCanUnloadNow is exported by ActiveX servers (DLLs) and is called by the operating system to indicate whether the server can be unloaded from memory because it is no longer in use. A DLL is no longer in use when it is not managing any existing objects (the reference count on all of its objects is 0).
The return values for DllCanUnloadNow are as follows:
The DLL can be unloaded.
The DLL cannot be unloaded now.
Note: DllCanUnloadNow is one of four functions in the Comserv unit that every in-process ActiveX server must export so that Windows can manage the server resources properly. The others are DllGetClassObject, DllRegisterServer, and DllUnregisterServer.