Use something other than WinMain as entry point
-
How does one make another function the actual entry point into a Win32 app? I've seen it on Codewarrior on the Macintosh that you specify what function is your entry point.. How do you do it in VC 6?
-
How does one make another function the actual entry point into a Win32 app? I've seen it on Codewarrior on the Macintosh that you specify what function is your entry point.. How do you do it in VC 6?
Select Project/Settings, go to the Link tab, select Category: Output and there you should see the "Entry-point symbol" editbox. From there you can change the entry-point of your application, which when left empty defaults to "WinMain" for win32 applications and "main" for console applications.
-
Select Project/Settings, go to the Link tab, select Category: Output and there you should see the "Entry-point symbol" editbox. From there you can change the entry-point of your application, which when left empty defaults to "WinMain" for win32 applications and "main" for console applications.
Yes, you can do that. But just out of curiosity, would it be a standard program then? I mean, doesn't the standard specify that
main()
should be the starting point? In fact, Turbo C++ X| X| X| has a pragma option calledstartup
that will let you start from another function, but after that,main()
will be called.
Vikram. ----------------------------- My site due for a massive update 1. Don't ask unnecessary questions. You know what I mean? 2. Avoid redundancy at all costs. 3. Avoid redundancy at all costs. "Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design. -
Yes, you can do that. But just out of curiosity, would it be a standard program then? I mean, doesn't the standard specify that
main()
should be the starting point? In fact, Turbo C++ X| X| X| has a pragma option calledstartup
that will let you start from another function, but after that,main()
will be called.
Vikram. ----------------------------- My site due for a massive update 1. Don't ask unnecessary questions. You know what I mean? 2. Avoid redundancy at all costs. 3. Avoid redundancy at all costs. "Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.I don't see any use in changing the entry point neither, except wWinMain and wmain of course. Anyway it's just a function and called only once (as long as you're not recursing :~ in main) I guess people have different tastes and different ways to obfuscate their code. You never know ;P