You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
5.6 KiB
68 lines
5.6 KiB
|
|
<HTML>
|
|
<HEAD>
|
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
|
|
<META NAME="Generator" CONTENT="Microsoft Word 97">
|
|
<TITLE>PSCR.SYS—PCMCIA Smart Card Driver</TITLE>
|
|
</HEAD>
|
|
<BODY TEXT="#000000" LINK="#0000ff" VLINK="#800080" BGCOLOR="#ffffff" leftMargin=8>
|
|
|
|
<FONT FACE="Verdana"><H2><A NAME="MYSAMPLE">PSCR.SYS—PCMCIA Smart Card Driver</A></H2>
|
|
<H3>SUMMARY</H3>
|
|
</FONT><FONT FACE="Verdana" SIZE=2><P>This driver is used for the SCM PCMCIA smart card reader. </P>
|
|
|
|
<P>This driver implements Plug and Play and Power Management. </P>
|
|
|
|
</FONT><FONT FACE="Verdana" SIZE=2><P> </P>
|
|
</FONT><FONT FACE="Verdana"><H3>BUILDING PSCR.SYS</H3>
|
|
</FONT><FONT FACE="Verdana" SIZE=2><P>To build the Pscr.sys driver, select either the checked or free DDK environment, change to the Bulltlp3 directory, and type <b>build</b>. This driver uses services provided by the smart card driver library (Smclib.sys), which are explained in detail in the accompanying documentation.</P>
|
|
|
|
<P>To install the driver, simply insert the reader into a PCMCIA slot. The Found New Hardware wizard will appear. You will need to provide the .inf file (on a floppy disk) and the driver file, which will be copied to your System32\Drivers directory. The driver will start automatically. To stop the driver, either eject the reader or select the appropriate taskbar icon. The driver will not unload as long as you have Ifdtest.exe running and connected to the driver. </P>
|
|
</FONT><FONT FACE="Verdana" SIZE=2><P> </P>
|
|
</FONT><FONT FACE="Verdana"><H3>Tools</H3>
|
|
</FONT><FONT FACE="Verdana" SIZE=2><P>Microsoft offers a test tool (Ifdtest.exe) that allows you to use a smart card reader directly from the command line. Normally, the smart card resource manager is connected to a reader. To use Ifdtest.exe, you must stop the smart card resource manager (Scardsvr.exe). Type <B>net stop scardsvr</b> in the command line. Ifdtest.exe is also used for the smart card reader logo test.</P>
|
|
<P>Ifdtest.exe can be downloaded from </FONT><A HREF="http://www.microsoft.com/hwtest">http://www.microsoft.com/hwtest</A><FONT FACE="Verdana" SIZE=2> (follow the links for smart cards). You need to order special test smart cards to get your smart card reader logo'ed. Ordering information can be found at the URL above. </P>
|
|
</FONT><FONT FACE="Verdana" SIZE=2><P> </P>
|
|
</FONT><FONT FACE="Verdana"><H3>RESOURCES</H3>
|
|
</FONT><FONT FACE="Verdana" SIZE=2 ><P>ISO 7816 Part 3 describes smart cards and smart card protocols in detail. Refer to the PC99 Handbook for smart card reader requirements.</P>
|
|
</FONT><FONT FACE="Verdana"><H3>CODE TOUR</H3>
|
|
<H4>File Manifest</H4>
|
|
</FONT><PRE>
|
|
<U>Files Description
|
|
</U>PSCR.HTM The documentation for this sample (this file).
|
|
<FONT FACE="Courier">SOURCES The generic file for building the code sample.
|
|
MAKEFILE Makefile required to build the driver.
|
|
MAKEFILE.INC Additional makefile required to build the driver.
|
|
PSCR.INF The INF file for installing the code sample.
|
|
PSCRCB.CB Source file containing the callback functions for the smart card library.
|
|
PSCRCB.H Function prototypes for above file.
|
|
PSCRCMD.C Implements the reader commands.
|
|
PSCRLOG.MC Error messages for this driver.
|
|
PSCRNT.C The main source file (load, unload, Plug and Play, Power Management).
|
|
PSCRNT.H Data definitions and prototypes for the above file.
|
|
PSCRRDWR.C Implements read/write operations.
|
|
PSCRRDWR.H Data definitions and constant definitions for this reader.
|
|
PSCRVERS.H Driver-specific version information.
|
|
</FONT><FONT FACE="Verdana"> </PRE>
|
|
</FONT><H4>Programming Tour</H4>
|
|
<FONT FACE="Verdana" SIZE=2><P>The major topics covered in this tour are: </P>
|
|
|
|
<UL>
|
|
<LI>Plug and Play </LI>
|
|
<LI>Power Management </LI></UL>
|
|
|
|
<P><B>Plug and Play</B></P>
|
|
</FONT><FONT FACE="Verdana" SIZE=2 ><P>With PCMCIA, Plug and Play is fairly easy to implement, since the PCMCIA bus supports device insertion and removal detection by design. However, when a user removes a PCMCIA card from the slot, an application may still be connected to the device. You should fail all subsequent requests, but you need to prevent the driver from unloading as long as the connection exists. Defer unloading of the driver until the connection has been closed.</P>
|
|
</FONT><FONT FACE="Verdana" SIZE=2><P><B>Power Management</B></P>
|
|
</FONT><FONT FACE="Verdana" SIZE=2><P>Power Management is described in detail in the DDK documentation. There is, however, one situation that is specific to smart card readers: how to deal with smart card insertions/removals while the system is in standby or hibernation mode. </P>
|
|
<P>Your reader won’t see any card insertion or removal events in these modes, because the bus might not even have power. So you need to save the card state before your reader goes into standby/hibernation mode. After the system comes back from these modes, you need to determine what the state of the card is. You need to complete card tracking calls whenever there was a card in the reader before standby/hibernation mode <i>or</i> whenever there is a card in the reader after these modes. This is necessary because the user could have changed the card while the system is in a low-power mode. </P>
|
|
</FONT><P> </P>
|
|
<P ALIGN="CENTER"><A HREF="http://devkits/ddk/doctemplate.htm#top"><FONT FACE="Verdana" SIZE=2>Top of page</FONT></A><FONT FACE="Verdana" SIZE=2> </P></FONT>
|
|
<TABLE CELLSPACING=0 BORDER=0 WIDTH=624>
|
|
<TR><TD VALIGN="MIDDLE" BGCOLOR="#00ffff" HEIGHT=2>
|
|
<P></TBODY></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<FONT FACE="MS Sans Serif" SIZE=1><P>© 1998 Microsoft Corporation</FONT><FONT FACE="Verdana" SIZE=2> </P></FONT></BODY>
|
|
</HTML>
|