Ejemplo n.º 1
0
        /// <inheritdoc />
        public ErrorCode SCardGetStatusChange(IntPtr context, uint timeout, AbstractReaderState[] readerStates, uint readers)
        {
            ErrorCode ret;

            var scReaderStates = new ScardReaderState[readerStates.Length];

            for (var i = 0; i < readerStates.Length; i++)
            {
                scReaderStates[i]     = ((ReaderState)readerStates[i]).ScReaderState;
                scReaderStates[i].atr = null;
            }

            unsafe
            {
                ret = UnsafePrimitives.SCardGetStatusChange((void *)context, timeout, scReaderStates, (uint)scReaderStates.Length);
            }

            for (var i = 0; i < readerStates.Length; i++)
            {
                ((ReaderState)readerStates[i]).ScReaderState = scReaderStates[i];
            }

            return(ret);
        }
Ejemplo n.º 2
0
 public ReaderState()
 {
     ScReaderState = new ScardReaderState();
 }