Advertisement

Declaration of WinMain

Started by February 23, 2002 10:33 AM
3 comments, last by GarlandIX 22 years, 6 months ago
Looking at different source code examples and tutorials i have seen WinMain() declared in two ways : 1. int WINAPI WinMain(...) 2. int APIENTRY WinMain(...) So I was wondering, What''s the difference? ------------------------------ If someone asks you "A penny for your thoughts" and you put your two cents in, do you get change?
------------------------------BASIC programmers don't die, they just GOSUB and don't return.
I believe none whatsoever.

One of them was an old Pascal way, but Im not to sure if Im right.

Goodluck

Jeff D
Suffered seven plagues, but refused to let the slaves go free. ~ Ross Atherton
Advertisement
from "windef.h" in your include files in MSVC++ 6.0.

  #define CALLBACK    __stdcall#define WINAPI      __stdcall#define WINAPIV     __cdecl#define APIENTRY    WINAPI#define APIPRIVATE  __stdcall#define PASCAL      __stdcall  


To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
I'm not sure what the last poster's point was, but yeah there is
basiclly no difference, you can say int (APIENTRY,WINAPI, PASCAL,
CDECL(case and spelling right?) ) they are all basically macros
to the exact same things. I like APIENTRY because it kinda
sounds like thats where the Main code should go...the entry point
so to speak

-=Lohrno

PS well ok I know the last poster was trying in a weird way
to say there was no difference, but he could have been clearer!
=P


Edited by - Lohrno on February 23, 2002 12:25:07 AM
Let's see if this works

        #define CALLBACK    __stdcall#define WINAPI      __stdcall#define WINAPIV     __cdecl#define APIENTRY    WINAPI#define APIPRIVATE  __stdcall#define PASCAL      __stdcall  


Having an iso latin-1 char set chart handy helps!


Edited by - lessbread on February 23, 2002 12:29:48 AM
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man

This topic is closed to new replies.

Advertisement