[Lazarus] How to cast a Interface to a Object in Lazaeus
mailinglists at geldenhuys.co.uk
Fri Mar 13 16:05:01 CET 2015
On 2015-03-13 14:52, Dmitry Boyarintsev wrote:
> Don't forget that Pascal is safe-type language.
> So "as" has also intent of checking an interface for being castable to
> an object instance.
As far as I know, that is just one of the differences between COM and
CORBA interfaces. I don't presume to know the internals but believe the
implementation differences (between 'as' and a direct typecast) is
something to do with GUID's and IUnknown availability. If they behaved
exactly the same in every instance, then FPC wouldn't have had two
interface modes. ;-)
Hence decide which interface mode suites you best.
> If an interface is originating from non-FPC environment
That is beyond the scope of my previous answers. I'm only referring to
FPC developed applications.
- Graeme -
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
More information about the Lazarus