473,320 Members | 2,177 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,320 software developers and data experts.

C2440 on COM_INTERFACE_ENTRY

For the following

BEGIN_COM_MAP(I_Command)
COM_INTERFACE_ENTRY(ICommand)
COM_INTERFACE_ENTRY(IDispatch)
COM_INTERFACE_ENTRY(IConnectionPointContainer)
COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer )
END_COM_MAP()

I get the error
error C2440: 'static_cast' : cannot convert from
'I_Command::_ComMapClass *' to 'IDispatch *'

ICommand is an interface that we defined and that implements
IDispatch.

It worked fine in VS6 but fails after converting to VS2005. It turns
out that there is already an ICommand interface defined in oledb.h
which is part of the VS2005 SDK.

How can I specify to use MY ICommand instead of the one in oledb??

Thanks for any help

Sep 20 '07 #1
3 2269
This was already answered for you in microsoft.public.vc.language several hours ago.

Please don't multipost. Crossposting is considered acceptable, although this is an inappropriate newsgroup anyway for this question.

Brian.
Sep 21 '07 #2
Ah, I see you posted here first. Hope your question was answered satisfactorily.

Sep 21 '07 #3
On Sep 21, 3:03 pm, "Brian Muth" <bm...@mvps.orgwrote:
Ah, I see you posted here first. Hope your question was answered satisfactorily.
Yes, I realized that this was not the appopriate forum, thanks.
I'm not sure why but I can't see my post in
microsoft.public.vc.language, perhaps it was removed?

Sep 23 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: RalphTheExpert | last post by:
Why am I getting the following C2440 error? public __gc class X { String* Y; X(); // Construct Y
0
by: Allen Maki | last post by:
/* I am trying to practice multidimensional array in a managed class using dynamical allocation. If I tried to compile the following codes, I would get the under mentioned c2440 error...
11
by: Tony Maresca | last post by:
I'm having a hard time understanding why I get the following error with the code shown. Can someone explain? public ref class Class1 { }; generic<typename Twhere T: Class1, gcnew()
2
by: johnsonbl | last post by:
pttempmonthaddr = &tempmonth; pttempdayaddr = &tempday; separate(date, pttempmonthaddr, pttempdayaddr);/*function call*/ printf("\nThe month entered is %s and day entered is %f.\n",...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.