LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview and DLL String Pointers

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!  

0 Kudos
Message 1 of 5
(3,364 Views)

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

0 Kudos
Message 2 of 5
(3,361 Views)

hi,

 

Do u have any example VI for this.

I am also facing the similar problem.

I am quite new to LabVIEW

😞

0 Kudos
Message 3 of 5
(3,068 Views)

Raman_is_Here,

 

Can you provide details about what it is you are trying to accomplish and what specific questions you have?

RF R&D
National Instruments
0 Kudos
Message 4 of 5
(3,039 Views)

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.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 5
(3,007 Views)