loicmichel wrote:
Dear Anton Lundin,
I'm used to program in C# and have zaro experience with C.
Are you aware of any c# code to link to the libdivecomputer ?
I can't figure out from the example how to download and use data from a VEO2 computer.
Thanks for help,
There's a libdivecomputer DLL here: http://www.libdivecomputer.org/builds/divinglog/
Maybe that's useful?
Cheers, Henrik
On 14-11-14 23:46, libdivecomputer@henrik.synth.no wrote:
loicmichel wrote:
I'm used to program in C# and have zaro experience with C.
Are you aware of any c# code to link to the libdivecomputer ?
I can't figure out from the example how to download and use data from a VEO2 computer.
There's a libdivecomputer DLL here: http://www.libdivecomputer.org/builds/divinglog/
Maybe that's useful?
To use the libdivecomputer library from .NET, you need a small wrapper. I once started writing such a wrapper, because it's a request I receive quite often. Ideally, I would like to see an official .NET wrapper in the future. But I never had time to finish it. So it's far from complete, but there is probably enough to get you started. See the attached files.
PS: If anyone is interested in improving the .NET code I started, please get in touch.
Jef
Jef Driesen wrote:
To use the libdivecomputer library from .NET, you need a small wrapper. I once started writing such a wrapper, because it's a request I receive quite often. Ideally, I would like to see an official .NET wrapper in the future. But I never had time to finish it. So it's far from complete, but there is probably enough to get you started. See the attached files.
PS: If anyone is interested in improving the .NET code I started, please get in touch.
Hi Jef,
Maybe it's a good idea to add those files to the git repo? It would give the code more visibility, and it would be easier to contribute improvements.
Cheers, Henrik
Thanks a lot, i will try it now.
I will be interrested to contribute to this wrapper but I'm only a "sunday afternoon" programmer. Loïc
Message du 15/11/14 10:25 De : "Jef Driesen" A : libdivecomputer@henrik.synth.no, "loicmichel" 5loicmichel5@wanadoo.fr Copie à : "Libdivecomputer Mailinglist" Objet : Re: C# and libdivecomputer
On 14-11-14 23:46, libdivecomputer@henrik.synth.no wrote:
loicmichel wrote:
I'm used to program in C# and have zaro experience with C.
Are you aware of any c# code to link to the libdivecomputer ?
I can't figure out from the example how to download and use data from a VEO2 computer.
There's a libdivecomputer DLL here: http://www.libdivecomputer.org/builds/divinglog/
Maybe that's useful?
To use the libdivecomputer library from .NET, you need a small wrapper. I once started writing such a wrapper, because it's a request I receive quite often. Ideally, I would like to see an official .NET wrapper in the future. But I never had time to finish it. So it's far from complete, but there is probably enough to get you started. See the attached files.
PS: If anyone is interested in improving the .NET code I started, please get in touch.
Jef
[ common.cs (0.4 Ko) ] [ context.cs (1.6 Ko) ] [ descriptor.cs (2.3 Ko) ] [ device.cs (4.6 Ko) ] [ parser.cs (6.1 Ko) ] [ test.cs (6.3 Ko) ]
I get the message " impossible to load the DLL" module cannot be found.
Any idea what I do wrong ? should I use a specific version of the DLL ?
Thanks, loïc
Message du 15/11/14 12:18 De : "loicmichel" 5loicmichel5@wanadoo.fr A : "Jef Driesen" , libdivecomputer@henrik.synth.no Copie à : "Libdivecomputer Mailinglist" Objet : Re: C# and libdivecomputer
Thanks a lot, i will try it now.
I will be interrested to contribute to this wrapper but I'm only a "sunday afternoon" programmer.
Loïc
Message du 15/11/14 10:25 De : "Jef Driesen" A : libdivecomputer@henrik.synth.no, "loicmichel" 5loicmichel5@wanadoo.fr Copie à : "Libdivecomputer Mailinglist" Objet : Re: C# and libdivecomputer
On 14-11-14 23:46, libdivecomputer@henrik.synth.no wrote:
loicmichel wrote:
I'm used to program in C# and have zaro experience with C.
Are you aware of any c# code to link to the libdivecomputer ?
I can't figure out from the example how to download and use data from a VEO2 computer.
There's a libdivecomputer DLL here: http://www.libdivecomputer.org/builds/divinglog/
Maybe that's useful?
To use the libdivecomputer library from .NET, you need a small wrapper. I once started writing such a wrapper, because it's a request I receive quite often. Ideally, I would like to see an official .NET wrapper in the future. But I never had time to finish it. So it's far from complete, but there is probably enough to get you started. See the attached files.
PS: If anyone is interested in improving the .NET code I started, please get in touch.
Jef
[ common.cs (0.4 Ko) ] [ context.cs (1.6 Ko) ] [ descriptor.cs (2.3 Ko) ] [ device.cs (4.6 Ko) ] [ parser.cs (6.1 Ko) ] [ test.cs (6.3 Ko) ]
_______________________________________________ devel mailing list devel@libdivecomputer.org http://libdivecomputer.org/cgi-bin/mailman/listinfo/devel
Hi Loïc
Do you have the libdivecomputer-0.dll in the same folder as your .NET executable? The error looks like the .NET code can't find the libdivecomputer DLL.
Sven
From: devel [mailto:devel-bounces@libdivecomputer.org] On Behalf Of loicmichel Sent: Saturday, November 15, 2014 1:16 PM To: Jef Driesen; libdivecomputer@henrik.synth.no Cc: Libdivecomputer Mailinglist Subject: Re: C# and libdivecomputer
I get the message " impossible to load the DLL" module cannot be found.
Any idea what I do wrong ? should I use a specific version of the DLL ?
Thanks,
loïc
Message du 15/11/14 12:18 De : "loicmichel" 5loicmichel5@wanadoo.fr A : "Jef Driesen" jef@libdivecomputer.org, libdivecomputer@henrik.synth.no Copie à : "Libdivecomputer Mailinglist" devel@libdivecomputer.org Objet : Re: C# and libdivecomputer
Thanks a lot, i will try it now.
I will be interrested to contribute to this wrapper but I'm only a "sunday afternoon" programmer.
Loïc
Message du 15/11/14 10:25 De : "Jef Driesen" jef@libdivecomputer.org A : libdivecomputer@henrik.synth.no, "loicmichel" 5loicmichel5@wanadoo.fr Copie à : "Libdivecomputer Mailinglist" devel@libdivecomputer.org Objet : Re: C# and libdivecomputer
On 14-11-14 23:46, libdivecomputer@henrik.synth.no wrote:
loicmichel wrote:
I'm used to program in C# and have zaro experience with C.
Are you aware of any c# code to link to the libdivecomputer ?
I can't figure out from the example how to download and use data from a VEO2 computer.
There's a libdivecomputer DLL here: http://www.libdivecomputer.org/builds/divinglog/
Maybe that's useful?
To use the libdivecomputer library from .NET, you need a small wrapper. I once started writing such a wrapper, because it's a request I receive quite often. Ideally, I would like to see an official .NET wrapper in the future. But I never had time to finish it. So it's far from complete, but there is probably enough to get you started. See the attached files.
PS: If anyone is interested in improving the .NET code I started, please get in touch.
Jef
[ common.cs (0.4 Ko) ] [ context.cs (1.6 Ko) ] [ descriptor.cs (2.3 Ko) ] [ device.cs (4.6 Ko) ] [ parser.cs (6.1 Ko) ] [ test.cs (6.3 Ko) ]
_______________________________________________ devel mailing list devel@libdivecomputer.org http://libdivecomputer.org/cgi-bin/mailman/listinfo/devel
DearSven,
yes, I copied it in the Exe directory. When I try to load the DLL I compiled from your source code, I get a different error. I'm using VS2013 express edition. Thanks for help, Loïc
Message du 15/11/14 16:37 De : "Sven Knoch" A : "'loicmichel'" 5loicmichel5@wanadoo.fr, "'Jef Driesen'" , libdivecomputer@henrik.synth.no Copie à : "'Libdivecomputer Mailinglist'" Objet : RE: C# and libdivecomputer
Hi Loïc
Do you have the libdivecomputer-0.dll in the same folder as your .NET executable? The error looks like the .NET code can't find the libdivecomputer DLL.
Sven
From: devel [mailto:devel-bounces@libdivecomputer.org] On Behalf Of loicmichel Sent: Saturday, November 15, 2014 1:16 PM To: Jef Driesen; libdivecomputer@henrik.synth.no Cc: Libdivecomputer Mailinglist Subject: Re: C# and libdivecomputer
I get the message " impossible to load the DLL" module cannot be found.
Any idea what I do wrong ? should I use a specific version of the DLL ?
Thanks,
loïc
Message du 15/11/14 12:18 De : "loicmichel" 5loicmichel5@wanadoo.fr A : "Jef Driesen" , libdivecomputer@henrik.synth.no Copie à : "Libdivecomputer Mailinglist" Objet : Re: C# and libdivecomputer
Thanks a lot, i will try it now.
I will be interrested to contribute to this wrapper but I'm only a "sunday afternoon" programmer.
Loïc
Message du 15/11/14 10:25 De : "Jef Driesen" A : libdivecomputer@henrik.synth.no, "loicmichel" 5loicmichel5@wanadoo.fr Copie à : "Libdivecomputer Mailinglist" Objet : Re: C# and libdivecomputer
On 14-11-14 23:46, libdivecomputer@henrik.synth.no wrote:
loicmichel wrote:
I'm used to program in C# and have zaro experience with C.
Are you aware of any c# code to link to the libdivecomputer ?
I can't figure out from the example how to download and use data from a VEO2 computer.
There's a libdivecomputer DLL here: http://www.libdivecomputer.org/builds/divinglog/
Maybe that's useful?
To use the libdivecomputer library from .NET, you need a small wrapper. I once started writing such a wrapper, because it's a request I receive quite often. Ideally, I would like to see an official .NET wrapper in the future. But I never had time to finish it. So it's far from complete, but there is probably enough to get you started. See the attached files.
PS: If anyone is interested in improving the .NET code I started, please get in touch.
Jef
[ common.cs (0.4 Ko) ] [ context.cs (1.6 Ko) ] [ descriptor.cs (2.3 Ko) ] [ device.cs (4.6 Ko) ] [ parser.cs (6.1 Ko) ] [ test.cs (6.3 Ko) ]
devel mailing list devel@libdivecomputer.org http://libdivecomputer.org/cgi-bin/mailman/listinfo/devel
Dear Sven,
Yes, I had copied the DLL in the correct directory.
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. Could you send me the technical documentation of the VEO2 communication protocol ? (it's only serial com ) I think I should start from there... Thanks, Loïc
Message du 15/11/14 16:37 De : "Sven Knoch" A : "'loicmichel'" 5loicmichel5@wanadoo.fr, "'Jef Driesen'" , libdivecomputer@henrik.synth.no Copie à : "'Libdivecomputer Mailinglist'" Objet : RE: C# and libdivecomputer
Hi Loïc
Do you have the libdivecomputer-0.dll in the same folder as your .NET executable? The error looks like the .NET code can't find the libdivecomputer DLL.
Sven
From: devel [mailto:devel-bounces@libdivecomputer.org] On Behalf Of loicmichel Sent: Saturday, November 15, 2014 1:16 PM To: Jef Driesen; libdivecomputer@henrik.synth.no Cc: Libdivecomputer Mailinglist Subject: Re: C# and libdivecomputer
I get the message " impossible to load the DLL" module cannot be found.
Any idea what I do wrong ? should I use a specific version of the DLL ?
Thanks,
loïc
Message du 15/11/14 12:18 De : "loicmichel" 5loicmichel5@wanadoo.fr A : "Jef Driesen" , libdivecomputer@henrik.synth.no Copie à : "Libdivecomputer Mailinglist" Objet : Re: C# and libdivecomputer
Thanks a lot, i will try it now.
I will be interrested to contribute to this wrapper but I'm only a "sunday afternoon" programmer.
Loïc
Message du 15/11/14 10:25 De : "Jef Driesen" A : libdivecomputer@henrik.synth.no, "loicmichel" 5loicmichel5@wanadoo.fr Copie à : "Libdivecomputer Mailinglist" Objet : Re: C# and libdivecomputer
On 14-11-14 23:46, libdivecomputer@henrik.synth.no wrote:
loicmichel wrote:
I'm used to program in C# and have zaro experience with C.
Are you aware of any c# code to link to the libdivecomputer ?
I can't figure out from the example how to download and use data from a VEO2 computer.
There's a libdivecomputer DLL here: http://www.libdivecomputer.org/builds/divinglog/
Maybe that's useful?
To use the libdivecomputer library from .NET, you need a small wrapper. I once started writing such a wrapper, because it's a request I receive quite often. Ideally, I would like to see an official .NET wrapper in the future. But I never had time to finish it. So it's far from complete, but there is probably enough to get you started. See the attached files.
PS: If anyone is interested in improving the .NET code I started, please get in touch.
Jef
[ common.cs (0.4 Ko) ] [ context.cs (1.6 Ko) ] [ descriptor.cs (2.3 Ko) ] [ device.cs (4.6 Ko) ] [ parser.cs (6.1 Ko) ] [ test.cs (6.3 Ko) ]
devel mailing list devel@libdivecomputer.org http://libdivecomputer.org/cgi-bin/mailman/listinfo/devel
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
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@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