Real-Time Measurement and Control

Showing results for 
Search instead for 
Did you mean: 

initializing a BSTR in a .dll for TCP/IP

Hello Everyone! 

I'm trying to establish a TCP/IP connection between my computer and an external computer controlling a laser device. The sw on the laser only understands TLV commands and to send them over I have to use a .dll that I have to initialize in LabVIEW, but everytime I try, the wizard says that the BSTR type symbols cannot be defined. I tried to use a preprocessor definition but LabVIEW won't accept it (maybe I used the wrong one?) I also tried to 'fake' the structure of a BSTR and send it to the node but that didn't take either. 

I'm pretty new to LabVIEW and I have no experience in programming C or C++. 

Does anybody know a preprocessor definition I could try? Or some other solution? 


Thanks in advance, 


A desperate, soon to be, programmer

0 Kudos
Message 1 of 4

Hello TimVanDriessche


Have you seen this document?

Or you can contact with the laser manufacturer.

The best way to thank, is to give KUDOS
Message 2 of 4

Hello VA.KI,


Thank you for the reply! I've seen the article before though.

I figured out a correct conversion without using the .dll. It turns out I can build the correct command without a BSTR. 


Thank you for your time though! 🙂 





0 Kudos
Message 3 of 4

Good Day Tim,


I am in the exact same situation as you were. I need to communicate with a laser - a Trumark laser, through TCP/IP. I am also not sure how to define BSTR when using the Import Shared Library Wizard


How did you manage to solve this? If you are communicating with a Trumark laser, are you willing to share your vis?


Thank you,


0 Kudos
Message 4 of 4