Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio .NET
Visual C++
Reference
C/C++ Languages
Calling Conventions
 thiscall

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2003/.NET Framework 1.1

Other versions are also available for the following:
C++ Language Reference
thiscall

This is the default calling convention used by C++ member functions that do not use variable arguments. Under thiscall, the callee cleans the stack, which is impossible for vararg functions. Arguments are pushed on the stack from right to left, with the this pointer being passed via register ECX on the x86 architecture. The thiscall calling convention cannot be explicitly specified in a program, because thiscall is not a keyword.

vararg member functions use the __cdecl calling convention. All function arguments are pushed on the stack, with the this pointer placed on the stack last

Because this calling convention applies only to C++, there is no C name decoration scheme.

See Also

Argument Passing and Naming Conventions

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker