LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to import dll file of openhaptics into labview?

i spend few time to try to write dll file of openhaptics.

 

i access successfully about dll file and import functions exclude two functions which are related with synchronous (below figure).

 

park92_0-1581489438214.png

park92_1-1581489480541.pngpark92_2-1581489508195.png

 

park92_3-1581489546387.png

i don't know how to apply those two functions in LABVIEW..

park92_4-1581489669080.png

maybe i think the red color makes problem.

 

please help me..

 

i stuck hear few days 😫

 

 

 

0 Kudos
Message 1 of 4
(1,782 Views)

The simple answer is that you can’t! The Call Library Node can not work with function pointers.

There are ways to do it without creating a wrapper DLL in C but they are many times more complex, difficult, error prone, brittle and totally unsafe to use for anyone but the original author in comparison to writing a wrapper DLL in plain C.

If the prospects of having to write such a DLL gives you the jibes, you can’t possibly imagine the troubles you would have to overcome trying to get around that with the Call Library Node. I definitely don’t see it as a viable option for snyone but real low level C programmer experts and those will generally refuse to do it in such a way as it is cumbersome and totally unmaintainable in the long run.

 

Learn enough C programming to be able to write this wrapper DLL (function pointers are the more advanced chapters of C programming) or hire someone to do this DLL for you are the only valid options IMHO aside from finding an alternative API or avoiding the functions requiring callback functions.

 

Rolf Kalbermatter
My Blog
Message 2 of 4
(1,743 Views)

thank you for replying on my question. I already solve it through making c wrapper code. Thank you so much.

0 Kudos
Message 3 of 4
(1,712 Views)

That’s great to know. Let’s see how long it takes before someone answers to this thread asking if you could please send your DLL to them! 😀

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(1,697 Views)