Re: error MIDL2025 : syntax error : expecting { near ","
Donos <donguy76@gmail.com> wrote:
interface IVehicle : IUnknown
{
};
interface ICar : IVehicle
{
};
This now gives an error - error C2594: 'static_cast' : ambiguous
conversions from 'CVehicleProxy::_ComMapClass *' to 'IVehicle *'
The ERROR is happening related to second interface inheritance.
And the ERROR comes up in CoClass COM_MAP ENTRY, where
i have the code as,
COM_INTERFACE_ENTRY('IVehicle)
Have you, by any chance, derived CVehicleProxy from both ICar and
IVehicle? Don't do that. Just derive it from ICar: since ICar is derived
from IVehicle, CVehicleProxy will inherit methods of both. But if you
derive both from ICar and IVehicle, you effectively derive from IVehicle
twice, and that causes the ambiguity.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925