Board index » delphi » Keeping OLE server running

Keeping OLE server running

Hi,

   I think I've seen a couple of messages in this section regarding
having a client call a server program that was not currently running and
then keeping that program loaded in the background after the initial
call.  I don't remember how this worked, but I need to work something
like that with a current project.  It seems the server executable take a
while to load and start.  With users calling one of its functions
serveral times, it can be a real pain.  Can anyone refresh my memory on
how or if this can be done ?

Tom T.
TTur...@worldnet.att.net

 

Re:Keeping OLE server running


Quote
In article <34DB70B4.18116...@worldnet.att.net>, Thomas Turney wrote:
> and > then keeping that program loaded in the background after the >

initial call.

The server will remain open as long as your Delphi program has a
variable that references it.  You probably has a line of code that
calls CreateOLEObject or CoCreateXXXX and assigns the result to a
variable.  Move that variable to the main form, so it stays allocated
for the life of your program.   When the form is destroyed, Delphi will
close the server.

Other Threads