Exemple #1
0
 public static bool IsSet(this SCardReaderStates src, SCardReaderStates states)
 {
     return((src & states) == states);
 }
Exemple #2
0
 public unsafe void WriteReaderState(void *pReaderStates, int index, SCardReaderStates currentState)
 {
     throw new System.NotImplementedException();
 }
Exemple #3
0
 unsafe void IPcscProvider.WriteReaderState(void *pReaderStates, int index, SCardReaderStates currentState)
 {
     (((SCardReaderState *)pReaderStates) + index)->CurrentState = currentState;
 }
Exemple #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();
 }
Exemple #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);
            }
        }