Board index » delphi » Running DCOM-Server without client

Running DCOM-Server without client

I have to problems / questions:

1, My Server-Application have a long-duration job to work after he was
called by a client. (The call returns immediatly so that the client isn't
locked). The Server should't close when the client close, so
that the Server can finish the job befor terminating?

2, I need a DCom-Server as a NT-Service or NT-Service which implements a
DCom-Interface?

Is this possible with Delphi 4 Professional (Update Pack #3)?

 

Re:Running DCOM-Server without client


Quote
> 1, My Server-Application have a long-duration job to work after he was
> called by a client. (The call returns immediatly so that the client isn't
> locked). The Server should't close when the client close, so
> that the Server can finish the job befor terminating?

I would call IMyAutomationInterface._AddRef() at the beginning of your
processing job, then when the client disconnects your automation interface's
reference count won't reach zero, but remember to call
IMyAutomationInterface._Release() when your server
is finished it's tasks or the Automation server won't ever quit and your server
won't ever terminate. YOu could design it so that the service only stops when
you stop the NT service (IE at machine shutdown).

Quote
> 2, I need a DCom-Server as a NT-Service or NT-Service which implements a
> DCom-Interface?

You must have Delphi 4 professional.  Then read this page:
http://www.castle.net/~bly/Programming/Delphi/Intro.htm

Warren

Other Threads