LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing Logitech G920 dll

Hello guys,

I have been tring to interface the logitech dll by reading the sdk, but it has always been a challenge for me to adapt data types, can you help me for the 2 in the pictures for exemple ? 

At the end of the project I intend to post a full library to drive the logitech wheels.

 

Update : I tried the generation wizard, it is doing almost the same things as I do but still no result (I try the is connected at index 0, always false/0)

 

Regards

Download All
0 Kudos
Message 1 of 4
(3,456 Views)

Hey M.atthieu,

 

Interfacing a dll is not always an easy job, in any language...

One advice would be to find a code (even written in C or C++) that calls this dll. There are probably some on this dll maker website. Then it is easier to copy the synthax.

Other than that, can you send us the dll and your small LabVIEW code with the call function node?

 

Thanks

Junior

0 Kudos
Message 2 of 4
(3,397 Views)

So what does not work? At least your LogiIsConnected() function looks mostly right except that it may use stdcall instead of cdecl calling convention. The documentation snipped you show doesn't mention that and it is very much possible that the whole manual doesn't mention it. If it is not documented you have to try out, the wrong one should give you an error dialog or possibly crash LabVIEW when you run the function.

 

LogiGetFriendlyProductName() is nastier. It uses wchar* parameters which are wide char strings. LabVIEW strings however are ASCII (8 bit characters). So it will be not trivial to call this function from LabVIEW. And the documentation f*cks up here. It shows a wchar* return datatype but says that the function returns a true if it succeeds and false otherwise. A clear documentation error, but which of the two is wrong????

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 4
(3,380 Views)

Hey ! 

Well it is working (at least is Connected and Has Force Feedback), what I did and and what the wizard did is OK but wasn't using the good initialisation function, I will continue testing all the function regarding what you said with the difference of the documentation and what should be expected and post an update when everything will work (I hope !)

 

I posted a picture of a quick test to see the behavior...

 

Keep you posted !

0 Kudos
Message 4 of 4
(3,371 Views)