This NT service app wizard is based on the CNTService class. It simply adds a framework to this class and sets up your
project. You only need to fill out some method bodies (have a look for those TODO: comments lurking around).
You’re newly created service accepts the following command line switches:
-i |
|
Install the service. After you’ve called your service with this switch, it should exist in Services |
|
-l account |
The service shall run under the given account. This option is only useful with -i together. An |
|
-p password |
The password for the account of the -l flag above. There is a security hazard here, because the |
-u |
|
Uninstall the service. If the service is currently running, then stop it first. |
-s |
|
Start the service. The service must be installed before you can start it. Note that you cannot use |
-e |
|
End a currently running service. |
-d |
|
Debug the service. This starts the service as a console application for easier debugging. You can |
-f |
|
Start service as a faceless application (Win95/98 mode). This flag is implicitly set under |
Note that this is a Visual C++ 6 Project. If you want to use the wizard for VC 5, you have to build a VC 5 project. The
source itself should be compatible (but I’ve not tested this).
Download wizard – 65 KB (copy the content of this file to <VisualStudioInstallDir>\Common\MSDev98\Template)
Date Last Updated: February 5, 1999