Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / September 2007

Tip: Looking for answers? Try searching our database.

C2440 on COM_INTERFACE_ENTRY

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mash - 20 Sep 2007 20:21 GMT
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
Brian Muth - 21 Sep 2007 19:59 GMT
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.
Brian Muth - 21 Sep 2007 20:03 GMT
Ah, I see you posted here first. Hope your question was answered satisfactorily.
Mash - 23 Sep 2007 01:23 GMT
> 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?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.