On Thu, 15 Apr 2010, Zaher Dirkey wrote:

IMyIntf = interface
 function GetValue: Variant;
end;

TMyObject=(TList, IMyIntf)
 ....
end;

Can not compile becuase it need to add this functions to TMyObject

        function QueryInterface(const iid : tguid;out obj) : longint;stdcall;
        function _AddRef : longint;stdcall;
        function _Release : longint;stdcall;

While i am not inherit IMyIntf from IUnknown or IInterface, Is there a
way to not add unnecessary functions (for me at least).

All interfaces inherit from IUnknown, unless you use corba interfaces:
{$INTERFACES CORBA}

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to