04-26-2012 04:41 AM - edited 04-26-2012 04:43 AM
Hi everyone,
What I am trying to achieve is communicating with a USB-Device through LabView. I already got a dll plus header file, but the dll needs wchar_t. If I tell LabView to replace this with a normal char, it's not working.
I'll attach the dll and headerfile, if you could try it out and tell me, if it works for you, that'd be great. You only need the VID, PID and Serial Number from a USB-Device in your system, a mouse is sufficient.
To obtain these, you can e.g. use USBdeview, it's free: http://www.nirsoft.net/utils/usb_devices_view.html .
Any help would be greatly appreciated!
Thanks in advance,
Regards,
Pedro
04-30-2012 07:58 AM
Hi Pedro,
Have you read through this tutorial which outlines how we can set up basic connectivity with USB Devices via the NI-VISA driver? Once this is set up, you should be able to make use of the device commands reference in order to perform some meaningful communication with the device.
In terms of the wchar_t character via the use of the DLL as a bridge of communication, this type is associated with wider characters that are assigned to the ASCII table. I think that we can either perform a Unicode to ASCII conversion within the dll, or treat this data as a variant type, or try performing a multibyte read since its width is larger than the native int.
05-07-2012 03:33 AM
Hi,
sorry for not having answered so long. I've been in contact with the developer of said DLL and he helped me out by writing a wrapper for it. So this problem at least is solved.
Thanks anyway 🙂
Pedro
09-16-2015 02:29 PM
hi,
Even i am facing the same problem.
the .dll which i am using requires a wchar_t const*, can u please help me ?