F
fwcy
Unregistered / Unconfirmed
GUEST, unregistred user!
本人在DELPHI5中调用函数getusername,在EDIT1中显示登录网络的用户名,一切正常!程序如下。
但在DELPHI6和DELPHI7中调用就显示乱码。请大家参与该怎么处理?
procedure Tform1.FormShow(Sender: TObject);
var
user:string;
tmpuserchar;
size:dword;
begin
size:=20;
getusername(tmpuser,size);
user:=tmpuser;
edit1.Text:=user;
end;
但在DELPHI6和DELPHI7中调用就显示乱码。请大家参与该怎么处理?
procedure Tform1.FormShow(Sender: TObject);
var
user:string;
tmpuserchar;
size:dword;
begin
size:=20;
getusername(tmpuser,size);
user:=tmpuser;
edit1.Text:=user;
end;