Conventions for Calling DLL Functions

The following calling conventions are supported when calling DLL functions:
  • __stdcall
  • __cdecl

The __stdcall calling convention is used by default when calling DLL functions. This calling convention is used by all Windows API DLL functions.

You can change the calling convention for a DLL function by using the CallingConvention property of the DllFunctionOptions annotation.


The following code example declares a DLL function with the __decl calling convention:
public interface IMsVisualCRuntime {
  double cos(double inputInRadians);