Board index » cppbuilder » NT Services/Service Application

NT Services/Service Application

Can anyone provide some insight/web links/articles explaining how to create
a service application with multiple services in it.

I am experiencing trouble controlling the second service added to the
application.

Ultimately need to have all services dependant on a master service running.
So could use advice on the easiest way to make use of TService (and whatever
else) in Builder5 to handle the control req's.

Need to start the master to start all others.  Similarly, shut down any one
independantly, or stop the master to stop all others if still running.

Did this the hard way with MS VC++ using straight Win32 API's and the
registry.  Would much prefer to use some canned class functionality.

Any articles, links, etc... would be appreciated.

Thanks,
Tom Stratford

 

Re:NT Services/Service Application


You probably want to create one master service and spawn threads,
perhaps with PsCreateSystemThread() or any one of the other thread
API's that make sense.

If you only need user-level code you can just use _beginthreadex(..)
for each thread, make a non-gui application, and use the tool in the
resource toolkit to 'run it as a service', which works pretty well and
thus hides all the service related startup/shutdown stuff.

DMU

Quote
"Tom Stratford" <tst...@lvcm.com> wrote in message news:3a6642e8_2@dnews...
> Can anyone provide some insight/web links/articles explaining how to
create
> a service application with multiple services in it.

> I am experiencing trouble controlling the second service added to the
> application.

> Ultimately need to have all services dependant on a master service
running.
> So could use advice on the easiest way to make use of TService (and
whatever
> else) in Builder5 to handle the control req's.

> Need to start the master to start all others.  Similarly, shut down any
one
> independantly, or stop the master to stop all others if still running.

> Did this the hard way with MS VC++ using straight Win32 API's and the
> registry.  Would much prefer to use some canned class functionality.

> Any articles, links, etc... would be appreciated.

> Thanks,
> Tom Stratford

Other Threads