entry point for exe

brabchev
brabchev used Ask the Experts™
on
Hi
I’m newbie in Visual C++ and I need to find the entry point in a quite large exe project.
How can I find which function or method is called first?
How do you set the entry point?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
jkr
Top Expert 2012

Commented:
The entry point usually is 'main()' or in case of a GUI applicaion 'WinMain()'
Find class named xxxxxxxxxApp and derived from CWinApp.
Constructor of the class is executed firstly, then InitInstance if exists.
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

My recommendations are for MFC application.
If the application does not use the MFC, then follow the hint from jkr.

Author

Commented:
The program actually is a game and it doesn’t use MFC neither GUI.
I already looked for main() but did not find any.
Is it possible to specify the entry point in the compiler options or the project settings?
Top Expert 2012
Commented:
>>Is it possible to specify the entry point in the compiler options or the project settings?

Yes, using the '/entry:<function>' linker option, but this is a 'low level' entry point that also performs some initialization. What kind of program is this? Is there a 'WinMain()'?
If you use MSVC - just press F11 "Step Into".
If you use other compiler - use the key with the same assignment.

Commented:
No comment has been added lately, so it's time to clean up this question.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: jkr {http:#9636433} & GloomyFriar {http:#9640432}

Please leave any comments here within the next four days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial