Question

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?

Was it helpful?

Solution

If you look at the linker settings you can change the entry point. This is where you want to be looking.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top