Solved

NT Service and MFC

Posted on 1997-02-22
1
226 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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now