[rrd-developers] C# binding broken?

Pellaeon ld.pellaeon at gmail.com
Mon Apr 18 08:48:15 CEST 2011


Hello,

I tried the patches and I still have problems.
First the good news: the fetch function seems to work now, but I get an
error in "Test_Restore();"
The console output is

test_a.xml:5: parser error: Input is not proper UTF-8, indicate encoding!
Bytes: 0xE4 0x69 0x73 0x63

Then the function does not return. The program hangs.

After debugging I can say the error occurs somewhere in the
"get_xml_element" function.
So is this a problem with the binding or a problem with the data from the
test example?

Second thing: In my opinion the calling convention must be cdecl!

[DllImport(dll,CallingConvention=CallingConvention.Cdecl)]

Standard calling convention of C/C++ is cdecl. Standard calling convention
of DLLImport is winapi what means: stdcall. So I changed all calling
conventions to cdecl in the rrdlib.cs. But it seems there is no difference.
The error still occurs, it is still the same runtime behavior. So, only in
the sake of interest: why does the calling convention makes no difference?
Normally wrong calling conventions result in corrupted stacks and so on?
Only 	happenstance?

Best regards

Pellaeon

--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/C-binding-broken-tp6275701p6282565.html
Sent from the RRDtool Developers Mailinglist mailing list archive at Nabble.com.



More information about the rrd-developers mailing list