The main purpose of CallConvHack is to provide a working SubversionSharp to Windows users. Subversion callbacks should use Cdecl calling convention. Under Windows, C# delegates default to Stdcall calling convention. Moreover, there is no way using plain C# to change this behaviour [1]. This hack (based on several articles, blogs and posts available elsewhere) patch IL code directly to fix the calling convention of attribute-marked delegates.

The originality of our implementation is both the external DLL used to implement the CallConvCdeclAttribute and the C# program that works as a filter to translate the standard output of ildasm.

Status Alpha
Release not yet released
Browse Trunk source:trunk/CallConvHack
Svn Trunk
Language C#
Depends on nothing
License GNU Lesser General Public License (LGPL)


[1] In .NET 2.0 framework, the attribute UnmanagedFunctionPointerAttribute could be use in place of this hack