Re: C# binding broken?

"Chris Larsen" <[email protected]>
Newsgroups gmane.comp.db.rrdtool.devel
Message-ID <[email protected]>
Hi Pellaeon,

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!

Sincerely,
Chris Larsen

>
> 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
>
> Pellaeon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.