G
Guest
I have a BackgroundWorker component that I am using as:
Dim arguments As XmlSentArguments = New XmlSentArguments
arguments.TransactionId = 10
arguments.OrderId = "na"
workerThread.RunWorkerAsync(arguments)
The thread seems to get started and it completes. I put a breakpoint in
DoWork that looks like:
Dim worker As BackgroundWorker = _
CType(sender, BackgroundWorker)
e.Result = BackgroundXMLSent(e.Argument, worker, e)
Since I am not interested in cancelation or progress the BackgrounXMLSent
routine just looks like:
Function BackgroundXMLSent(ByVal arguments As XmlSentArguments, ByVal
worker As BackgroundWorker, ByVal e As DoWorkEventArgs) As String
Return XMLSent(arguments.TransactionId, arguments.OrderId)
End Function
I have verified in the debugger that the routine XMLSent is returning so
BackgroundXMLSent is returning. The problem is the the event
RunWorkerCompleted does not get fired and the component always shows IsBusy
as True. Any ideas as to why this event is not firing and why the component
is always busy after the first call?
Thank you.
Kevin
Dim arguments As XmlSentArguments = New XmlSentArguments
arguments.TransactionId = 10
arguments.OrderId = "na"
workerThread.RunWorkerAsync(arguments)
The thread seems to get started and it completes. I put a breakpoint in
DoWork that looks like:
Dim worker As BackgroundWorker = _
CType(sender, BackgroundWorker)
e.Result = BackgroundXMLSent(e.Argument, worker, e)
Since I am not interested in cancelation or progress the BackgrounXMLSent
routine just looks like:
Function BackgroundXMLSent(ByVal arguments As XmlSentArguments, ByVal
worker As BackgroundWorker, ByVal e As DoWorkEventArgs) As String
Return XMLSent(arguments.TransactionId, arguments.OrderId)
End Function
I have verified in the debugger that the routine XMLSent is returning so
BackgroundXMLSent is returning. The problem is the the event
RunWorkerCompleted does not get fired and the component always shows IsBusy
as True. Any ideas as to why this event is not firing and why the component
is always busy after the first call?
Thank you.
Kevin