Regarding Windows Service

Posted on 2003-02-20
Medium Priority
Last Modified: 2013-11-20
Hi, i have to create a windows service.
And how can i make my application communicate with this service.


Question by:hydvcman
  • 2

Expert Comment

ID: 7991947

For making a true service , you can call some api's to register it as a service and handle control signals from the SCM (this is a bit difficult compared to the other option but provides more flexibility and troubleshooting options) SEE

Expert Comment

ID: 7991951
another option wud be
to create a WinNT Service for an exe using the Win API
CreateService Function. But you also will have to associate a Control Handler with the Service to take care of any tasks when the Service is executing.

Accepted Solution

WinFun earned 200 total points
ID: 7994657
I just finished writing an NT Service that required lots of control from a separate client program. The solution? I put a COM object in the Service and the client program can call the service all it wants. It works great!

See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample98/html/vcsmpdcomcallcomobjectinntservicefrommultipleclients.asp for Microsoft's example of how to do this.

The DrawServ is the NT Service and ATLDraw is the client program.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

616 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question