Interface Assignment Compatibility Variables of a given class type are assignment-compatible with any interface type implemented by the class.
Variables of an interface type are assignment-compatible with any ancestor interface type. The value nil can be
assigned to any interface-type variable.
An interface-type expression can be assigned to a variant. If the interface is of type
IDispatch
or a descendant,
the variant receives the type code
varDispatch
. Otherwise, the variant receives the type code
varUnknown
.
A variant whose type code is
varEmpty
,
varUnknown
, or
varDispatch
can be assigned to an
IInterface
variable. A variant whose type code is varEmpty or varDispatch can be assigned to an
IDispatch
variable.