LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send a DLL a lpcwstr input?

Hello, I have a windows DLL and it's asking for a lpcwstr input. When I setup my DLL call it gives me the following options for string types: C String Pointer, Pascal String pointer, String Handle, String Handle Pointer. None of these seem to work in my case. I'm guessing that this is because LPCWSTR is unicode based where most of the Labview string types have 1 byte per character. Has anyone had any luck feeding a LPCWSTR input?
CLED (2016)
0 Kudos
Message 1 of 8
(4,594 Views)
0 Kudos
Message 2 of 8
(4,581 Views)
Yes, I can't say it made much sense to me though. It sounded like the OP was either trying to call the DLL from C or call a LV DLL from C. I'm trying to call a DLL from LV. Let me know if I'm wrong. An example of calling a DLL that requires a LPCWSTR from LabVIEW would be great.
CLED (2016)
0 Kudos
Message 3 of 8
(4,565 Views)

How about this?

 

Using Call Library Function Nodes with a Windows DLL Requiring Unicode Inputs
Stephen Meserve
National Instruments
0 Kudos
Message 4 of 8
(4,551 Views)
Excuse the male pattern blindness but I didn't see any links to the mentioned STR_ASCII-Unicode. I searched the built in palette but I can't find it. Also, I still don't know which of the four string parameter options to use for the DLL call.
CLED (2016)
0 Kudos
Message 5 of 8
(4,539 Views)

Ah, figured out the first question: the vi is in vi.lib/registry.llb

The DLL still isn't acting like it's getting a proper input though. I'm not quite sure why. I'll keep trying different things here.

Message Edited by InfiniteNothing on 01-05-2010 02:16 PM
CLED (2016)
0 Kudos
Message 6 of 8
(4,527 Views)
Excuse the frequent updates. I think it all works now. In my specific case I had to use the C String Pointer  format with the constant check box checked. Thanks!
Message Edited by InfiniteNothing on 01-05-2010 02:37 PM
CLED (2016)
0 Kudos
Message 7 of 8
(4,522 Views)

InfiniteNothing wrote:
Excuse the frequent updates. I think it all works now. In my specific case I had to use the C String Pointer  format with the constant check box checked. Thanks!
Message Edited by InfiniteNothing on 01-05-2010 02:37 PM

Infact it is grt that you are updating.

0 Kudos
Message 8 of 8
(4,478 Views)