Click here to Skip to main content
Licence 
First Posted 16 Mar 2003
Views 79,130
Downloads 1,377
Bookmarked 43 times

Service wizard

By Dudi Avramov | 21 Jan 2004
Service wizard integrated with the Visual Studio IDE.
7 votes, 36.8%
1
2 votes, 10.5%
2

3
3 votes, 15.8%
4
7 votes, 36.8%
5
3.05/5 - 19 votes
μ 2.63, σa 3.22 [?]

Introduction

Service applications always have the same skeleton. Therefore, it would be nice to have a service wizard integrated with the Visual Studio IDE (Integrated Development Environment).

My service wizard was created by the "Custom Wizard" project type. Its output is an AWX file that should be copied to <Visual Studio directory>\Common\MSDev98\Template folder.

Therefore, when creating service projects, choose "Service Wizard" from the project type list.

One wizard step

As seen from the image above, there are 3 parameters for service installation:

  1. Displayed service name - This is the text that will be displayed when opening the service control manager.
  2. Startup type.
  3. Should the service interact with the desktop?

Install and uninstall your service

The wizard writes down code for installing and uninstalling your service. Running your executable with the '/Install' or '/Uninstall' parameter will install or uninstall the service, respectively.

Debugging your service

Since the created project (by the wizard) is a console application, you can debug your service as if it were just a console application and not a service.

TO DO ...

Your application code should be in the method Run() located in service.cpp file. Look for the comment // TO DO: Add code here. This is the place where the service is running.

Updates

  • 9.Apr.2003 - Send WM_QUIT message on service stop request.
  • 18.Jan.2004 -
    1. Start the service automatically when the service is installed and defined to have automatic startup.
    2. Wait for the service to be stopped when uninstalling the service.

Enjoy...

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Dudi Avramov

Web Developer

Israel Israel

Member


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralThe servise does not working on Vista Pinmembercoronys21:19 20 May '09  
QuestionWhat is .awx file? PinmemberG Haranadh9:46 30 Aug '05  
AnswerRe: What is .awx file? PinmemberDudi Avramov2:32 1 Sep '05  
GeneralRe: What is .awx file? PinmemberG Haranadh10:55 1 Sep '05  
QuestionService description? PinsussUnimportant user with important question11:29 16 Jun '05  
GeneralDifference between wizards PinmemberSoron6:01 26 Jan '04  
GeneralRe: Difference between wizards Pinmembermilkyhonglee4:39 3 Mar '06  
GeneralThis is a trash, at least 80%+ are trash PinsussAnonymous5:44 22 Jan '04  
GeneralRe: This is a trash, at least 80%+ are trash PinmemberDudi Avramov10:00 22 Jan '04  
GeneralRe: This is a trash, at least 80%+ are trash PinmemberSoron6:06 26 Jan '04  
GeneralNot working and stoping PinmemberAji Varghese23:20 6 Nov '03  
GeneralRe: Not working and stoping PinmemberAji Varghese20:23 23 Dec '03  
GeneralLogEvent... PinmemberMatt Newman8:02 12 May '03  
GeneralRe: LogEvent... PinmemberDudi Avramov22:31 12 May '03  
GeneralRe: LogEvent... PinmemberMatt Newman5:02 13 May '03  
QuestionVC7? PinmemberMatt Newman17:39 9 May '03  
AnswerRe: VC7? PinmemberDudi Avramov22:05 10 May '03  
GeneralRe: VC7? PinmemberMatt Newman4:49 11 May '03  
GeneralNot a good service skeleton PinmemberWout Louwers21:56 6 Apr '03  
GeneralRe: Not a good service skeleton PinmemberDudi Avramov4:20 7 Apr '03  
GeneralRe: Not a good service skeleton PinmemberWout Louwers4:31 7 Apr '03  
GeneralRe: Not a good service skeleton PinmemberDudi Avramov22:02 7 Apr '03  
GeneralRe: Not a good service skeleton PinmemberWout Louwers22:13 7 Apr '03  
GeneralRe: Not a good service skeleton PinmemberDudi Avramov2:39 8 Apr '03  
GeneralRe: Not a good service skeleton PinmemberWout Louwers3:15 8 Apr '03  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120210.1 | Last Updated 22 Jan 2004
Article Copyright 2003 by Dudi Avramov
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid