Example #1
0
 public static bool IsSet(this SCardReaderStates src, SCardReaderStates states)
 {
     return((src & states) == states);
 }
Example #2
0
 public unsafe void WriteReaderState(void *pReaderStates, int index, SCardReaderStates currentState)
 {
     throw new System.NotImplementedException();
 }
Example #3
0
 unsafe void IPcscProvider.WriteReaderState(void *pReaderStates, int index, SCardReaderStates currentState)
 {
     (((SCardReaderState *)pReaderStates) + index)->CurrentState = currentState;
 }
Example #4
0
 public unsafe void ReadReaderState(void *pReaderStates, int index, out void *pReaderName, out SCardReaderStates currentState, out SCardReaderStates eventState, out byte[] atr)
 {
     throw new System.NotImplementedException();
 }
Example #5
0
        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);
            }
        }