Board index » delphi » Shutting down a Com server without shutting down the client

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

 

Re:Shutting down a Com server without shutting down the client


If you want to get rid of the warning message, set ComServer.UIInteractive
:= False. Discussed in lesson #2 in the step by step tutorial on my site.

--
have fun
Binh Ly
www.techvanguards.com

Quote
"Larry" <lkil...@charter.net> wrote in message news:3b203bbe$1_2@dnews...

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

Other Threads