Custom AppWizard to Create MFC Based Windows NT Services
Normally a Windows NT Service is supposed to be a console win32 application. But this is not a restriction. In other words, you can write a Windows NT Service that uses Microsoft Foundation Classes. One way of writing such an application is that you start from a standard MFC based SDI, MDI or Dialog based application. But soon you will realize that there is a lot of code that is just useless or is extraneous to the project. You can obviously just ignore this code, but why have code in your application that you know is never going to be used? One alternative is to allow AppWizard to generate this extra code and then go in and manually remove the unnecessary code from your project. However, what if you want to write another such application? Well you could become expert in this 'Code Removing' process but it certainly wouldn't be a very effecient use of your time.
A better way would be to have a Custom AppWizard that does this automatically for you. I felt the need for such an AppWizard when I was writing my second Windows NT Service that needed to use MFC quite extensively. I created an MFC dialog-based application and then removed the extra code. Then, I added a new file to the project in which I added all the code that was necessary to make an application a Windows NT Service. I built the project and confirmed that it was working fine. After this I created a new project of type "Custom AppWizard". This project was based on my previously built project. I chose the "An existing project" option in the 'Step 1 of 2' and in 'Step 2 of 2' of the Wizard. I also specified the path of my previous project. After a few minor changes to the template files of the project I succeeded in creating a Custom AppWizard that could generate a project for a Windows NT Service and that would save me the time of manually removing unnecessary code every time I wanted to write a service.
Installation: Simply copy the NTService.awx file to the "...\DevStudio\SharedIDE\Template" folder.
Note: If you need help writing and understanding Windows NT Services, please feel free to email me.:o)
Date Last Updated: February 14, 1999
Comments
failed to load custom AppWizard
Posted by Legacy on 05/18/2003 12:00amOriginally posted by: hello peeps !
have no idea but i keep getting this message ,,, failed to load custom AppWizard.....any ideas ....
Thanx
Re: failed to load custom AppWizard
Posted by rockone on 12/29/2004 10:28pmrebuild the project by your VC compiler, and it will copy the .awx to the right place.
ReplyLack is better than worse version
Posted by Legacy on 11/11/2002 12:00amOriginally posted by: stan
as title.
Reply
win32 console app integrated into Window Service or ATL Service
Posted by Legacy on 10/24/2002 12:00amOriginally posted by: ruilin yang
Guru's,
Please help me. I am a relatively new c++/MFC programers. I created an ATL service module and compiled successfully. I also write a seperate win32 console program using ADO to do database manapulations, which works fine. I want to implement this win console program as window service (ATL Service) or integrate it to my ATL Service program.
I like a Service program to call (or integrate) my Win32 console program. When I add my win32 console .cpp files to my ATL project I can not get compiled. There are certainly a lots conflicts. I do not need any displaying windows.
Please give me some advance for the integration.
thanks in advance.
Ruilin
Thank You
Posted by Legacy on 07/29/2002 12:00amOriginally posted by: Vicki Dillon
Thank you so much!
ReplyI had been pulling my hair out trying to figure out how to get MFC into an ATL Service project. Your article provided the information that was the key to my enlightenment.
Again thanks very much!
sdk using Animation
Posted by Legacy on 07/21/2002 12:00amOriginally posted by: S.Rajkumar
hi,
Replyi am M.C.A student, i am undergoing 5th semester
now, i am very much interseted to do my mini projects
in vc++, using sdk.
If u have any idea about animation, using
sdk, plz give me a idea, it is very much useful to me.
i am awaiting for ur ideas.
by!by!
yours lovingly,
raj.
MFC NT SERVICE
Posted by Legacy on 03/14/2002 12:00amOriginally posted by: RAMESH
I HAVE DEVOLPED AN MFC DIALOG BASED APPLICATION.HOW CAN I PUT INTO THE CONTROL APNEL SERVICES.
PLS AMIL ME
ReplyURGENT
THANK U
BYE
EGATE114
#if or #ifdef blocks nested too deeply
Posted by Legacy on 01/14/2002 12:00amOriginally posted by: zhangsuocheng
Does not work in VC 6 !!
Posted by Legacy on 11/10/2001 12:00amOriginally posted by: prem
Platform: VC 6.0, NT server.
I am getting 'AppWizard Failed to load custom AppWizard...' after using the NTService.awx file. Can you send me a new one for VC 6 to premkumarjayaram@hotmail.com.
Thanks.
ReplyPrem
Can't compile - missing files
Posted by Legacy on 08/30/2001 12:00amOriginally posted by: Sonin Nickolay
I cant compile this project at all - VC++ 6 tells "file not found" on some position in it.
ReplyCould you please send me a full set of this project files?
VC6 'AppWizard Failed to load custom AppWizard' error.
Posted by Legacy on 08/17/2001 12:00amOriginally posted by: Nick
(Using VC6)
I’ve copied the NTService.awx to my msdev98\bin\ide folder but when I try to select the NTService.awx item from the new->projects dialog I get an 'AppWizard Failed to load custom AppWizard...' error (the same as submitted by Allen on 1999/09/22).
Is there a fix for this yet?
Thanks for your help,
Nick.
ReplyLoading, Please Wait ...