接口可以有属性,但不能有域,看下面定义:
Error = interface(IDispatch)
['{00000500-0000-0010-8000-00AA006D2EA4}']
function Get_Number: Integer; safecall;
function Get_Source: WideString; safecall;
function Get_Description: WideString; safecall;
function Get_HelpFile: WideString; safecall;
function Get_HelpContext: Integer; safecall;
function Get_SQLState: WideString; safecall;
function Get_NativeError: Integer; safecall;
property Number: Integer read Get_Number;
property Source: WideString read Get_Source;
property Description: WideString read Get_Description;
property HelpFile: WideString read Get_HelpFile;
property HelpContext: Integer read Get_HelpContext;
property SQLState: WideString read Get_SQLState;
property NativeError: Integer read Get_NativeError;
end;