DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 981665 - Last Review: March 16, 2010 - Revision: 1.0

On This Page

INTRODUCTION

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:
http://www.microsoft.com/whdc/device/input/smartcard/sc-minidriver.mspx (http://www.microsoft.com/whdc/device/input/smartcard/sc-minidriver.mspx)

MORE INFORMATION

The following file is available for download from the Microsoft Download Center:


Collapse this imageExpand this image
Download
Download the AtrFilter.exe package now. (http://download.microsoft.com/download/0/f/b/0fb6b0c8-cf68-4c42-8f31-67b28b286299/atrfiltr.exe)

Release Date: March 3, 2010

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  (http://support.microsoft.com/kb/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.
Collapse this tableExpand this table
DescriptionFiles
Source and Header filesatrfilter.c, atrfilter.h, atrfilter.rc
Build filessources, makefile, makefile.inc
INF filesatrfilter.inx
Readme filesReadme.txt
Microsoft Software License TermsLicense.txt, License.rtf

Build the code sample

  1. Download and run AtrFilter.exe to extract the files.
  2. 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.
  3. 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:
http://msdn.microsoft.com/en-us/library/ms791322.aspx (http://msdn.microsoft.com/en-us/library/ms791322.aspx)
To manually add the driver service, you can run a command from an elevated command prompt. To do this, follow these steps:
  1. Click Start
    Collapse this imageExpand this image
    start button
    , and then type cmd in the Search programs and files box.
  2. Right-click cmd.exe in the Programs list, and then click Run as administrator.
    Collapse this imageExpand this image
    UAC
    If you are prompted for an administrator password or for confirmation, type the password, or provide confirmation.
  3. At the command prompt, copy or type the following command, and then press ENTER:
    sc create atrfiltr binPath= system32\drivers\atrfiltr.sys type= kernel start= demand error= normal
  4. Click Start, click Run, type regedit, and then click OK.
    Collapse this imageExpand this image
    UAC
    If you are prompted for an administrator password or for confirmation, type the password, or provide confirmation.
  5. Locate and then click the following key in the registry:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{50DD5230-BA8A-11D1-BF5D-0000F805F530}\UpperFilters
  6. On the Edit menu, click Modify.
  7. Add atrfiltr to the existing list of upper filters, and then press ENTER.
  8. Exit Registry Editor.

APPLIES TO
  • Windows 7 Enterprise
  • Windows 7 Professional
Keywords: 
kbcodesnippet atdownload kbexpertiseadvanced kbsurveynew kbinfo KB981665
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support