How to disable WinMain entry point for a MFC application?

Posted by Sorin Sbarnea on Stack Overflow See other posts from Stack Overflow or by Sorin Sbarnea
Published on 2010-04-18T22:18:58Z Indexed on 2010/04/18 22:23 UTC
Read the original article Hit count: 317

Filed under:
|
|
|
|

I understand that is not possible to have applications with multiple entry points under Windows.

I have a MFC application and I added code for making it running as a service (main() entry point and other required stuff) but it looks that Windows will always run the WinMain() from MFC instead of my main.

The question is how can I disable the WinMain() from MFC in order to be able to run my own main().

Probably the same problem would apply if you want to run the same application as a console application.

What do I have to change in project properties in order to build it as a console application (main instead of WinMain)?

Is commenting my CWinApp the only solution?

© Stack Overflow or respective owner

Related posts about entry-point

Related posts about winmain