2011/1/31 Andrew Hall <andrew.h...@shaw.ca>: > Interfaces do not behave like classes. Each each interface > implemented/supported by a class is unique - at runtime a "descendent" > interface is entirely unrelated to its ancestor.
Ok, so in this assignment var iBase: IBaseInterface; iDesc: IDescInterface; begin iBase := iDesc; end; iBase still holds a pointer to IDescInterface of the class instance, but in this begin iBase := iDesc as IBaseInterface; end; it is now a pointer to IBaseInterface, because of implicit QueryInterface? So, I think I can compare interface variables but first I have to bring them to the same interface using "as", for example to IUnknown. -- cobines _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal