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

[Version]
Signature   = "$WINDOWS NT$"
Class       = SmartCardReader
ClassGuid   = {50dd5230-ba8a-11d1-bf5d-0000f805f530}
Provider    = %MSFT%
PnpLockdown = 1
DriverVer = 06/21/2006,10.0.22621.1

[DestinationDirs]
UMDriverCopy=12,UMDF ; copy to drivers\umdf

[UMDriverCopy]
UsbccidDriver.dll,,,0x100

[Manufacturer]
%MSFT%=Microsoft,NTamd64

[Microsoft.NTamd64]
%O2MicroReaderName% = UsbccidO2Micro_Install, USB\VID_0B97&PID_7762, USB\VID_0B97&PID_7772
%ActivCardReaderName%=UsbccidActivCard_Install, USB\VID_09C3&PID_0008, USB\VID_04E6&PID_E001
%Omnikey3021.DeviceName%=Omnikey3021_Install, USB\VID_076B&PID_3021
%UsbccidDeviceName% = Usbccid_Install, USB\Class_0B&SubClass_00&Prot_00,USB\Class_0B&SubClass_00&Prot_01,USB\Class_0B&SubClass_00&Prot_02,USB\Class_0B&SubClass_00,USB\Class_0B

[SourceDisksFiles]
UsbccidDriver.dll=3426

[SourceDisksNames]
3426=windows cd

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

[Reader.Install.AddReg]
HKLM, Software\Microsoft\Cryptography\Calais\Readers,,,
; Registering event log provider.
HKLM, Software\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{22c370a7-a3db-4390-ade5-3a1accf4b5d5},,0x00000000,"UsbccidDriver"
HKLM, Software\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{22c370a7-a3db-4390-ade5-3a1accf4b5d5},Enabled,0x00010001,1
HKLM, Software\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{22c370a7-a3db-4390-ade5-3a1accf4b5d5},MessageFileName,0x00020000,"%%SystemRoot%%\System32\Drivers\UMDF\UsbccidDriver.dll"
HKLM, Software\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{22c370a7-a3db-4390-ade5-3a1accf4b5d5},ResourceFileName,0x00020000,"%%SystemRoot%%\System32\Drivers\UMDF\UsbccidDriver.dll"
HKLM, Software\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{22c370a7-a3db-4390-ade5-3a1accf4b5d5}\ChannelReferences,Count,0x00010001,1
HKLM, Software\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{22c370a7-a3db-4390-ade5-3a1accf4b5d5}\ChannelReferences\0,,0x00000000,"System"
HKLM, Software\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{22c370a7-a3db-4390-ade5-3a1accf4b5d5}\ChannelReferences\0,Id,0x00010001,0x00000008
HKLM, Software\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{22c370a7-a3db-4390-ade5-3a1accf4b5d5}\ChannelReferences\0,Flags,0x00010001,0x00000001
HKLM, System\CurrentControlSet\Control\WMI\Autologger\EventLog-System\{22c370a7-a3db-4390-ade5-3a1accf4b5d5},Enabled,0x00010001,1
HKLM, System\CurrentControlSet\Control\WMI\Autologger\EventLog-System\{22c370a7-a3db-4390-ade5-3a1accf4b5d5},EnableLevel,0x00010001,0
HKLM, System\CurrentControlSet\Control\WMI\Autologger\EventLog-System\{22c370a7-a3db-4390-ade5-3a1accf4b5d5},EnableProperty,0x00010001,0x00000001
HKLM, System\CurrentControlSet\Control\WMI\Autologger\EventLog-System\{22c370a7-a3db-4390-ade5-3a1accf4b5d5},LoggerName,0x00000000,"EventLog-System"
; Note: The 0x000B0001 flag in the two entries below indicates the value is a REG_QWORD. This is not documented in MSDN!
HKLM, System\CurrentControlSet\Control\WMI\Autologger\EventLog-System\{22c370a7-a3db-4390-ade5-3a1accf4b5d5},MatchAnyKeyword,0x000B0001,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80
HKLM, System\CurrentControlSet\Control\WMI\Autologger\EventLog-System\{22c370a7-a3db-4390-ade5-3a1accf4b5d5},MatchAllKeyword,0x000B0001,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

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

[Usbccid_Install.NT]
Include=wudfrd.inf
Needs=WUDFRD.NT
AddReg=Reader.Install.AddReg
CopyFiles=UMDriverCopy

[Usbccid_Install.NT.HW]
Include=wudfrd.inf
Needs=WUDFRD.NT.HW
AddReg=Usbccid_Device_AddReg, SelectiveSuspendEnable_AddReg

[Usbccid_Install.NT.Services]
Include=wudfrd.inf
Needs=WUDFRD.NT.Services

