It's not so straightforward. If I have 12 tasks, then I need 12 readers and 12 arrays to store the data. How do I handle selection of which reader and array I am using for any given call to the callback function?
Private Sub AnalogInCallback(ByVal ar As IAsyncResult)
Try
If taskRunning = True Then
Task1Data = reader(0).EndReadMultiSample(ar)
reader(0).BeginReadMultiSample(numSamples, myAsyncCallback, ?????)
End If
Catch exception As DaqException
MessageBox.Show(exception.Message)
Tasks(0).Dispose()
taskRunning = False
End Try
End Sub
Programming Data Acquisition and Control in Measurement Studio and Labwindows/CVI