Thread in addin for MS Word

T

Tomaz

Hi
I'm trying to add a toolbar menu which would send text
into document. Addin COM is implemented in Visual C++.
When a button event calls method TypeText everything
works fine. But if button event triggers an event which
starts thread with TypeText method I get "Unhandled
Exception" error.

I would appreciate any links to similar problems, too.

Thanks in advance
Tom
 
C

Chango V.

Word's API is single-threaded. You may be violating COM marshaling rules
with the extra thread. (If you have to make calls into Word's API from
another thread, you can't just use the same Word API reference
variables--you have to marshal them first.)

//
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top