?
Solved

Regarding Windows Service

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

thanks

0
Comment
Question by:hydvcman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 

Expert Comment

by:nanden
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
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndllpro/html/msdn_ntservic.asp
HTH,
0
 

Expert Comment

by:nanden
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.
HTH.
0
 

Accepted Solution

by:
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.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month8 days, 14 hours left to enroll

764 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