Solved

entry point for exe

Posted on 2003-10-28
9
218 Views
Last Modified: 2010-04-02
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?
0
Comment
Question by:brabchev
9 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 9636078
The entry point usually is 'main()' or in case of a GUI applicaion 'WinMain()'
0
 
LVL 6

Expert Comment

by:GloomyFriar
ID: 9636124
Find class named xxxxxxxxxApp and derived from CWinApp.
0
 
LVL 6

Expert Comment

by:GloomyFriar
ID: 9636155
Constructor of the class is executed firstly, then InitInstance if exists.
0
 
LVL 6

Expert Comment

by:GloomyFriar
ID: 9636172
My recommendations are for MFC application.
If the application does not use the MFC, then follow the hint from jkr.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Author Comment

by:brabchev
ID: 9636382
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?
0
 
LVL 86

Accepted Solution

by:
jkr earned 25 total points
ID: 9636433
>>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()'?
0
 
LVL 6

Assisted Solution

by:GloomyFriar
GloomyFriar earned 25 total points
ID: 9640432
If you use MSVC - just press F11 "Step Into".
If you use other compiler - use the key with the same assignment.
0
 
LVL 9

Expert Comment

by:tinchos
ID: 10546265
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
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now