Original![]()
Dual interfaces
(Windows only)
A dual interface is an interface
that supports both compile-time binding and runtime binding through Automation.
Dual interfaces must descend from IDispatch.
All methods of a dual interface (except from those inherited from IInterface and IDispatch) must use the safecall convention, and all method parameter and result types must be automatable. (The automatable types are Byte, Currency, Real, Double, Real48, Integer, Single, Smallint, AnsiString, ShortString, TDateTime, Variant, OleVariant, and WordBool.)
Automation objects (Windows only)
Dispatch interface types (Windows only)
译文
双重接口(仅适用于Windows)
双重接口是这样的接口:通过自动化操作,它既支持编译时绑定,也支持运行时绑定。双重接口必须起源于IDispatch。
All methods of a dual interface (except from those inherited from IInterface and IDispatch) must use the safecall convention, and all method parameter and result types must be automatable. (The automatable types are Byte, Currency, Real, Double, Real48, Integer, Single, Smallint, AnsiString, ShortString, TDateTime, Variant, OleVariant, and WordBool.)
双重接口中的所有方法(除了继承自IInterface和IDispatch的方法)必须使用safecall调用约定,并且所有方法参数及返回类型必须是可自动化的。(可自动化的类型包括Byte、Currency、Real、Double、Real48、Integer、Single、Smallint、AnsiString、ShortString、TDateTime、Variant、OleVariant以及WordBool。)