Re: Service / Application mode



No.

AFAIK there is no such API. the only ways to do this are a command line
switch and detecting the failure of StartServiceCtrlDispatcher

"supportdev" <supportdev@xxxxxxxxxxxxxxxxx> wrote in message
news:1C37B452-D779-4A64-A098-2BCF7B04FB21@xxxxxxxxxxxxxxxx
Yes the application is written to be either run and installed as a service
or
a normal application. The problem is how to understand from where it was
called while it is starting. Was it Started as a service or as a normal
application. We could have used command line switch but we do not like
much
the idea.

The StartServiceCtrlDispatcher API call blocks until the service is
running,
so we cannot use it to detect the mode (as service or normal application),
because we are using a 3rd party library for service handling. This
library
already implements StartServiceCtrlDispatcher so we cannot call it before
ourselves.

Is there any other API call which we can call just to detect/test the mode
not call the dispatcher?

Thanks in advance

Regards

Charles Mifsud
Shireburn Software Ltd.


"Arkady Frenkel" wrote:

Normal application can't be service unless you wrap it with ServAny.exe
or
some other kind of shell which
utilize service functionality
Arkady

"supportdev" <supportdev@xxxxxxxxxxxxxxxxx> wrote in message
news:E383231B-88E8-4E9E-BC46-10C0F48DF2D7@xxxxxxxxxxxxxxxx
How can I understand that application was started as a service or a
normal
application. I need to support both modes of operation.

Any ideas?

Thanks in advance

Regards

Charles Mifsud
Shireburn Software Ltd.





.



Relevant Pages

  • Re: Netbeans doesnt recognise compiler options ?
    ... I have the same issue trying to find an API that is depreciated in either ... I have found where to add the switch in the ... > Hi there I am using Netbeans 4.0 on windows XP. ... > notes (i.e. the compiler is recognising the switch): ...
    (comp.lang.java.programmer)
  • Re: Netbeans doesnt recognise compiler options ?
    ... I have the same issue trying to find an API that is depreciated in either ... I have found where to add the switch in the ... > Hi there I am using Netbeans 4.0 on windows XP. ... > notes (i.e. the compiler is recognising the switch): ...
    (comp.lang.java.help)
  • Re: Netbeans doesnt recognise compiler options ?
    ... I have the same issue trying to find an API that is depreciated in either ... I have found where to add the switch in the ... > Hi there I am using Netbeans 4.0 on windows XP. ... > notes (i.e. the compiler is recognising the switch): ...
    (comp.lang.java.softwaretools)
  • Re: API for detection of multiple CPUs
    ... > Does anyone know if there is an API for detecting how many CPUs are ... I am after a way of programmatically determining whether or ...
    (comp.os.linux)
  • Re: API for detection of multiple CPUs
    ... > apm wrote: ... >> Does anyone know if there is an API for detecting how many CPUs are ...
    (comp.os.linux)