main() is not Main

I was totally blown away when I copied / pasted some C++ COM code into a MS Visual Studio Console App project... Trying to learn COM.

When I started to trace/debug the program... the execution does not go to the main() statement as the first point. Wow! Seriously... they made main() not to be Main any longer. I think that is crzy.

rant off.
That's normal. I don't think "main" is ever the first function in the executable.
I know that in MFC Dialog programs... InitInstance is first... I just didn't know that main() was not primary/first in Console Apps.... I figured that at least those were still normal....

Oh Well....

Thanks.
It would not be possible. There's a lot to set up before main() can even start. As a simple example, someone has to read the environment and put the command line arguments into argc and argv.
helios - OK... Thanks...

I learned something about COM today:

Clarification: As mentioned, I made a MS Visual Studio Console App project.... to learn COM.

It turns out that the first file / class that gets executed - is the interface.h file... So in COM terms... that does make sense.

Last edited on
Topic archived. No new replies allowed.