From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL help

Solved!
Go to solution
Solution
Accepted by topic author D60

If you are still looking for a direct solution, one more try... my previous attempt with the strings probably failed when LabVIEW encountered the first NULL value in the data and cut the string short at that point.  See if this fixes it, by converting to an array of U8 first.  If not, it is possible to use DSNewPtr, as in my first reply, to duplicate the C example code, but that is more complicated.

 

is_GetCameraList.png

0 Kudos
Message 11 of 14
(684 Views)

GREAT!!!!!!!!!

 

Works!!!!!! U'r great!! Thank you very much!!!!!

---
+++ In God we believe, in Trance we Trust +++
[Hungary]
0 Kudos
Message 12 of 14
(668 Views)

Hello !

 

can anyone please help me with a dll issue.I have a c++ class that peforms certain functions.i have created a dll that creates an object of this class to access functions to this class that can be used in labview.now when i run this dll in parallel using call library node function.the results are not correct.for example if my class performs addition of two numbers the 2-separate instances of the dll in labview would mix the addition result with each other.what do i need to do in order to run the dll in parallel.

 

Thank you.

0 Kudos
Message 13 of 14
(575 Views)

Your DLL needs to be re-entrant.  This isn't a LabVIEW problem, it's a problem in the way you wrote or compiled your DLL.  You'll need to look at the documentation for your development environment to find out how to write and build the DLL so that it is thread-safe.

 

Alternatively, if you do not need to run functions in the DLL in parallel, change the Call Library Function Node setup to call the DLL in the user interface thread.  This will keep calls to the DLL in a single thread, and the functions will execute serially instead of in parallel which will avoid mixing data between calls.

0 Kudos
Message 14 of 14
(563 Views)