[rrd-developers] C# binding broken?
clarsen at euphoriaaudio.com
Fri Apr 15 22:34:48 CEST 2011
You're right, I tried the C# bindings with 1.4.5 and it wasn't happy with
any of the functions that involved marshaling strings from the dll. I wrote
the original version on a WinXP box with an older version of DotNet so that
may have been the difference or something else changed between 1.4.3 and
1.4.5. Anwyah, I fixed the marshaling and it's passing all the tests on my
Win7 box now. I'll post some patches to the list following this email. If
you find and fix any other bugs, please let me know and thanks!
> I use rrdlib 1.4.5 and tried to use the C# binding from the
> subversion. I compiled the DebugDLL of the rrdlib and compiled and
> started the "dnrrd_binding_test". When reaching the fetch function I
> get the following
> exception: System.AccessViolationException. Any idea? Seems there is
> an error in the binding!
> First I think the whole calling convention on the binding is wrong! C
> dlls use cdecl as standard, Dllimport of C# uses stdcall. But changing
> the calling convention in the C# class didn't solve the problem
> ([DllImport(dll, CallingConvention = CallingConvention.Cdecl)])
> Any ideas, clues? Perhaps there is a bug in the marshalling?
> Best regards
More information about the rrd-developers