Managing a com-server
From: Dirk Hennings (dhennings_at_gmx.de)
Date: 03/31/04
- Next message: Joe: "Re: Flicker-free JPG images - How?"
- Previous message: Maarten Wiltink: "Re: How do I use a parameter/variable/string literal as an identifier?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 31 Mar 2004 12:50:18 +0200
Hi,
I'm working with a few client-applications that are communicating with my
out-of-process com-server.
My com-server uses the following initialization:
TAutoObjectFactory.Create(ComServer, TCentral, CLASS_Central,
ciMultiInstance , tmApartment);
In the clients i use the following to contact the server:
try
ComServer := CoCentral.Create;
except end;
While Cocentral.create my client-application hangs.
While trying to do this in a thread i realized that somehow I can only use
the com-server in the thread I called cocentral.create, so I couldn't do
that.
Instead I made a splash-screen while the application is loading showing that
my application is still running and the user isn't confused.
Is this the only way?
Or: is this the best way?
Now I want multiple clients to connect to my server.
My server can handle multiple clients internally, so that I used
ciMultiInstance and tmApartment.
This seems to work.
When the clients are not longer running I want the server to decide whether
so terminate oder keep on running.
How can I manage to do this?
Right now my server is terminated when the last client is terminated.
3rd problem: what about those ugly error-messages like "the rpc-server is no
longer available"
Even with try-except-block.
How should this be done elegantly so that the user isn't confused or thinks
of a major bug?
Thanks for the help in advance
Dirk
- Next message: Joe: "Re: Flicker-free JPG images - How?"
- Previous message: Maarten Wiltink: "Re: How do I use a parameter/variable/string literal as an identifier?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|