With Objects we have Class Types so the below is possible

TMyObject = class(TObject)
public
  Spam :Integer;
end;

TMyObjectClass = class of TMyObject;

procedure Inherits(C :TClass; O :TObject):Boolean;
begin
  result := O is C;
end;

Can this be donw with interfaces

IMyObject = interface(IUnknown)
  function GetSpam:Integer;
end

procedure Inherits(I :???; O :IUnknown):Boolean;
begin
  result := O is C; // (or collecting the GUID of I and O.queryInterface for an 
HResult)
end;

It's the end of the day and nearing the end of the week and I'm sure I'm missing 
something
obvious...

--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to