How to force dll (dsetup.dll) to unload if ref count > 0 ?
Posted on 1998-08-03
Is there any way to explicitly remove a loaded library
other than using FreeLibrary?
Heres my problem:
The problem arrose an anoying problem with DSETUP.dll on multi CD installs.
I have a setup program which installs DirectX. I used
and then called FreeLibary(hDSetupDLL) when done.
Unfortunatly despite doing this DSETUP.DLL & DSETUP32.DLL
are still mapped and alledgedly referenced after I call
FreeLibrary. This would be okay if it were not for the
fact that user later changes to another CD. Then when my
setup exe terminates, I get a blue screen telling me to
insert the other CD again.
Note the problem only arrises IF I call the exported function DirectXSetup. This appears to increase the
ref count to 2 so when I call my FreeLibary the dll
Any ideas how?