0

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?

sorin
  • 161,544
  • 178
  • 535
  • 806

1 Answers1

1

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

Goz
  • 61,365
  • 24
  • 124
  • 204
  • 2
    I was looking before writing but now I found the option: `Linker > System > SubSystem` – sorin Apr 18 '10 at 22:27