Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

clear task handle

hi
 
My application needs to clear the existing task handle
before creating another task.
 
i need acheive this, how can i find the task handle "id"
and clear that.
 
do let me know.
 
regards
 
rags
0 Kudos
Message 1 of 2
(6,547 Views)
DAQmxClearTask
int32 DAQmxClearTask (TaskHandle taskHandle);

Clears the task. Before clearing, this function stops the task, if necessary, and releases any resources reserved by the task. You cannot use a task once you clear the task without recreating or reloading the task.

If you use the DAQmxCreateTask function or any of the NI-DAQmx Create Channel functions within a loop, use this function within the loop after you finish with the task to avoid allocating unnecessary memory.

The task handle is the same value of type TaskHandle you used when you created the task

Elijah Kerry
NI Director, Software Community
0 Kudos
Message 2 of 2
(6,529 Views)