Click here to Skip to main content
15,905,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
I have an app that is using OLE compound storage and for each stream it uses an CArchive that has the boolean m_bForceFlat on FALSE.

If I perform a copy on an PowerPoint object and place into my app, it pastes properlly.

The interesting thing is that I can save the document once, no issues...but when I save the document a second time, i get this weird error "attempted to use an object that has ceased to exist"

if I delete the OLE object and paste again from PowerPoint, i can save one time without issues, but a second save would give me the same error.

Now, If on the CArchive object used internally I switch m_bForceFlat to TRUE, the problem is solved.

I can't deliver the code that way (with the boolean on TRUE) beacuse of some internal reasons.

The function that failes deep inside OLE is ::OleSave with STG_E_REVERTED result.

Does anyone has an idea why is this error being produced like this?

Thanks,
Sorin.
Posted
Comments
Sergey Alexandrovich Kryukov 14-May-13 14:22pm    
OK, you somehow ended up with a zombie object you still try to reference. How can we see where did you do it if you did not provide any code sample?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900