DAQmxGetErrorString

NI-DAQmx C Functions

DAQmxGetErrorString

int32 DAQmxGetErrorString (int32 errorCode, char errorString[], uInt32 bufferSize);

Purpose

Converts the error number returned by an NI-DAQmx function into a meaningful error message.

If you pass in a valid value for errorString and its bufferSize, this function returns as much of the available data as possible.

If you pass NULL for errorString or 0 for bufferSize, this function returns the number of bytes you need to allocate.

Parameters

Input
Name Type Description
errorCode int32 An error code or warning returned by one of the NI-DAQmx Library functions.
bufferSize uInt32 The size, in bytes, of the buffer passed in the errorString. If you pass 0, this function returns the number of bytes you need to allocate.
Output
errorString char [] The meaningful error message for the error number. If you pass NULL, this function returns the number of bytes you need to allocate.

Return Value

Name Type Description
status int32 The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A negative value indicates an error.
If you pass in a valid value for errorString and its bufferSize, this function returns as much of the available data as possible.
If you pass NULL for errorString or 0 for bufferSize, this function returns the number of bytes you need to allocate.