[Usbccid_Install.NT.Wdf]
UmdfService=UsbccidDriver, UsbccidDriver_Install
UmdfServiceOrder=UsbccidDriver
UmdfKernelModeClientPolicy=AllowKernelModeClients

; ======= UMDF Usbccid Device support for older O2Micro readers ========

[UsbccidO2Micro_Install.NT]
Include=wudfrd.inf
Needs=WUDFRD.NT
AddReg=Reader.Install.AddReg
CopyFiles=UMDriverCopy

[UsbccidO2Micro_Install.NT.HW]
Include=wudfrd.inf
Needs=WUDFRD.NT.HW
AddReg=Usbccid_Device_AddReg, SelectiveSuspendEnable_AddReg, Usbccid_O2Micro_AddReg

[UsbccidO2Micro_Install.NT.Services]
Include=wudfrd.inf
Needs=WUDFRD.NT.Services

[UsbccidO2Micro_Install.NT.Wdf]
UmdfService=UsbccidDriver, UsbccidDriver_Install
UmdfServiceOrder=UsbccidDriver
UmdfKernelModeClientPolicy=AllowKernelModeClients

; ======= UMDF Usbccid Device support for ActivCard readers ========

[UsbccidActivCard_Install.NT]
Include=wudfrd.inf
Needs=WUDFRD.NT
AddReg=Reader.Install.AddReg
CopyFiles=UMDriverCopy

[UsbccidActivCard_Install.NT.HW]
Include=wudfrd.inf
Needs=WUDFRD.NT.HW
AddReg=Usbccid_Device_AddReg, SelectiveSuspendEnable_AddReg, Usbccid_ActivCard_AddReg

[UsbccidActivCard_Install.NT.Services]
Include=wudfrd.inf
Needs=WUDFRD.NT.Services

[UsbccidActivCard_Install.NT.Wdf]
UmdfService=UsbccidDriver, UsbccidDriver_Install
UmdfServiceOrder=UsbccidDriver
UmdfKernelModeClientPolicy=AllowKernelModeClients

; ======= UMDF Usbccid Device support for Omnikey 3021 reader ========

[Omnikey3021_Install.NT]
Include=wudfrd.inf
Needs=WUDFRD.NT
AddReg=Reader.Install.AddReg
CopyFiles=UMDriverCopy

[Omnikey3021_Install.NT.HW]
Include=wudfrd.inf
Needs=WUDFRD.NT.HW
AddReg=Usbccid_Device_AddReg, SelectiveSuspendDisable_AddReg

[Omnikey3021_Install.NT.Services]
Include=wudfrd.inf
Needs=WUDFRD.NT.Services

[Omnikey3021_Install.NT.Wdf]
UmdfService=UsbccidDriver, UsbccidDriver_Install
UmdfServiceOrder=UsbccidDriver
UmdfKernelModeClientPolicy=AllowKernelModeClients

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

[UsbccidDriver_Install]
UmdfLibraryVersion=2.0.0
ServiceBinary="%12%\UMDF\UsbccidDriver.dll
UmdfExtensions=SmcCx0102

[SelectiveSuspendEnable_AddReg]
HKR,,"DeviceIdleEnabled",0x00010001,1
HKR,"WDF","WdfDefaultIdleInWorkingState",0x00010001,1

[SelectiveSuspendDisable_AddReg]
HKR,,"DeviceIdleEnabled",0x00010001,0
HKR,"WDF","WdfDefaultIdleInWorkingState",0x00010001,0

[Usbccid_Device_AddReg]
HKR,"WUDF","Exclusive",0x10001,1
HKR,,"UserSetDeviceIdleEnabled",0x00010001,1
HKR,,"DefaultIdleState",0x00010001,1
HKR,,"DefaultIdleTimeout",0x00010001,5000
HKR,,"SystemWakeEnabled",0x00010001,1
HKR,"WDF","WdfDefaultWakeFromSleepState",0x00010001,0

[Usbccid_O2Micro_AddReg]
HKR,"UsbccidDriver","DeviceFlags",0x00010001,0x00000001

[Usbccid_ActivCard_AddReg]
HKR,"UsbccidDriver","DeviceFlags",0x00010001,0x00000002

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

[Strings]
; localizable strings
MSFT = "Microsoft"
UsbccidDeviceName="Microsoft Usbccid Smartcard Reader (UMDF2)"
O2MicroReaderName="Microsoft Usbccid Smartcard Reader (O2 Micro OZ776/777)"
ActivCardReaderName="Microsoft Usbccid Smartcard Reader (ActivCard SCR33x/V2)"
Omnikey3021.DeviceName="Microsoft Usbccid Smartcard Reader (Omnikey 3021)"

; non-localizable strings
REG_MULTI_SZ = 0x00010000
