;
; WUDFUsbccidDriver.inf - Install the USBCCID user-mode driver
;

[Version]
Signature="$Windows NT$"
Class=SmartCardReader
ClassGuid={50DD5230-BA8A-11D1-BF5D-0000F805F530}
Provider=%MSFT%
DriverVer=12/04/2008,6.0.6001.18176
CatalogFile=WudfUsbccidDriver.cat

[Manufacturer]
%MSFT%=Microsoft,NTx86

[Microsoft.NTx86]
;%UsbccidDeviceName% = UsbccidNoWake_Install, USB\VID_17EF&PID_1003
;%UsbccidDeviceName% = Usbccid_Install, USB\Class_0B&SubClass_00&Prot_00
%UsbccidDeviceName% = ICCD_Install, USB\Class_0B&SubClass_00&Prot_01
%UsbccidDeviceName% = ICCD_Install, USB\Class_0B&SubClass_00&Prot_02
;%UsbccidDeviceName% = Usbccid_Install, USB\Class_0B&SubClass_00
;%UsbccidDeviceName% = Usbccid_Install, USB\Class_0B

[ClassInstall32]
AddReg=SmartcardClass_RegistryAdd

[SmartcardClass_RegistryAdd]
HKR,,,,%ClassName%
HKR,,Icon,,"-10"

[SourceDisksFiles]
WUDFUsbccidDriver.dll=1

[SourceDisksNames]
1=%MediaDescription%

; ============ Add reg for all readers ===============

[Reader.Install.AddReg]
HKLM, Software\Microsoft\Cryptography\Calais\Readers,,,
HKLM, System\CurrentControlSet\Services\SCardSvr,Start,0x00010001,2
HKLM, System\CurrentControlSet\Services\CertPropSvc,Start,0x00010001,2


; =================== UMDF Usbccid Device ==================================

[Usbccid_Install.NT]
AddReg= Reader.Install.AddReg
Include=WINUSB.INF                      ; Import sections from WINUSB.INF
Needs=WINUSB.NT                         ; Run the CopyFiles & AddReg directives for WinUsb.INF

[Usbccid_Install.NT.hw]
AddReg=Usbccid_Device_AddReg

