05-02-2013 09:24 PM
Hello,
I am wondering if there is a way to duplicate a TaskHandle variable, for example
TaskHandle Task1, Task2;
DAQmxCreateTask ("", &Task1);
Task2 = Task1;
//configure and start Task1
DAQmxWriteAnalogF64 (Task2, ...);
I would expect this to work because since TaskHandle is defined as void*, any modifications to Task1 after the Task2=Task1 assignment should equally affect Task2. However, I receive a "Task specified is invalid or does not exist" error when writing to Task2, though Task1 works fine.
I would be glad to hear any suggestions.
Regards
Solved! Go to Solution.
06-13-2013 12:16 AM
Sorry, it turns out this was an error on my part and it actually works as expected.