Calling conventions

Started by
2 comments, last by Hermes 19 years, 6 months ago
Could you tell me please what is the difference between _cdecl, _fastcall,_stdcall and what is an unmanaged dll. I appreciate your help
Advertisement
Have you read the MSDN descriptions of these yet? They're pretty comprehensive.
Quote:__stdcall:
The __stdcall calling convention is used to call Win32 API functions. The callee cleans the stack, so the compiler makes vararg functions __cdecl. Functions that use this calling convention require a function prototype.

Quote:__cdecl:
This is the default calling convention for C and C++ programs. Because the stack is cleaned up by the caller, it can do vararg functions. The __cdecl calling convention creates larger executables than __stdcall, because it requires each function call to include stack cleanup code. The following list shows the implementation of this calling convention.

Quote:__fastcall:
The __fastcall calling convention specifies that arguments to functions are to be passed in registers, when possible. The following list shows the implementation of this calling convention.


An unmanaged DLL is (I believe) a plain C++ DLL. The other alternative is a managed DLL, which uses .NET. Although I'm not entirely sure, since I've never used .NET
ThankX for all your answers.Msdn also worked fine for me

This topic is closed to new replies.

Advertisement