N
nhlong320
Unregistered / Unconfirmed
GUEST, unregistred user!
各位大侠,我做的程序只能实现连接,就是不读卡;请大哥们开导开导,我就这些分了,大侠还是帮帮我
procedure TchatForm.connectItemClick(Sender: TObject);
var
Server:string;
ClickedOK: Boolean;
begin
if ClientSocket.Active then
ClientSocket.Active := False;
ClickedOK:=InputQuery('请输入主机名或IP','主机或IP',server);
if ClickedOK then
with ClientSocket do
begin
Host := Server;
Active := True;
ListenItem.Checked := False;
end;
end;//连接成功;
procedure TchatForm.FirmwareClick(Sender: TObject);
var
sData : array[0..4] of byte;
begin
sData[0]:=$5;
sData[1]:=$0;
sData[2]:=$0;
sData[3]:=216;
sData[4]:=147;
clientsocket.Socket.SendBuf(sData,5);
end;//给服务器发命令;(说明:服务器是一台读卡机)
procedure TchatForm.ClientSocketRead(Sender: TObject;
Socket: TCustomWinSocket);
begin
Memo.Lines.Add(Socket.ReceiveText);
end;//接收数据;
可是不能接收数据,大侠帮帮我
procedure TchatForm.connectItemClick(Sender: TObject);
var
Server:string;
ClickedOK: Boolean;
begin
if ClientSocket.Active then
ClientSocket.Active := False;
ClickedOK:=InputQuery('请输入主机名或IP','主机或IP',server);
if ClickedOK then
with ClientSocket do
begin
Host := Server;
Active := True;
ListenItem.Checked := False;
end;
end;//连接成功;
procedure TchatForm.FirmwareClick(Sender: TObject);
var
sData : array[0..4] of byte;
begin
sData[0]:=$5;
sData[1]:=$0;
sData[2]:=$0;
sData[3]:=216;
sData[4]:=147;
clientsocket.Socket.SendBuf(sData,5);
end;//给服务器发命令;(说明:服务器是一台读卡机)
procedure TchatForm.ClientSocketRead(Sender: TObject;
Socket: TCustomWinSocket);
begin
Memo.Lines.Add(Socket.ReceiveText);
end;//接收数据;
可是不能接收数据,大侠帮帮我