A
Andy Fish
Hi,
I am using COM interop to invoke MS word from my .net app. If word pops up a
dialog box, my thread obviously hangs until the dialog is answered.
Here's the problem: because the app is running on a server, there is nobody
there to answer the dialog, so I have another thread that calls Abort() on
the first thread in the event that the operation doesn't complete within a
certain amount of time.
Unfortunately, whilst the call to Thread.Abort() works, the dialog box stays
up and the subsequent Thread.Join() hangs until the dialog is cancelled.
Is there any way round this behaviour? This isn't going to happen very often
so I don't care how inefficient it is, but it's got to run on an unattended
server so I can't afford to have my app get stuck forever.
TIA
Andy
I am using COM interop to invoke MS word from my .net app. If word pops up a
dialog box, my thread obviously hangs until the dialog is answered.
Here's the problem: because the app is running on a server, there is nobody
there to answer the dialog, so I have another thread that calls Abort() on
the first thread in the event that the operation doesn't complete within a
certain amount of time.
Unfortunately, whilst the call to Thread.Abort() works, the dialog box stays
up and the subsequent Thread.Join() hangs until the dialog is cancelled.
Is there any way round this behaviour? This isn't going to happen very often
so I don't care how inefficient it is, but it's got to run on an unattended
server so I can't afford to have my app get stuck forever.
TIA
Andy