Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

NT Service and MFC

Posted on 1997-02-22
1
Medium Priority
?
256 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
[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
1 Comment
 
LVL 4

Accepted Solution

by:
mbhakta earned 100 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

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.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

688 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