当前位置:编程学习 > C#/ASP.NET >>

请教使用PCSC SCardTransmit向卡片发送指令失败的问题

--------------------编程问答-------------------- public struct SCARD_IO_REQUEST
    {
        public int dwProtocol;
        public int cbPciLength;
    }

SCARD_IO_REQUEST SendPci, SCARD_PCI_T1;

 
 byte[] SendAPDU = { 0x80, 0x50, 0x00, 0x00, 0x08, 0x11, 0x22, 0x33, 0x44, 0x55,  0x66, 0x77, 0x88 };
 byte[] Resp = new byte[2];
 int RespLen = 2;
 SendPci.dwProtocol = RecvPci.dwProtocol = dwActProtocol;
 RecvPci.cbPciLength = RecvPci.cbPciLength = 8;

retCode = SCardTransmit(hCard, ref SCARD_PCI_T1, SendAPDU, SendAPDU.Length, ref RecvPci, Resp, ref RespLen); 

以上这样修改即可得到卡片的正常返回值。 --------------------编程问答-------------------- SCARD_PCI_T1

你哪里不会报“使用了未赋值的局部变量”吗?
我现在SCardTransmit这个还调用不成功,有例子吗?
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,