|
-
Apr 15th, 2001, 10:00 PM
#1
Thread Starter
New Member
I'm writing a small application based around a free 3rd party DLL. The DLL is, unfortunately, not very well designed and so has a serious issue with VB, as follows:
The DLL expects to have its Initialize() function called immediately after loading. It must be called once (and only once) before unloading the DLL. This is normally not a problem: I simply make sure in my Sub Main that the Initialize function is the first function I call from that DLL, forcing it to be loaded and initialized in one step.
The problem is that when my application has finished running and exits, somehow the DLL is never unloaded from memory. I know this because when I run the application again, the Initialize call fails. This will continually fail until I reboot, and then the program will work again, but only once before requiring another reboot, etc.
Please note that this is while in the IDE, I have not been able to test this in a compiled EXE do to another (unrelated) issue.
So, my question at long last --
Is there any way to force a DLL to be unloaded from memory?
Anything, ranging from Win32 API calls to undocumented VB functions to voodoo chants and prayers will do. The only thing that is not an option is recoding the DLL, which would otherwise be the obvious solution.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|