I have a MFC-based OLE application which is loading MS-Excel in an embedded OLE container. This worked fine for years. But after installing the Office Update mentioned above in the subject the application is crashing, yet.
The function XDocumentSite::ActivateMe does the following steps:
Create a view for the embedded document
if (FAILED(pThis->m_lpObject->QueryInterface(IID_IOleDocument, (void **)&pDoc))) return E_FAIL; if (FAILED(pDoc->CreateView(&pThis->m_xOleIPSite, 0, 0, &pView))) return E_OUTOFMEMORY; // Release doc pointer since CreateView is a good com method that addrefs pDoc->Release(); }
Initialize the UI of the view.
Set the view rectangle.
Show the view (make it visible).
Steps 1. and 2. are working as expected. The problem is step 3: the GetActiveView() method is returning a NULL pointer. But I don't know why.
I made a Visual Studio solution example (VS 2019) with which the error can be reproduced reliably.
Does anyone know this problem or can help investigate?