Re: Design flaw in smartcard library?

From: Eric Perlin [MS] (ericperl_at_online.microsoft.com)
Date: 10/22/04


Date: Thu, 21 Oct 2004 15:52:53 -0700

Is it even reaching the smartcard library?
I'll assume you are trying to do this from a usermode application using
winscard.dll.
There's a chance you are using the wrong SCardConnect semantics.
If you're not using SCARD_SHARED_DIRECT, you actually get a handle to a
card.
When the card is removed, the handle becomes invalid and all calls
attempting to use it fail early.
Using SCARD_SHARED_DIRECT, you get a handle to the reader itself.

Hope this helps.

-- 
Eric Perlin [MS]
This posting is provided "AS IS" with no warranties, and confers no rights.
---
"Mikael Andersson" <018421608(at)telia.com> wrote in message
news:uou3yR0tEHA.2956@TK2MSFTNGP10.phx.gbl...
> There seems to be no way of implementing a vendor-specific IOCTL that can
> execute regardless of if there is a smart card in the smart card reader or
> not.
>
> Implementing a vendor IOCTL code (which should trigger the
RDF_IOCTL_VENDOR
> callback) and calling it returns STATUS_NO_MEDIA if there is no card in
the
> smart card reader.
>
> This makes it impossible (?) to perform reader-specific functions with
this
> mechanism. Too bad (for me).
>
> The work-around is of course to trap the IOCTL in the DeviceControl()
> function, but that is quite ugly... I have done just that but hope for MS
to
> modify the vendor-specific stuff in the future... Or is there something
I'm
> doing wrong? (that's why I wrote this - please tell me if there is a way!)
>
> Best regards
> Mikael
>
>
>


Relevant Pages

  • Design flaw in smartcard library?
    ... There seems to be no way of implementing a vendor-specific IOCTL that can ... execute regardless of if there is a smart card in the smart card reader or ...
    (microsoft.public.platformsdk.security)
  • Re: Smart card reader Problem
    ... Since the upgrade my smart card reader does not ... Remove the Smart Card and drivers and the signing software ...
    (microsoft.public.windowsxp.security_admin)
  • Smart Card Reader Question
    ... I have USB to Serial interface device. ... The RFID reader talks to contactless smart card reader. ...
    (microsoft.public.development.device.drivers)
  • Re: Smart Card Reader Question
    ... I have USB to Serial interface device. ... TheRFIDreader talks to contactless smart card reader. ...
    (microsoft.public.development.device.drivers)
  • Re: Serial comms
    ... If its a smart card reader, one of the 'common' makes and you are running XP ... > don't know the stopbits, flow control, et cetera, but it is supposed to ... > don't see any data when the device is supposedly transmitting. ...
    (microsoft.public.vc.mfc)