服务器端 用Borland Socket server
客户端:好不容易找到这点代码
CheckPwdOK: Boolean;
dc:TDCOMConnection;
vf:OleVariant;//暂时没用,用来返回用户登录后其他信息
strxml:string;
begin
s := Trim(edtUserName.Text);
p := Trim(edtPassword.Text);
CheckPwdOK := False;
dc:=TDCOMConnection.Create(nil);
dc.ServerName:='XXXXX.PrjServer';
dc.ComputerName:='XXX.XX.XX.XX';
dc.Open;
if s = '' then
begin
pubmsg(GetMyStr(_PlsInputUserName));
edtUserName.SetFocus;
exit;
end;
try
dc.Open;
dc.AppServer.validateUser(s,p,SessionCode,vf);
if SessionCode<>'' then
begin