LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

ThreadSafe Variable in CVI

I am just starting out with ThreadSafe variables and I have no problem with them as long as I am within the same file. How do you use them in multiple files?
 
in main.cpp
typedef struct
{
 ...
} X;
DefineThreadSafeVar(X, tmp);
 
in main() I Initialize it
 
I can have routines in the main.cpp file that use GetPointer to and ReleasePointer to with no problem,
 
but I have a timer in another file that needs to access that data. If it was just a normal variable, I know that extern X tmp would work.
 
How do you do that?
 
Thanks in advance!!
 
Lee
0 Kudos
Message 1 of 4
(3,429 Views)
Hi Lee,

See if this discussion forum post here helps you out. This should be what you are looking for.
 
Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 2 of 4
(3,422 Views)

Hello Lee.

I think you will find your answer in this thread.

Good luck,
Colin.

You're too quick for me, Jonathan Smiley Happy



Message Edited by cdk52 on 02-14-2008 08:26 AM
0 Kudos
Message 3 of 4
(3,420 Views)

Thanks guys, that does the trick!

 

Lee

0 Kudos
Message 4 of 4
(3,406 Views)