Solved

NT Service and MFC

Posted on 1997-02-22
1
240 Views
Last Modified: 2013-11-20
In the article "Creating a Simple Windows NT Service in C++" on the MSDN, I would like to add file handling.  I tried including "afx.h" - not good.  I would like to use CFile class.  How can I do it?
0
Comment
Question by:arie
1 Comment
 
LVL 4

Accepted Solution

by:
mbhakta earned 50 total points
ID: 1300584
I would suggest leave MFC and Services alone because :

- The MFC overheads are tremendous. Services need to be efficient and fast. MFC is easy to use but has some hags in terms of speed as it passes thru its own routines before talking to the OS. This can cause, drastic speed reduction if you implement it in a service. The executable size is also larger.

- Now coming to the real issue. MFC needs its certain entry points as it calls it own WinMain before the regular one. This makes you include things like stdafx.h , CWinApp based classes etc. These entry points not necessarily tally with the entry points of these hooks.

I hope I have convinced you. If not write back and I will give some real life examples.


0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sumDigits challenge 9 150
Fibonacci challenge 11 122
mapAB Challlenge 35 145
Trying to run powershell  in a batch file. How do I do this? 8 92
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 …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

772 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