CallConvThiscall Class
Collapse the table of content
Expand the table of content

CallConvThiscall Class


Indicates that a method should use the ThisCall calling convention.

Namespace:   System.Runtime.CompilerServices
Assembly:  mscorlib (in mscorlib.dll)


public class CallConvThiscall


Initializes a new instance of the CallConvThiscall class.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)


Returns a string that represents the current object.(Inherited from Object.)

When using the ThisCall calling convention, the first parameter of a method call is the this pointer, which is stored in register ECX. Other parameters of a method call are pushed on the stack. This calling convention is used to call methods on classes exported from an unmanaged DLL.

The classes in System.Runtime.CompilerServices are for compiler writers' use only.

Compilers emit custom modifiers within metadata to change the way that the just-in-time (JIT) compiler handles values when the default behavior is not appropriate. When the JIT compiler encounters a custom modifier, it handles the value in the way that the modifier specifies. Compilers can apply custom modifiers to methods, parameters, and return values. The JIT compiler must respond to required modifiers but can ignore optional modifiers. A C++ compiler could emit a custom modifier to describe how a byte should be treated in cases where the JIT compiler treats bytes in a manner that is not compatible with C++ by default.

You can emit custom modifiers into metadata using one of the following techniques:

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
© 2015 Microsoft