- July 14, 2006 at 6:19 am #1945nigredoParticipantWhen I tried to use the IAxWinHostWindow interface in a MFC project I get the following
An assert in CComTypeInfoHolder::GetTI(LCID lcid) at
ATLASSUME(!InlineIsEqualGUID(*m_plibid, GUID_NULL) && “Did you forget to pass the LIBID to CComModule::Init?”);
If I ignore this assert then I get
Unhandled exception at 0x0176cfa8 in testcontAINER.exe: 0xC0000005: Access violation reading location 0x00000000.
at the lines in ActivateAx
hr = m_spOleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, NULL, spClientSite, 0, m_hWnd, &m_rcPos);
RedrawWindow(NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE | RDW_INTERNALPAINT | RDW_FRAME);
The code to create the control is as below, where m_controlWindow is a
if(!m_controlWindow.Create(this->GetSafeHwnd(), rcClient, _T(“OutlookBar.PVOutlookBar.1”), WS_CHILD |
WS_VISIBLE | WS_CLIPCHILDREN, WS_EX_CLIENTEDGE/*,IDC_OUTLOOKBAR*/))
HRESULT hr = m_controlWindow.QueryHost(&spHost);
hr = spHost->CreateControl(str, m_controlWindow, 0);
I can create the control in the ATLCon example for VC2005 but not in an MFC Container App created using VC2005.
Does anyone know why this is not working and how I can fix it.
- The forum ‘C++ Programming’ is closed to new topics and replies.