🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Force DLL to unload

#2033
From: Fred Cox
Date: Sat, 19 Dec 1992 01:32
35 lines
1638 bytes
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.
>>

>How are you loading it?  Try this...

>HINSTANCE	hLib;

>hLib = LoadLibrary("MY.DLL");
>....program code....
>FreeLibrary(hLib);

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 _really_ annoying thing, though was the first time I came upon
this problem was with Borland, and there was no error message on
linking.

It appeared to link and generate a new .dll, but it was actually doing
nothing!  None of my fixes worked, and it was only when I noticed that
the date on the .dll file wasn't changing that I realized what was
going on.

There, I've got that off my chest, I feel better.

Fred Cox
flc@mti.sgi.com
Technical Details
Message-ID: <flc.724728723@poseidon>
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!ames!sgi!mips!poseidon!flc
References: <DEREKL.92Dec18100741@watson.harlqn.co.uk> <1992Dec18.144024.14800@twisto.eng.hou.compaq.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!ames!sgi!mips!poseidon!flc
From: flc@mips.com (Fred Cox)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Force DLL to unload
Date: 19 Dec 92 01:32:03 GMT
Organization: Silicon Graphics, Inc.
Lines: 35
Distribution: world
Message-ID: <flc.724728723@poseidon>
References: <DEREKL.92Dec18100741@watson.harlqn.co.uk> <1992Dec18.144024.14800@twisto.eng.hou.compaq.com>
NNTP-Posting-Host: poseidon.mti.sgi.com