public static READERSTATE getReaderState(int hContext, String sReader) { READERSTATE[] rState = new READERSTATE[1]; rState[0].szReader = sReader; rState[0].dwCurrentState = (UInt32)CardState.UNAWARE; int i = SCardGetStatusChange(hContext, 0, rState, 1); if (i != SCARD_S_SUCCESS) { rState[0].dwEventState = (UInt32)CardState.UNKNOWN; } return(rState[0]); }
void TimerFunc(object o) { if (_readerState == READERSTATE.READYFORDISCONNECT || _readerState == READERSTATE.DISCONNECT) { BTTimer.Cancel(); _sendBuffer.Clear(); _NeedCommandResponseType = BTWAITCOMMANDRESPONSETYPE.NOWAIT; _readerState = READERSTATE.DISCONNECT; return; } BLERWEngineTimer(); return; }