Board index » delphi » Shutting down a Com server without shutting down the client
Larry
![]() Delphi Developer |
Tue, 25 Nov 2003 10:43:11 GMT
Shutting down a Com server without shutting down the client
I have a question that seems so simple, I am embarrassed to ask. I have made (actually updated from D-2 type Ole) several automation Com servers. These are essentially support applets for a core application. I want my user to be able to start one or more of them up, perform various tasks and then shut them down like any other application. Right now, if I attempt to shut a server down, I get the warning that a client is still running, yada, yada, yada. And of course it is true for the client is the core application that has called for the server. I have tried using Disconnect and with some sucess but I am not sure where to place it and when I should set it off. Should I test for the Clients WM_Quit? Or use the OnLastRelease (which would not be reached?). Is this a mis-use of a Com object? Surely I am missing something obvious here. TIA |