home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_tools / unload / unload.txt < prev   
Text File  |  1992-04-09  |  4KB  |  100 lines

  1. Unload v1.0c
  2. Copyright ⌐ 1992, by Mike Sax
  3. Compuserve: 75470,1403
  4. Tel: +3237663264
  5. Fax: +3237781405
  6. Mail:  Callaertstraat 23 
  7.        B9100 Sint-Niklaas
  8.        Belgium
  9.  
  10. Contents
  11. --------
  12.  
  13. - About Unload
  14. - When you might need Unload
  15. - The "PLEASE INSERT THE DISK WITH TOOLHELP.DLL INTO DRIVE A:" message
  16. - The "CALL TO UNDEFINED DYNALINK" message
  17. - The list of libraries and tasks
  18. - Methods to unload
  19. - Obtaining source code
  20.  
  21. About Unload
  22. ------------
  23.  
  24. Unload is a small programmer's utility that lets you remove any Windows
  25. program or dynamic link library from memory.  It can be useful when you
  26. are developing a Windows program or DLL that has a problem with getting
  27. unloaded. Instead of having to exit Windows to remove the module from
  28. memory, you can just use unload and recompile.
  29.  
  30. When you might need Unload
  31. --------------------------
  32.  
  33. Basically, Unload is only useful when you have a library or program that 
  34. you can't remove with the "standard" user's methodes, like selecting "End
  35.  Task" option in the task list, or closing the app's Window.  This  could 
  36. occur if a library's usage count is higher than zero, but the app that 
  37. is using it was terminated, or you have an Application that doesn't 
  38. have any visible Windows.
  39.  
  40. The "PLEASE INSERT THE DISK WITH TOOLHELP.DLL INTO DRIVE A:" message
  41. --------------------------------------------------------------------
  42.  
  43. To get a list of all libraries and modules, Unload uses the Microsoft
  44. ToolHelp DLL, which is also distributed in the Dr. Watson diagnostics
  45. program.  If you don't have toohelp.dll on your system, you can obtain
  46. Dr. Watson from Microsoft, or download it from Compuserve and most other
  47. bulletin board systems.
  48.  
  49. The ToolHelp.Dll file should be either in the same directory as 
  50. unload.exe, or it should be in a directory that is in your current path. 
  51. If it isn't, you'll get the error message described above.
  52.  
  53. The "CALL TO UNDEFINED DYNALINK" message
  54. ----------------------------------------
  55.  
  56. The original toolhelp that was distributed with Microsoft's Dr. Watson
  57. is different from the latest version of toohelp.dll.   If you receive this
  58. message, it means that you don't have the latest version.
  59.  
  60.  
  61. The list of modules
  62. -------------------
  63.  
  64. Unload displays a list of all modules (programs and DLL's) that are 
  65. loaded in your system.  Since fonts and drivers are also DLL's they are 
  66. also in the list.  Programs are displayed in uppercase, DLL's are in 
  67. lowercase.
  68.  
  69. When you select a module, Unload will display a little information about 
  70. it, like the usage count, wether it's a library or a program, the module's 
  71. filename and the module handle.
  72.  
  73. Methods to unload
  74. -----------------
  75.  
  76. There's only one method to unload a DLL: decrease the module's usage 
  77. count. If you want to unload a program, you can use any of three methods.  
  78. You can:
  79.  1) Post a WM_QUIT message to the application, which is like calling the
  80.     PostQuitMessage function inside the applicaton ;
  81.  2) Post a WM_CLOSE message to all the applications's main windows, even
  82.     if they are invisible ; or
  83.  3) Terminate the application.  Terminating the application is the most
  84.     drastic and is as if an unrecoverable application error would occur.
  85.  
  86. Posting WM_CLOSE is the "softest" method to unload an application, and 
  87. it's also used by the task manager (although the task manager won't find 
  88. any invisible windows).  Posting WM_QUIT is also quite "soft", because 
  89. it gives the application the oppertunity to do any clean up after its 
  90. main message loop.  Terminating the application is the most drastic 
  91. measure and it will immediately terminate the application.  You  should 
  92. only use this when absolutely necessary.
  93.  
  94. Obtaining Source Code
  95. ---------------------
  96. Because as of this writing Microsoft has not published any  documentation 
  97. about the ToolHelp API, Unload's source code cannot be  included.  If 
  98. you'd like to have it, send me a message on Compuserve  (75470,1403) and 
  99. I'll send it to you as sooon as the ToolHelp API is made public.
  100.