On Fri, 13 Mar 2015, aradeonas wrote:

OK,So in the end how can I cast a Interface to a Object in Lazarus?

You can not. You are not even supposed to be able to do that.

You can only query other interfaces from an existing interface.

See my first mail: define N interfaces. When you receive an IFile interface 
from somewhere,
query it for the other interfaces:

Var
  MyFile : IFile;
  MyVideo : IVideo;


begin
  MyFile:=MyFileList[i];
  if MyFile.QueryInterface(IVideo,MyVideo)=0 then
    begin
    // MyVideo now holds a IVideo interface.
    end;
end;


Michael.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to