Esempio n. 1
0
 static extern Result SCardConnect(
     IntPtr context,
     String szReaderName,
     Sharing dwShareMode,
     CardProtocol dwPrefProtocol,
     out IntPtr hCard,
     out CardProtocol ActiveProtocol);
Esempio n. 2
0
 static extern Result SCardStatus(
     IntPtr hCard,
     byte[] szReaderName,
     ref int pcchReaderLen,
     ref CardState state,
     ref CardProtocol protocol,
     byte[] ATR,
     ref int ATRLen);
Esempio n. 3
0
 public bool DisconnectCard()
 {
     try
     {
         if (_cardHandle != IntPtr.Zero)
         {
             _result = SCardDisconnect(_cardHandle, Disposition.SCARD_LEAVE_CARD);
         }
     }
     finally
     {
         _cardHandle = IntPtr.Zero;
         _state      = CardState.SCARD_ABSENT;
         _protocol   = CardProtocol.SCARD_PROTOCOL_UNDEFINED;
         _atr        = new byte[0];
         _cardUID    = new byte[0];
         _response   = new byte[0];
     }
     return(true);
 }
Esempio n. 4
0
 static extern Result SCardState(
     IntPtr hCard,
     ref CardState state,
     ref CardProtocol protocol,
     ref byte[] ATR,
     ref UInt32 ATRLen);