Re: Design flaw in smartcard library?
From: Eric Perlin [MS] (ericperl_at_online.microsoft.com)
Date: 10/22/04
- Next message: Eric Perlin [MS]: "Re: SmartcardAcquireRemoveLockWithTag undocumented"
- Previous message: Eric Perlin [MS]: "Re: Smartcard removal not detected after login on Windows 2003 server"
- In reply to: Mikael Andersson: "Design flaw in smartcard library?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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 > > >
- Next message: Eric Perlin [MS]: "Re: SmartcardAcquireRemoveLockWithTag undocumented"
- Previous message: Eric Perlin [MS]: "Re: Smartcard removal not detected after login on Windows 2003 server"
- In reply to: Mikael Andersson: "Design flaw in smartcard library?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|