Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

GarlandIX

Declaration of WinMain

This topic is 6109 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
I believe none whatsoever.

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

Goodluck

Jeff D

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!