문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top