[Usbccid_Install.NT.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall  ; flag 0x2 sets this as the service for the device
AddService=WinUsb,0x000001f8,WinUsb_ServiceInstall  ; this service is installed because its a filter.

[Usbccid_Install.NT.CoInstallers]
AddReg=CoInstallers_AddReg

[Usbccid_Install.NT.Wdf]
KmdfService = WINUSB, WinUsb_Install
UmdfService=WUDFUsbccidDriver, WUDFUsbccidDriver_Install
UmdfServiceOrder=WUDFUsbccidDriver
UmdfDispatcher=WinUsb

; ======= UMDF Usbccid Device with remote wake disabled ========

[UsbccidNoWake_Install.NT]
AddReg= Reader.Install.AddReg
Include=WINUSB.INF                      ; Import sections from WINUSB.INF
Needs=WINUSB.NT                         ; Run the CopyFiles & AddReg directives for WinUsb.INF

[UsbccidNoWake_Install.NT.hw]
AddReg=UsbccidNoWake_Device_AddReg

[UsbccidNoWake_Install.NT.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall  ; flag 0x2 sets this as the service for the device
AddService=WinUsb,0x000001f8,WinUsb_ServiceInstall  ; this service is installed because its a filter.

[UsbccidNoWake_Install.NT.CoInstallers]
AddReg=CoInstallers_AddReg

[UsbccidNoWake_Install.NT.Wdf]
KmdfService = WINUSB, WinUsb_Install
UmdfService=WUDFUsbccidDriver, WUDFUsbccidDriver_Install
UmdfServiceOrder=WUDFUsbccidDriver
UmdfDispatcher=WinUsb

; =================== UMDF CCID Device ==================================
; Work around of a WinUsb issue.

[ICCD_Install.NT]
AddReg= Reader.Install.AddReg
Include=WINUSB.INF                      ; Import sections from WINUSB.INF
Needs=WINUSB.NT                         ; Run the CopyFiles & AddReg directives for WinUsb.INF

[ICCD_Install.NT.hw]
AddReg=ICCD_Device_AddReg

[ICCD_Install.NT.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall  ; flag 0x2 sets this as the service for the device
AddService=WinUsb,0x000001f8,WinUsb_ServiceInstall  ; this service is installed because its a filter.

[ICCD_Install.NT.CoInstallers]
AddReg=CoInstallers_AddReg

[ICCD_Install.NT.Wdf]
KmdfService = WINUSB, WinUsb_Install
UmdfService=WUDFUsbccidDriver, WUDFUsbccidDriver_Install
UmdfServiceOrder=WUDFUsbccidDriver
UmdfDispatcher=WinUsb

; =====================================================

[WinUsb_Install]
KmdfLibraryVersion = 1.7

[WUDFUsbccidDriver_Install]
UmdfLibraryVersion=1.7.0
DriverCLSID="{5EB949F2-78C6-443b-9964-07588EB151C6}"
ServiceBinary="%12%\UMDF\WUDFUsbccidDriver.dll"

[Usbccid_Device_AddReg]
HKR,,"LowerFilters",0x00010008,"WinUsb" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND
HKR,"WUDF","Exclusive",0x10001,1
HKR,"WUDF","UpperDriverOK",0x10001,1
HKR,,"SystemWakeEnabled",0x00010001,1
HKR,,"DeviceIdleEnabled",0x00010001,1
HKR,,"UserSetDeviceIdleEnabled",0x00010001,0
HKR,,"DefaultIdleState",0x00010001,1
HKR,,"DefaultIdleTimeout",0x00010001,5000

[UsbccidNoWake_Device_AddReg]
HKR,,"LowerFilters",0x00010008,"WinUsb" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND
HKR,"WUDF","Exclusive",0x10001,1
HKR,"WUDF","UpperDriverOK",0x10001,1
HKR,,"SystemWakeEnabled",0x00010001,1
HKR,,"DeviceIdleEnabled",0x00010001,1
HKR,,"UserSetDeviceIdleEnabled",0x00010001,0
HKR,,"DefaultIdleState",0x00010001,1
HKR,,"DefaultIdleTimeout",0x00010001,5000
HKR,"WDF","WakeFromSleepState",0x00010001,0

[ICCD_Device_AddReg]
HKR,,"LowerFilters",0x00010008,"WinUsb" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND
HKR,"WUDF","Exclusive",0x10001,1
HKR,"WUDF","UpperDriverOK",0x10001,1
HKR,,"SystemWakeEnabled",0x00010001,0
HKR,,"DeviceIdleEnabled",0x00010001,1
HKR,,"UserSetDeviceIdleEnabled",0x00010001,0
HKR,,"DefaultIdleState",0x00010001,1
HKR,,"DefaultIdleTimeout",0x00010001,5000

[WUDFRD_ServiceInstall]
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\WUDFRd.sys

[WinUsb_ServiceInstall]
DisplayName     = %WinUsb_Service_DisplayName%
ServiceType     = 1
StartType       = 3
ErrorControl    = 1
ServiceBinary   = %12%\WinUSB.sys
LoadOrderGroup  = Base

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WudfUpdate_01007.dll","WinUsbCoinstaller.dll","WdfCoInstaller01007.dll,WdfCoInstaller"

; =================== Generic ==================================

[Strings]
MSFT="Microsoft"
MediaDescription="Microsoft HRP Installation Media"
ClassName="WUDF Smartcard"
UsbccidDeviceName="Microsoft Usbccid Smartcard Reader (WUDF)"
WinUsb_Service_DisplayName="WinUSB Driver"
WinUsb_SvcDesc="WinUSB Driver"
