Hello,
I have a doubt regarding DLLs - Can we free (unload) a dynamic loaded
library(DLL) in the debug environment.
Environment
- A simple exe is trying to load a DLL which has 1 or 2 sample
functions using LoadLibrary ().
- Make a call to any of the sample functions.
- Try freeing the library using FreeLibrary ()
While executing the executable from the IDE environment without debugger
enabled, the
above mentioned operations succeeds, but while debugging, freelibrary () is
crashing.
Any details why such a thing is happenning?
TIA
Venky
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Try this (fairly simplistic) approach:
HINSTANCE hDll;
// Load your library
//
if ((hDll = LoadLibrary (“MyLibrary”)) == NULL)
printf (“ERROR: Cannot load MyLibrary.dll.”);
else
{
// Do your stuff
//
// (…)
// Free your library
//
if (hDll != NULL) // Avoid FreeLibrary(NULL)…
FreeLibrary (hDll);
}
Miguel Monteiro
(mail signature “under construction”…)
On Tuesday, July 03, 2001 1:46 PM “Varadan Venkatesh” wrote:
Hello,
I have a doubt regarding DLLs - Can we free (unload) a dynamic loaded
library(DLL) in the debug environment.
Environment
- A simple exe is trying to load a DLL which has 1 or 2 sample
functions using LoadLibrary ().
- Make a call to any of the sample functions.
- Try freeing the library using FreeLibrary ()
While executing the executable from the IDE environment without
debugger enabled, the above mentioned operations succeeds, but
while debugging, freelibrary () is crashing.
Any details why such a thing is happenning?
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com