C2440 on COM_INTERFACE_ENTRY

M

Mash

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
 
B

Brian Muth

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.
 
B

Brian Muth

Ah, I see you posted here first. Hope your question was answered satisfactorily.
 
M

Mash

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top