Smartcard driver

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: sergeir (anonymous_at_discussions.microsoft.com)
Date: 11/22/04


Date: Mon, 22 Nov 2004 00:18:36 -0800

Hi,

do you mean the use of Winscard.lib or the use of
Smclib.lib ?

In our development platform when using Winscard.lib 2
different smart card readers connected to the platform
create two smart card devices - EZR1: and EZU1: by use of
one smart card reader driver, present in the system.

Then you can address each physical smart card reader by
accessing it by a number, like in

SCardEstablishContext() ...
SCardListReaders() call it twice, then do a loop

     while((*readerName != '\0') && (ReadersNum <
MAX_READER_NUMBER))
           {

          ScardReaderState[ReadersNum].szReader = (LPTSTR)
readerName;
          ScardReaderState
[ReadersNum].dwCurrentState=SCARD_STATE_UNAWARE;
          ++ReadersNum;
          readerName += wcslen(readerName) + 1;
       };

now you can work with chosen physical smart card reader
selecting it by number name in ScardReaderState array of
structures like in

result = SCardConnect(ScardContext,
                             ScardReaderState
[CurrentReader].szReader,
                             SCARD_SHARE_EXCLUSIVE,
                             SCARD_PROTOCOL_T0 |
SCARD_PROTOCOL_T1,
                             &ScardHandle[CurrentReader],
                             &ScardProtocol
[CurrentReader]);

where CurrentReader can 0 EZU1: for 1 for EZR1: .

Hope this helps.

Sincerely
Sergei

>-----Original Message-----
>Can we provide support for multiple contact slot in WinCE
smartcard driver?,
>in such a way that only one instance of the driver will
be loaded but the
>applications will display two entries and on selecting
each entry command
>will be sent to corresponding slot. How to register
multiple slots with
>smartcard resource manager through xxx_init ?
>.
>



Relevant Pages

  • RE: Smartcard driver
    ... >to develop a single driver that will support both the ... >readers in smartcard applications. ... Sergei ... >> one smart card reader driver, ...
    (microsoft.public.windowsce.platbuilder)
  • Re: required smartcard driver registry entries?
    ... communication with cpu without using serial port. ... > i is also developing smart card reader driver in under 4.20. ...
    (microsoft.public.windowsce.platbuilder)
  • RE: Smartcard driver
    ... that is my smartcard reader will have two contact slots. ... > one smart card reader driver, ... >>Can we provide support for multiple contact slot in WinCE ...
    (microsoft.public.windowsce.platbuilder)