Method Syntax Question

Hello,

I have been learning C++ over the last few months and all the tutorials i go through declare methods like this:

1
2
  returnType MethodName(paramType1 param1, paramType2 param2);
  int MyMethod(int x, int y);


However recently i have seen some differences, i've been looking at some Direct X stuff and now i see them declare like

1
2
 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nShow);
LRESULT WINAPI WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)


I get that int is return type but i dont understand what the WINAPI (not just WINAPI but what ever is between the return type and the method name) is for?

Thanks in advance;

S
Last edited on
It's just a Windows macro for __stdcall.

http://msdn.microsoft.com/en-us/library/zxk0tw93.aspx
Thank you, answered my question.
Topic archived. No new replies allowed.