Jump to content
  • Advertisement
Sign in to follow this  
Hermes

Calling conventions

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

Could you tell me please what is the difference between _cdecl, _fastcall,_stdcall and what is an unmanaged dll. I appreciate your help

Share this post


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

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!