Hang in OleLockRunning: Office Automation

R

RAHUL

Hi All,

We have a OLE container implemented in our C++ application which allow
one to open/edit/save office files. But with the "PowerPoint 2007
Security Update for Microsoft PowerPoint 2007 (KB957789)" the
following call hangs while closing the OLE container.

// Code snippet
pointerToOleObject->Close(OLECLOSE_NOSAVE);
pointerToOleObject->SetClientSite(NULL);
pointerToOleObject->Unadvise(adviseTok);
OleLockRunning(pointerToOleObject, FALSE, FALSE); // This line hangs
pointerToOleObject->Release();
......

If we kill POWERPNT.exe from task manager then the operation resumes
successfully without any data loss, (when we same the opened ppt
file).

We have implemented our IMessageFilter::MessagePending and we return
PENDINGMSG_WAITDEFPROCESS from it always.
After OleLockRunning is called the control comes to
IMessageFilter::MessagePending quite a few number of times and then
the application hangs. I though of putting a timeout of 10 seconds in
MessagePending after which I will reject the COM call. But it seems
that all the callbacks to IMessageFilter::MessagePending are made
within very short time before the hang (< 2 seconds) therefore my
timeout code is never hit.

There is something wrong in my implementation but I could not find
where to look at. Could somebody please point me out to any area where
could the problem lie or what OLE calls should I check during
debugging.

Thanks in Advance
Regards
 

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