[Mono-dev] __arglist and P/Invoke
akyrtzi at gmail.com
Sun Dec 31 11:31:10 EST 2006
Mono isn't able to handle __arglist in a P/Invoke signature. For example, the following program (which calls 'printf' of the the standard C library) is working fine with MS.NET.
public static extern void printf(string format, __arglist);
static void Main()
printf("number %d\n", __arglist(10));
If I try to use Mono, I encounter two problems:
1) The Mono C# compiler doesn't add 'vararg' to the method definition for printf.
2) If I try to execute the sample (compiled with MS.NET's C# compiler) a internal exception is thrown:
Unhandled Exception: System.InvalidProgramException: Invalid IL code in Program: Main (): IL_0008: call 0x0a000011
Are these problems likely to be fixed in a future version of Mono ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list