Board index » delphi » Service interact with DCOM

Service interact with DCOM

Hi all,

I try to control a DCOM enabled program from a service. In the service I
have the same function to get the interface as in a normal application...

(
// global vars
var
  MyXYZ : IControl;

// creation of main
  MyXYZ := CoControl.Create;  // here the service dies
)

... but the service will definitife die.

Are there any special circumstances to use DCOM from within a service ????

TNX
Marian

 

Re:Service interact with DCOM


I have to make a completion to the last words:

If the application is running before I start the service (which will use the
application) the service dies.
If the application is NOT running before I start the service, the
applications comes up and works well - I think I'm stupid - but could THAT
be reality?

TNX
Marian

Re:Service interact with DCOM


What happens if you check the Interact with Desktop option for your service?

--
Binh Ly
http://www.techvanguards.com

Quote
"Marian Wendt" <Marian.We...@inca-gmbh.de> wrote in message

news:93vkdk$q2o$04$1@news.t-online.com...
Quote
> I have to make a completion to the last words:

> If the application is running before I start the service (which will use
the
> application) the service dies.
> If the application is NOT running before I start the service, the
> applications comes up and works well - I think I'm stupid - but could THAT
> be reality?

> TNX
> Marian

Re:Service interact with DCOM


Hi Binh, tnx for your reply,

this option (Interact with desktop) was allways set to active (I need this
to show a form in the development phase of my project to show some data in a
form for debug purposes). So I think - that is not the problem.

My knowledge in COM isn't good enougth to analyse the situation complete.
But what I imagine is, that the application don't allow a nmew COM client
under different circumstances (is that posible??). For completeness I must
say that the application isn't my own creation :) so I could not analyse it
in detail.

TNX
Marian

Quote
> What happens if you check the Interact with Desktop option for your
service?

> --
> Binh Ly
> http://www.techvanguards.com

> "Marian Wendt" <Marian.We...@inca-gmbh.de> wrote in message
> news:93vkdk$q2o$04$1@news.t-online.com...
> > I have to make a completion to the last words:

> > If the application is running before I start the service (which will use
> the
> > application) the service dies.
> > If the application is NOT running before I start the service, the
> > applications comes up and works well - I think I'm stupid - but could
THAT
> > be reality?

> > TNX
> > Marian

Other Threads