CallingConvention Enumeration

CallingConvention Enumeration

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Specifies the calling convention required to call methods implemented in unmanaged code.

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

No code example is currently available or this language may not be supported.

Member nameDescription
CdeclThe caller cleans the stack. This enables calling functions with varargs, which makes it appropriate to use for methods that accept a variable number of parameters, such as Printf.
FastCallThis calling convention is not supported.
StdCallThe callee cleans the stack. This is the default convention for calling unmanaged functions with platform invoke.
ThisCallThe first parameter is the this pointer and is stored in register ECX. Other parameters are pushed on the stack. This calling convention is used to call methods on classes exported from an unmanaged DLL.
WinapiThis member is not actually a calling convention, but instead uses the default platform calling convention. For example, on Windows the default is StdCall and on Windows CE.NET it is Cdecl.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft