D
Dan
Hi,
Need more help with this.
I have an array of objects (Computer class).
The class has a method that takes a while to run and I want it to run in
it's own thread.
So I have code like this:
Private ProcessResultHandler As AsyncCallback = AddressOf ProcessResults
For i = 0 To ComputerArray.GetUpperBound(0)
sfh = AddressOf ComputerArray(i).UninstallAgent
sfh.BeginInvoke(ProcessResultHandler, Nothing)
Next i
Public Sub ProcessResults(ByVal ar as IAsyncResult)
sfh.EndInvoke(ar)
End Sub
Now, I need to know from within ProcessResults which object invoked it. The
Computer class has a Name property
that I need to get at. Is this possible with the above code?
Thanks!
Dan
Need more help with this.
I have an array of objects (Computer class).
The class has a method that takes a while to run and I want it to run in
it's own thread.
So I have code like this:
Private ProcessResultHandler As AsyncCallback = AddressOf ProcessResults
For i = 0 To ComputerArray.GetUpperBound(0)
sfh = AddressOf ComputerArray(i).UninstallAgent
sfh.BeginInvoke(ProcessResultHandler, Nothing)
Next i
Public Sub ProcessResults(ByVal ar as IAsyncResult)
sfh.EndInvoke(ar)
End Sub
Now, I need to know from within ProcessResults which object invoked it. The
Computer class has a Name property
that I need to get at. Is this possible with the above code?
Thanks!
Dan