Jump to content
  • Advertisement
Sign in to follow this  
jaytee81

int PASCAL vs int WINAPI

This topic is 4828 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

Hi all, this is my very first post so be nice. I have worked through a few game programming books trying to learn the ways of the force but have just come up against something that has thrown me off. Most authors I have read have used the following for the WinMain functions for the windows side of things: int WINAPI WinMain...... However I have just come across a different version: int PASCAL WinMain...... Can somebody explain the difference please and are they interchangeable? Having used the WINAPI version I'd prefer to stick with that unless someone can tell me why using the PASCAL version is better or even preferred. Thanks for your time. Jaytee81

Share this post


Link to post
Share on other sites
Advertisement
they are just macros meaning the same thing. __stdcall in this case i believe. what is __stdcall ? I dunno but im pretty sure its dated and unless your using C its not important, just there for C compatibility. I might be wrong but the point is dont worry about it

PASCAL == WINAPI

Share this post


Link to post
Share on other sites
There isnt any difference, both PASCAL and WINAPI are defined as __stdcall so either of them will work.

Share this post


Link to post
Share on other sites
The reason for "PASCAL" is that the Pascal language uses this calling convention for its functions. "WINAPI" is all of the Win32 API use that calling convention.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!