-
COM threading issue
Hi All,
My problem is thus :
Within my application there is a button which fires off some code which performs an import operation via a call to some unmanaged code.
The problem is that it can sometimes take an age to process.
Whats the best way to handle this solution ?
It would be nice if I had some kind of button allowing the user to cancel the operation if it takes to long but every time I touch threads and UI components I screw up big time.
Thanks in Advance :-)
-
Re: COM threading issue
If your unmanaged function is synchronous then cancelling it isn't really an option. If you want to call it in a background thread then, oddly enough, you should start a background thread and call it. Whether or not you screw up when accessing the UI is a completely unrelated issue.