Zed Martins Guest
|
Posted: Mon Oct 10, 2005 2:09 pm Post subject: stop running DLL with Borland Socket Server |
|
|
We have an application that uses ActiveX Libraries (COM+ DLLs) that can be either installed on COM+ (Component Services MMC) or registered using regsvr32 (including on Windows 95, 98, 2000, XP, etc...). We use Borland Socket Server from Delphi 6.
When using COM+, we can shutdown one single DLL to update the file without stopping the other DLLs. To do so we can stop the application on Component Services MMC or stop the DLLHOST.EXE process that is associated with the DLL we want to update.
When using the DLLs registered with regsvr32, we can't stop the whole process since all DLLs are running under the same scktsrvr.exe process. So, I'm thinking about changing the Socket Server to include some way to unload just one DLL... Can someone help me with that? Any sugestions?
I've tried to use GetModuleHandle to check if the DLL is running and if so call FreeLibrary or CoFreeLibrary to unload it. It works, I can unload it, but sometimes, when I try to load it again, I'm getting a "Server threw an exception" error when the Socket Server calls CoCreateInstance...
Please, any help will be great!!!
Z.
|
|