public static bool IsSet(this SCardReaderStates src, SCardReaderStates states) { return((src & states) == states); }
public unsafe void WriteReaderState(void *pReaderStates, int index, SCardReaderStates currentState) { throw new System.NotImplementedException(); }
unsafe void IPcscProvider.WriteReaderState(void *pReaderStates, int index, SCardReaderStates currentState) { (((SCardReaderState *)pReaderStates) + index)->CurrentState = currentState; }
public unsafe void ReadReaderState(void *pReaderStates, int index, out void *pReaderName, out SCardReaderStates currentState, out SCardReaderStates eventState, out byte[] atr) { throw new System.NotImplementedException(); }
unsafe void IPcscProvider.ReadReaderState(void *pReaderStates, int index, out void *pReaderName, out SCardReaderStates currentState, out SCardReaderStates eventState, out byte[] atr) { var pReaderState = ((SCardReaderState *)pReaderStates) + index; pReaderName = pReaderState->Reader; currentState = pReaderState->CurrentState; eventState = pReaderState->EventState; var atrLength = pReaderState->AtrLength; if (atrLength <= 0) { atr = null; } else { Marshal.Copy((IntPtr)pReaderState->Atr, atr = new byte[atrLength], 0, atrLength); } }