Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with PCI-6527 and Callback with DAQ Traditional

Hi all!

I have encountered a serious problem using callback function with traditional NI-DAQ driver when programming in C++. I use the following sentance:
'CMyThread* pThis = (CMyThread*) AfxGetThread( );'.
Unfortunately pThis is null, when callback function is called. Callback function is part of CMyThread class.
Is there a way to assign auxilliary variable to Traditional NI-DAQ? Or is there another way to get pointer to my own thread?

Best regards
0 Kudos
Message 1 of 3
(3,072 Views)
Hello kovalenkov,

You mentioned that you are looking for something to assign auxilliary variable to Traditional NI-DAQ. Unfortunately I'm not sure what it is that you are trying to do. What is the purpose of an auxilliary variable and why do you want to use it?

Regards,
0 Kudos
Message 2 of 3
(3,055 Views)
OK. It would be a nice thing to set pointer to your own thread, that callback function should somehow return. Never mind, I managed to get past this little problem with using static variable containing pointer to my thread.
0 Kudos
Message 3 of 3
(3,048 Views)