home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / mswindo / programm / misc / 4435 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.8 KB  |  37 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!microsoft!hexnut!blakeco
  3. From: blakeco@microsoft.com (Blake Coverett)
  4. Subject: Re: Force DLL to unload
  5. Message-ID: <1992Dec22.205303.21411@microsoft.com>
  6. Date: 22 Dec 92 20:53:03 GMT
  7. Organization: Microsoft Canada Inc.
  8. References: <DEREKL.92Dec18100741@watson.harlqn.co.uk> <1992Dec18.144024.14800@twisto.eng.hou.compaq.com> <flc.724728723@poseidon>
  9. Lines: 26
  10.  
  11. In article <flc.724728723@poseidon> flc@mips.com (Fred Cox) writes:
  12. >mccreary@sword.eng.hou.compaq.com (Ed McCreary) writes:
  13. >>In article <DEREKL.92Dec18100741@watson.harlqn.co.uk> derekl@harlqn.co.uk (Derek Law) writes:
  14. >>>Does anybody know how to FORCE Windows 3.1 to unload a DLL? I'm
  15. >>>developing a DLL, but every time I change it I have to quit and
  16. >>>restart Windows - otherwise Windows complains that the file is "still
  17. >>>in use" and so write protected.
  18. [description of calling FreeLibrary correctly deleted]
  19. >That works for when your DLL works, but when you get a UAE, the thing
  20. >doesn't get FreeLibraried, and you're hosed.
  21. >
  22. >As you can tell, I've been annoyed by the same problem.
  23.  
  24. The MSDN CD has an "unsupported tool" on it called WPS that amongst
  25. other things allows you to free an arbitrary DLL.  I suspect this tool
  26. may also be available on the MS BBS.  (I don't know this for sure.)
  27. If you don't have easy access to a tool like this it is probably worth
  28. the 20 minutes it would take to hack together a minimal utility to do
  29. this on your own.  You can walk the module list with ModuleFirst and
  30. ModuleNext and drop them in a listbox, then in response to a double-click
  31. on this listbox you can call FreeLibrary GetModuleUsage times.
  32.  
  33. -Blake (insert prefered seasonal wishes here)
  34. -- 
  35. #include <std/disclaimer.h>                       blakeco@microsoft.com
  36. Mail Flames, Post Apologies.                      ...!uunet!microsoft!blakeco
  37.