C# and libdivecomputer
loicmichel
5loicmichel5 at wanadoo.fr
Mon Dec 1 00:04:59 PST 2014
Dear Jef,
<<> There is almost no documentation other than the libdivecomputer source code. Why
> do you need it?>>
I realised that talking to theVEO2 is as simple as talking to a com port.
I considered writing an interface to talk to the VEO in C#.
How did you found out about all communication protocol ? ( reverce engineering ? )
I'm amazed !!
Thanks,
Loïc
> Message du 01/12/14 09:00
> De : "Jef Driesen"
> A : "loicmichel" <5loicmichel5 at wanadoo.fr>
> Copie à : "'Libdivecomputer Mailinglist'"
> Objet : Re: C# and libdivecomputer
>
> On 30-11-14 15:40, loicmichel wrote:
> > I recomplied the DLL in visual studio from the source code (see enclosed) and
> > now the DLL load in my C# project but I get an other error. Signature of the
> > call doesn't match the signature of the function in the DLL.
>
> I suspect this is due to the calling convention. Unless you changed it, the
> libdivecomputer dll is compiled with cdecl. But the Win32 API uses stdcall as
> the default calling convention, and so does .NET.
>
> The solution is to specify the calling convention explicitly in the DllImport
> statements. Change all occurrences of:
>
> [DllImport("libdivecomputer-0.dll")]
>
> into this:
>
> [DllImport("libdivecomputer-0.dll",CallingConvention=CallingConvention.Cdecl)]
>
> > Could you send me the technical documentation of the VEO2 communication protocol
> > ? (it's only serial com ) I think I should start from there...
>
> There is almost no documentation other than the libdivecomputer source code. Why
> do you need it?
>
> Jef
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libdivecomputer.org/pipermail/devel/attachments/20141201/9c6574b3/attachment.html>
More information about the devel
mailing list