03-15-2006 10:56 AM
03-16-2006 06:39 PM
03-17-2006 09:49 AM - edited 03-17-2006 09:49 AM
Hi Ryan,
Thank you for replying to my post. "Reader callback" is not the approach that I would like to take. I would like to write a Windows MFC program using C++. This type of program would use a message queue, a message loop (provided by MFC), and a message handler. Most of the NI C++ examples are the traditional sequential programs with a main() function for a console program.
NI has an article "An Overview of DAQ Events and Occurences." In this article in the "MFC Notes" section it uses the message WM_NIDAQ_MSG and the message handler OnDAQMessage. I believe ON_MESSAGE is a macro with two parameters that is inserted into the Message Map. My guess is that this macro associates the WM_NIDAQ_MSG message with the OnDAQMessage member function. The last step is to call the function Config_DAQ_Event_Message.
I have followed the article, and my program compiles fine with one exception. When I add the line Config_DAQ_Event_Message(1,1,"AI0",5,4.9.4.8,0,0,0,0, WM_NIDAQ_MSG, 0) I get the the error LNK2019: unresolved external symbol _Config_DAQ_Event_Messag@ 48.
I think that there are some setting I am missing in Visual Studio because I get the same LNK2019 error when I add any other comand such as Init_DA_Brds.
Any observations on the approach?
How can I get rid of the LNK2019 error?
Thanks,
Kevin
Message Edited by EW on 03-17-2006 09:52 AM
03-20-2006 10:22 PM
03-27-2006 02:29 PM
Hi Ryan,
I will start to look into how to use the reader callback approach.
Thanks for your help.
Kevin