This code sample shows how to filter smart card reader Input/Output Controls (IOCTL) that retrieve the answer to reset (ATR) from a smart card reader driver by using the Windows 7 Windows Development Kit (WDK). This sample can be used to make sure that the warm reset ATR matches the cold reset ATR so that the warm reset ATR is in compliance with the WinSCard discovery mechanism in the following Smart Card Minidriver Specification:
For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.
The AtrFilter.exe self-extracting file contains the following files.
Source and Header files
atrfilter.c, atrfilter.h, atrfilter.rc
sources, makefile, makefile.inc
Microsoft Software License Terms
Build the code sample
Download and run AtrFilter.exe to extract the files.
Select the desired build environment from the Windows 7 WDK. The build environment can be free, or you can specify a 32-bit or 64-bit environment.
Run the build from the directory to which you extracted the files in step 1.
Note This filter is based on Kernel Mode Driver Framework (KMDF). You must include the KMDF co-installer in your driver setup package.
Install the code sample
Note This code sample was tested only on Windows 7.
Note A valid digital signature may be required to load this sample filter driver.
For more information about how to create an installation application that adds this service as an upper filter for all smart card readers, read the MSDN article, "Installing a Filter Driver." To do this, visit the following Web site: