Unload v1.0c
Copyright  1992, by Mike Sax
Compuserve: 75470,1403
Tel: +3237663264
Fax: +3237781405
Mail:  Callaertstraat 23 
	   B9100 Sint-Niklaas
	   Belgium

Contents
--------

- About Unload
- When you might need Unload
- The "PLEASE INSERT THE DISK WITH TOOLHELP.DLL INTO DRIVE A:" message
- The "CALL TO UNDEFINED DYNALINK" message
- The list of libraries and tasks
- Methods to unload
- Obtaining source code

About Unload
------------

Unload is a small programmer's utility that lets you remove any Windows
program or dynamic link library from memory.  It can be useful when you
are developing a Windows program or DLL that has a problem with getting
unloaded. Instead of having to exit Windows to remove the module from
memory, you can just use unload and recompile.

When you might need Unload
--------------------------

Basically, Unload is only useful when you have a library or program that 
you can't remove with the "standard" user's methodes, like selecting "End
 Task" option in the task list, or closing the app's Window.  This  could 
occur if a library's usage count is higher than zero, but the app that 
is using it was terminated, or you have an Application that doesn't 
have any visible Windows.

The "PLEASE INSERT THE DISK WITH TOOLHELP.DLL INTO DRIVE A:" message
--------------------------------------------------------------------

To get a list of all libraries and modules, Unload uses the Microsoft
ToolHelp DLL, which is also distributed in the Dr. Watson diagnostics
program.  If you don't have toohelp.dll on your system, you can obtain
Dr. Watson from Microsoft, or download it from Compuserve and most other
bulletin board systems.

The ToolHelp.Dll file should be either in the same directory as 
unload.exe, or it should be in a directory that is in your current path. 
If it isn't, you'll get the error message described above.

The "CALL TO UNDEFINED DYNALINK" message
----------------------------------------

The original toolhelp that was distributed with Microsoft's Dr. Watson
is different from the latest version of toohelp.dll.   If you receive this
message, it means that you don't have the latest version.


The list of modules
-------------------

Unload displays a list of all modules (programs and DLL's) that are 
loaded in your system.  Since fonts and drivers are also DLL's they are 
also in the list.  Programs are displayed in uppercase, DLL's are in 
lowercase.

When you select a module, Unload will display a little information about 
it, like the usage count, wether it's a library or a program, the module's 
filename and the module handle.

Methods to unload
-----------------

There's only one method to unload a DLL: decrease the module's usage 
count. If you want to unload a program, you can use any of three methods.  
You can:
 1) Post a WM_QUIT message to the application, which is like calling the
	PostQuitMessage function inside the applicaton ;
 2) Post a WM_CLOSE message to all the applications's main windows, even
	if they are invisible ; or
 3) Terminate the application.  Terminating the application is the most
	drastic and is as if an unrecoverable application error would occur.

Posting WM_CLOSE is the "softest" method to unload an application, and 
it's also used by the task manager (although the task manager won't find 
any invisible windows).  Posting WM_QUIT is also quite "soft", because 
it gives the application the oppertunity to do any clean up after its 
main message loop.  Terminating the application is the most drastic 
measure and it will immediately terminate the application.  You  should 
only use this when absolutely necessary.

Obtaining Source Code
---------------------
Because as of this writing Microsoft has not published any  documentation 
about the ToolHelp API, Unload's source code cannot be  included.  If 
you'd like to have it, send me a message on Compuserve  (75470,1403) and 
I'll send it to you as sooon as the ToolHelp API is made public.
