473,224 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

VC2005 problem:IAxWinHostWindow interface in a MFC project

When 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

CComQIPtr<IOleClientSite> spClientSite(GetControllingUnknown());

hr = m_spOleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, NULL, spClientSite, 0, m_hWnd, &m_rcPos);


The code to create the control is as below, where m_controlWindow is a


RECT rcClient;




if(!m_controlWindow.Create(this->GetSafeHwnd(), rcClient, _T("OutlookBar.PVOutlookBar.1"), WS_CHILD |


return false;

CComPtr<IAxWinHostWindow> spHost;

HRESULT hr = m_controlWindow.QueryHost(&spHost);

_bstr_t str("OutlookBar.PVOutlookBar.1");

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.


Jul 14 '06 #1
2 3636
9,065 Expert Mod 8TB
The assertion message and the exception bith suggest that you have failed to initialise something somewhere.

0xC0000005: Access violation reading location 0x00000000.

is most normally dereference of a NULL pointer i.e.

Expand|Select|Wrap|Line Numbers
  1. char *p=NULL;
  3. *p = 'B';
sorry I can not be more help, I am just not familiar enough with the classes/methods you are using.
Jul 14 '06 #2
I think you were trying to use ATL classes in MFC container app. Actually, if you want to create an ActiveX control in MFC container apps, you only need to call CWnd::CreateControl.
Nov 1 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

by: S Shulman | last post by:
Hi I added the MS Chart COM object to my program and it seems to work fine. But when I installed the updated program on the client's machine the I get the following error message file or...
by: Daniel Billingsley | last post by:
Today I went to compile a solution I've been working on for months. I've been off most of the last few months, so there's been a gap in the work, but I did compile it a few times earlier this...
by: Sin | last post by:
I have a solution in which I have 4 projects. P1 is a EXE project (dependencies : P2 and P4) P2 is a DLL project (dependencies : P4) P3 is a DLL project (dependencies : P2) P4 is a DLL project...
by: Bob | last post by:
In a particular project that I'm debugging (compiled as debug, not release) I cannot set a breakpoint inside a particular function. I click to set it, and magically, another file from another...
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
by: Yuanfei | last post by:
Hi There, I just found that there is a problem in vc2005 regarding to time_t and localtime. See code snippets belows. Using this code segment, I found that when ut is 86200, the corresponding...
by: fabioraciti | last post by:
I try to compile a project built using VC++6 in VC++ 2005 and got following errors when trying to build the project after clearing out all the other errors in *.CPP file: error C2248:...
by: piyushd.ganj | last post by:
i want any topics (not too much complex)on the c language for minor project in college....
by: mafaisal | last post by:
Hello Experts I am Using VB2005 I am Setting Back Ground Image for MdiForm But if we set the Layout of MDIForm RighttoleftLayout property is true then The Background image is not come when the...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.