DAQmxGetNthTaskDevice

NI-DAQmx C Functions

DAQmxGetNthTaskDevice

int32 DAQmxGetNthTaskDevice (TaskHandle taskHandle, uInt32 index, char buffer[], int32 bufferSize);

Purpose

Returns the Nth device. This function takes the taskHandle, index, and bufferSize you specify and returns the Nth device.

Parameters

Input
Name Type Description
taskHandle TaskHandle The task used in this function.
index uInt32 The Nth device you want to return. The index starts at 1.
bufferSize int32 The size, in bytes, of buffer. If you pass 0, this function returns the number of bytes needed to allocate.
Output
buffer char [] The Nth device in the index. If you pass NULL, this function returns the number of bytes needed 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.
For this function, if you pass NULL for the buffer or 0 for the buffer size, this function returns the number of bytes needed to allocate.