I have this interface called "IViewFrame" its implementation is like this:
Code: Select all
__interface INTERFACE_UUID("{D307ACE9-FE13-4F11-BEEB-A15C908579BC}") IViewFrame : public System::IInterface
{
//---------------------------------------------------------------------------
protected:
//Setters/Getters
virtual void __fastcall SetView(TView *Value) = 0;
virtual TView* __fastcall GetView() = 0;
//---------------------------------------------------------------------------
public:
//Fields/Properties
__property TView *View = {read = GetView, write = SetView};
//---------------------------------------------------------------------------
};
//---------------------------------------------------------------------------
typedef System::DelphiInterface<IViewFrame> _di_IViewFrame;
Code: Select all
class TVCLFrame : public TFrame, IViewFrame
{
__published: // IDE-managed Components
private:
//Fields
TView *FView;
//---------------------------------------------------------------------------
protected:
//Setters/Getters
virtual void __fastcall SetView(TView *Value);
virtual TView* __fastcall GetView();
public: // User declarations
__fastcall TVCLFrame(TComponent* Owner);
INTFOBJECT_IMPL_IUNKNOWN(TFrame);
};
//---------------------------------------------------------------------------
Code: Select all
class TFmxFrame : public TFrame, IViewFrame
{
__published: // IDE-managed Components
TBindingsList *BindingsList;
TBindSourceDB *BindSourceDB;
TBindNavigator *BindNavigator1;
private: // User declarations
TView *FView;
protected:
//Setters/Getters
virtual void __fastcall SetView(TView *Value);
virtual TView* __fastcall GetView();
public: // User declarations
__fastcall TFmxFrame(TComponent* Owner);
INTFOBJECT_IMPL_IUNKNOWN(TFrame); // I get the error here
};
//---------------------------------------------------------------------------
[bcc32 Error] FmxFrameU.h(50): E2113 Virtual function '__stdcall TFmxFrame::Release()' conflicts with base class 'TFmxObject'
Full parser context
FmxFrameU.h(33): class TFmxFrame
[bcc32 Error] FmxFrameU.h(50): E2113 Virtual function '__stdcall TFmxFrame::Release()' conflicts with base class 'TFmxObject'
Full parser context
FmxFrameU.h(33): class TFmxFrame
that conflicts with the one from IUnkown Interface.
How can i fix this issue i want this interface to work for both VCL and FMX without any troubles
Any help will be appreciated. Thanks in advance