Exemplo n.º 1
0
 public unsafe PcscConnection Reconnect(SCardShare shareMode, SCardProtocols protocol, SCardDisposition initializationDisposition = SCardDisposition.Leave, PcscExceptionHandler onException = null)
 {
     if (IsDisposed)
     {
         throw new ObjectDisposedException(nameof(PcscConnection), nameof(Reconnect));
     }
     Provider.SCardReconnect(Handle, shareMode, protocol, initializationDisposition, &protocol).ThrowIfNotSuccess(onException);
     ShareMode = shareMode;
     Protocol  = protocol;
     return(this);
 }
Exemplo n.º 2
0
        public unsafe PcscConnection Connect(SCardShare shareMode, SCardProtocols protocol, PcscExceptionHandler onException = null)
        {
            if (IsDisposed)
            {
                throw new ObjectDisposedException(nameof(PcscConnection), nameof(Connect));
            }
            SCardHandle handle;

            Provider.SCardConnect(Context.Handle, ReaderName, shareMode, protocol, &handle, &protocol).ThrowIfNotSuccess(onException);
            Handle    = handle;
            ShareMode = shareMode;
            Protocol  = protocol;
            return(this);
        }
Exemplo n.º 3
0
 public unsafe static extern SCardError SCardConnect(SCardContext hContext, string szReader, SCardShare dwShareMode, SCardProtocols dwPreferredProtocols, SCardHandle *phCard, SCardProtocols *pdwActiveProtocol);
Exemplo n.º 4
0
 public unsafe SCardError SCardReconnect(SCardHandle hCard, SCardShare dwShareMode, SCardProtocols dwPreferredProtocols, SCardDisposition dwInitialization, SCardProtocols *pdwActiveProtocol)
 {
     throw new System.NotImplementedException();
 }
Exemplo n.º 5
0
 unsafe SCardError IPcscProvider.SCardConnect(SCardContext hContext, string szReader, SCardShare dwShareMode, SCardProtocols dwPreferredProtocols, SCardHandle *phCard, SCardProtocols *pdwActiveProtocol)
 {
     return(SCardConnect(hContext, szReader, dwShareMode, dwPreferredProtocols, phCard, pdwActiveProtocol));
 }
Exemplo n.º 6
0
 public unsafe static extern SCardError SCardReconnect(SCardHandle hCard, SCardShare dwShareMode, SCardProtocols dwPreferredProtocols, SCardDisposition dwInitialization, SCardProtocols *pdwActiveProtocol);
Exemplo n.º 7
0
 unsafe SCardError IPcscProvider.SCardReconnect(SCardHandle hCard, SCardShare dwShareMode, SCardProtocols dwPreferredProtocols, SCardDisposition dwInitialization, SCardProtocols *pdwActiveProtocol)
 {
     return(SCardReconnect(hCard, dwShareMode, dwPreferredProtocols, dwInitialization, pdwActiveProtocol));
 }
Exemplo n.º 8
0
 public PcscConnection Connect(string readerName, SCardShare shareMode, SCardProtocols protocols, PcscExceptionHandler onException = null)
 {
     return(CreateConnection(readerName).Connect(shareMode, protocols, onException));
 }