05-06-2011 10:31 AM
I have a DLL that requires me to pass in a bluetooth address. The Function Prototype the DLL expects is ERROR_CODE createTestSuite(const wchar_t* bluetoothAddress). My problem lies with the "wchar_t*" string pointer as Labview 2009 doesn't seem to give that option. If I am just passing the DLL the Bluetooth Address string is it OK to just use "C String Pointer - const CStr"??
Thanks in advance!
05-06-2011 11:46 AM
I've never worked with it, but wchar_t* is probably the address of an array of wide characters (i.e. >8 bits per character). How wide may be compiler specific. What you'll probably need to do is to find out the width used by the DLL for wide characters, then convert your string into an array of unsigned integers of the appropriate width and in the appropriate format.
Without further documentation, I'd try simply converting the ASCII characters to an array of U16's (one character per element), and then passing that array to the DLL function.
Mark Moss
Electrical Validation Engineer
GHSP
09-16-2015 02:46 PM
hi,
Do u have any example VI for this.
I am also facing the similar problem.
I am quite new to LabVIEW
😞
09-17-2015 06:26 PM
Raman_is_Here,
Can you provide details about what it is you are trying to accomplish and what specific questions you have?
09-18-2015 07:42 AM
See here for a (32bit only) VI library that allows to convert between LabVIEW and Unicode UTF-16 format and vv.
For LabVIEW 64 bit the Library would in parts need to be updated to use pointer sized integers where it passes an uInt32 as string pointer to the Windows API functions.