[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-smartcardddk
Subject:    Re: Why SmartcardDeviceControl not work?
From:       John Raven <jraven () JRAVEN ! COM>
Date:       2000-03-04 13:52:44
[Download RAW message or body]


You don't need to set RAW mode.
You do need to have set ReaderExtension.ReaderFunction[RDF_CARD_POWER] to
your callback.
Are you calling SmartCardDeviceControl inside your DeviceControl handler?

John Raven
jraven@jraven.com

 -----Original Message-----
From:   SmartCardDDK [mailto:SmartCardDDK@DISCUSS.MICROSOFT.COM]  On Behalf
Of SUBSCRIBE SmartCardDDK Yuping Shi
Sent:   Saturday, March 04, 2000 2:29 AM
To:     SmartCardDDK@DISCUSS.MICROSOFT.COM
Subject:        Why SmartcardDeviceControl not work?

hi all:

   I  am developping serial smart card driver on windows NT 4.0,I uses
win32 function DeviceIOControl to test it directly,my card reader
internally  supports the T=1 and T=0 data link layers already;

  if ((hDriver = CreateFile("\\\\.\\SCReader0",
                              GENERIC_READ | GENERIC_WRITE,
                              FILE_SHARE_READ | FILE_SHARE_WRITE,
                              NULL,
                              OPEN_EXISTING,
                              FILE_ATTRIBUTE_NORMAL,
                              NULL
                              )) != ((HANDLE)-1))

    InBuf[0]=SCARD_COLD_RESET;
    InBufSize=256;
    OutBufSize=256;
    DeviceIoControl(hDriver,
                         (DWORD)IOCTL_SMARTCARD_POWER,
                         (LPVOID)InBuf,
                         InBufSize,
                         (LPVOID)OutBuf,
                         OutBufSize,
                         &cbReturned,
                         0
                         );

but  SmartcardDeviceControl never  call my callback function
xxxReaderPower,it return the STATUS_INVALID_DEVICE_REQUEST, i have to set
which fields in structure SMARTCARD_EXTENSION at least?   should i select
"raw mode" to communicate with my "intelligent" reader?

  Can anybody tell me?

   Thanks in advance.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic