G
Guest
An oversight that affects me rather seriously in the current version of C# is the inability to change the calling convention of a delegate. The CLR supports it, and I have to resort to disassembling the assembly, hacking the source with a perl script, and reassembling it. This has the nasty side effect of preventing me from being able to step through or set breakpoints in my source code (the debugger then uses the MSIL instead)
Anyway, I know you can change the calling convention when doing DllImport, but when passing a function pointer to a native DLL, C# will only use the Windows calling convention for the delegate. Please fix this
It seems the fix would involve just adding a new attribute and having the compilers look for it. Will this be fixed in C#/.NET 2.0? If not, is there a reason why not? And for now, is there any better way to do this than the assembly hack? It's extremely painful to debug MSIL directly
Thank you
Adam M.
Anyway, I know you can change the calling convention when doing DllImport, but when passing a function pointer to a native DLL, C# will only use the Windows calling convention for the delegate. Please fix this
It seems the fix would involve just adding a new attribute and having the compilers look for it. Will this be fixed in C#/.NET 2.0? If not, is there a reason why not? And for now, is there any better way to do this than the assembly hack? It's extremely painful to debug MSIL directly
Thank you
Adam M.