VC++-App hangs on exit when using Word via automation

A

Artur Loewen

Hi NG,

I use Word9 via automation from within a wrapper-dll for report generation.
The dll exports C++ classes which are used in my app.
I start Word create a new document from a doc-template set some doc
variables.
So far everything works like expected.
Now after I insert autotext-templates at a bookmark and I want to exit my
app it won't exit, unless I close Word before closing my app.
The debugger (VC++ 6.0) shows that the app is hanging in the
ole32.dll-context, far after the last debugable sourcecode.
I tried to debug but I couldn't find an error. It looks like every
COM-Pointer is correctly released.
The strangest thing is, in an seperate small test-app that uses the same dll
and executes the same steps everything works fine.

Has anyone an idea where I can start to find the error. I'm completely lost.

Thanks in advance

Artur Löwen
 
A

Artur Loewen

I found the error myself. The call to CoInitialize in an other dll caused
the trouble.
 

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