830
社区成员
发帖
与我相关
我的任务
分享
begin
getmem(DataBuff,256);
DataLen:=255;
sendpci.dwProtocol:=SCARD_PROTOCOL_T0;
sendpci.dbpcilength:=sizeof(sendpci);
sl :=TStringList.Create;//存储载入的文本文件
sl.LoadFromFile('c:\cos1.txt');
for l:=0 to sl.Count-1 do //逐行处理
begin
sendbuff:=Hex2Bin(sl.Strings[l]);
Lensend:=Length(SendBuff);
ret:=SCardTransmit(hCard,SendPci,sendbuff,Lensend,SendPci,DataBuff,DataLen);
if ret<>0 then
begin
edit14.Text:='ERROR';
Exit;
end;
end ;
sl.Free;
end