Keith Knight
Guest
|
Hello,
I'm looking to get some input on reading and writing to excel while inside a task. When we tried it in our application we noticed that on shutdown the addin would crash. If you weren't debugging and had the task manager open you would see werfault.exe pop up.
After digging around I found different post saying its possible, but it may also not work.
What we wanted to do is execute a Task handling reading from the active workbook, calls to the server, retrieving data, and rendering the sheets. While this task executes we were showing a wait dialog. It all worked great until you closed the application and you would see this crash.
After reading up on COM objects it sounds like Task and COM objects don't mix well. What I did then was remove everything out of the task and the crash went away. I was hoping to get a clearer answer here and make sure I'm not missing something. Is it safe to work with COM objects other than on the main thread and if so how? Any examples out there I could look at or does anyone know of any good reading material about it? |
|
Dmitry Kostochko
Add-in Express team
Posts: 2875
Joined: 2004-04-05
|
|