Pascal==callback==winapi==__stdcall

Source: Internet
Author: User

VC Inside: Pascal==callback==winapi==__stdcall _stdcall is the default invocation of the PASCAL program, usually used in the Win32 API, the function uses a right-to-left stack, and then empties itself at the exit.     After the VC compiles the function, it adds an underscore prefix to the function name, followed by the function name with the "@" and the number of bytes of the parameter. _cdecl are the default calling methods for C and C + + programs. Each function that calls it contains the code that empties the stack, so the resulting executable file size is larger than the call to the _stdcall function. The function uses a right-to-left compression stack. When a VC compiles a function, it will precede the function name with an underscore prefix. Is the MFC default calling convention.
In terms of Pascal, you just have to figure it out: the function that declares the calling convention is the stack itself, and the __cdecl function is cleared by the caller. When actually used, the person thinks the biggest difference is: __cdecl function parameter number can be declared as indeterminate, such as printf,scanf, and Pascal's function can not do this, if so it does not know the number of arguments.

Pascal==callback==winapi==__stdcall

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.