type
TLogin = class(TRemoteDataModule, ILogin)
private
{ Private declarations }
protected
class procedure UpdateRegistry(Register: Boolean; const ClassID, ProgID: string); override;
function OldPwd_To_NewPwd(const OldPwd: WideString): WideString; safecall;
function sp_get_username(const i_duty_office_code,
i_staff_code: WideString): WideString; safecall;
function GetStaff_Code(const GetAreaCode,
EdStaff_Code: WideString): WideString; safecall;
function GetPassWord(const edPassWord: WideString): WideString; safecall;
public
{ Public declarations }
FCount: Integer; //登录记数
// rAreaCode : TRegistry;
IfLogSuc:boolean;//是否登录成功
property Staff_Code: WideString read GetStaff_Code;
property PassWord: WideString read GetPassWord;
property ClickOk: Boolean read FClickOk write SetClickOk;
end;
为何该句property Staff_Code:WideString read GetStaff_Code;提示InCompatible Types?到底类型库中是如何使用Property的,是否也要传入参数,
如此是否太麻烦啦?有谁用过?
TLogin = class(TRemoteDataModule, ILogin)
private
{ Private declarations }
protected
class procedure UpdateRegistry(Register: Boolean; const ClassID, ProgID: string); override;
function OldPwd_To_NewPwd(const OldPwd: WideString): WideString; safecall;
function sp_get_username(const i_duty_office_code,
i_staff_code: WideString): WideString; safecall;
function GetStaff_Code(const GetAreaCode,
EdStaff_Code: WideString): WideString; safecall;
function GetPassWord(const edPassWord: WideString): WideString; safecall;
public
{ Public declarations }
FCount: Integer; //登录记数
// rAreaCode : TRegistry;
IfLogSuc:boolean;//是否登录成功
property Staff_Code: WideString read GetStaff_Code;
property PassWord: WideString read GetPassWord;
property ClickOk: Boolean read FClickOk write SetClickOk;
end;
为何该句property Staff_Code:WideString read GetStaff_Code;提示InCompatible Types?到底类型库中是如何使用Property的,是否也要传入参数,
如此是否太麻烦啦?有谁用过?
function GetStaff_Code(const GetAreaCode,
EdStaff_Code: WideString): WideString; safecall;
property Staff_Code: WideString read GetStaff_Code;
---------------------------------------
此时 GetStaff_Code 必须是无参数的函数。另外,delphi 中的 property 和 COM 中的 property 根本就是两个概念,不一样的!如果要使用的是 COM 中的 property,在 type library editor 中,选择工具栏的“New Property”。