Sign in to follow this  
jaytee81

int PASCAL vs int WINAPI

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this