Beispiel #1
0
        public static int SCardTransmit(IntPtr hCard, byte[] sendData, byte[] recvData)
        {
            IntPtr         sendCode = GetPciT1();
            uint           sendSize = (uint)sendData.Length;
            uint           recvSize = (uint)recvData.Length;
            SCardIORequest recvCode = new SCardIORequest(0, recvSize + 2);
            SCardResult    result   = SCardTransmit(hCard, sendCode, sendData, sendSize, ref recvCode, recvData, ref recvSize);

            if (result == SCardResult.SCARD_S_SUCCESS)
            {
                return((int)recvSize);
            }
            else
            {
                return(-1);
            }
        }
Beispiel #2
0
 public static extern SCardResult SCardTransmit([In] IntPtr hCard, [In] IntPtr pioSendPci, [In] Byte[] pbSendBuffer, [In] UInt32 cbSendLength, [In, Out, Optional] ref SCardIORequest pioRecvPci, [Out] Byte[] pbRecvBuffer, [In, Out] ref UInt32 pcbRecvLength);