Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How to access error description in a string from error code returned by NI-DAQ driver?

I am tring to write codes to control NI-6703 for PCI using the NI-DAQ driver for C++.

In the sample codes, it calls "NIDAQErrorHandler" to retrieve the error description and display in the pop-up message box. The method is included with header file "nideqex.h", and implemented w/ the nidex32.lib

I would like to get the error description in a string rather than getting a message box. Is there a way to do that? Am I missig something here?

I managed to find the "NIDAQEx.c" source code on the internet, but it seems like the code is outdated, and the library is NOT really compiled from it, since it does not seems to have a call to any method that will return th
e error description in a string that got used to be displayed in the message box.

Is there a method that I can call and pass a error code, which will return the error description in a string?
0 Kudos
Message 1 of 3
(3,265 Views)
There is a function documented in dataacq.h called GetNIDAQErrorString that accomplishes what you would like.

Raecine Meza
NI
http://www.ni.com/ask
0 Kudos
Message 2 of 3
(3,265 Views)
GetNIDAQErrorString is working with LabWindows and is defined in dataacq.h, but is not working in Visual C++.Something else is needed.
0 Kudos
Message 3 of 3
(3,265 Views)