MS Word Application marshalling

A

Areg

I'm developing dialog box, in which i need to perform looped actions.
Because of redraw problem (dialog box doesn't be in time to get redrawed)
I've tried to
move that looped action into another thread. But when I need to gain access
to IDispatch*
of opened in dialog box class Word application, I get "Variable is
marshalled for another thread" HRESULT. I've tried to use
CoMarshalInterThreadInterfaceInStream, CoGetInterfaceAndReleaseStream
functions, but after first invoke on released interface I get E_UNEXPECTED.
May be there is another way to access IDispatch from another thread.

Thanks in advance.
Areg
 
Top