🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #1781

Re: Force DLL to unload

#1781
From: Blake Coverett
Date: Tue, 22 Dec 1992 20:53
26 lines
1913 bytes
In article <flc.724728723@poseidon> flc@mips.com (Fred Cox) writes:
>mccreary@sword.eng.hou.compaq.com (Ed McCreary) writes:
>>In article <DEREKL.92Dec18100741@watson.harlqn.co.uk> derekl@harlqn.co.uk (Derek Law) writes:
>>>Does anybody know how to FORCE Windows 3.1 to unload a DLL? I'm
>>>developing a DLL, but every time I change it I have to quit and
>>>restart Windows - otherwise Windows complains that the file is "still
>>>in use" and so write protected.
[description of calling FreeLibrary correctly deleted]
>That works for when your DLL works, but when you get a UAE, the thing
>doesn't get FreeLibraried, and you're hosed.
>
>As you can tell, I've been annoyed by the same problem.

The MSDN CD has an "unsupported tool" on it called WPS that amongst
other things allows you to free an arbitrary DLL.  I suspect this tool
may also be available on the MS BBS.  (I don't know this for sure.)
If you don't have easy access to a tool like this it is probably worth
the 20 minutes it would take to hack together a minimal utility to do
this on your own.  You can walk the module list with ModuleFirst and
ModuleNext and drop them in a listbox, then in response to a double-click
on this listbox you can call FreeLibrary GetModuleUsage times.

-Blake (insert prefered seasonal wishes here)
-- 
#include <std/disclaimer.h>                       blakeco@microsoft.com
Mail Flames, Post Apologies.                      ...!uunet!microsoft!blakeco
Technical Details
Message-ID: <1992Dec22.205303.21411@microsoft.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!microsoft!hexnut!blakeco
References: <DEREKL.92Dec18100741@watson.harlqn.co.uk> <1992Dec18.144024.14800@twisto.eng.hou.compaq.com> <flc.724728723@poseidon>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!microsoft!hexnut!blakeco
From: blakeco@microsoft.com (Blake Coverett)
Subject: Re: Force DLL to unload
Message-ID: <1992Dec22.205303.21411@microsoft.com>
Date: 22 Dec 92 20:53:03 GMT
Organization: Microsoft Canada Inc.
References: <DEREKL.92Dec18100741@watson.harlqn.co.uk> <1992Dec18.144024.14800@twisto.eng.hou.compaq.com> <flc.724728723@poseidon>
Lines: 26