;x86 and x64 drivers for ANT USB Stick 2 and USB-m
;These drivers are the libusb drivers (Copyright (c) 2010 libusb-win32 (GNU LGPL))
;with a custom coinstaller to aid the user experience installing value added software
;Mar 2012, Dynastream Innovations Inc

[Version]
Signature   = "$Windows NT$"
Class       = "libusb-win32 devices"
ClassGuid   = {EB781AAF-9C70-4523-A5DF-642A87ECA567}  ;Identify as a member of the LibUSB class, because we are using those drivers. (So keep this Class and ClassGUID constant)
Provider    = "Dynastream Innovations, Inc."
CatalogFile = ANT_LibUsb.cat
DriverVer   = 04/11/2012, 1.2.40.201
;Note: PnpLockDown, DriverPackageDisplayName, DriverPackageType are only recognized by newer versions of Windows
;DDK Docs specifically note for PnpLockDown, "a future version of Windows might require that INF files for PnP driver packages include the PnpLockDown directive."
PnpLockDown = 0 ;If we set this to 1 we can't alter the files even as an administrator
DriverPackageDisplayName = "ANT LibUSB Drivers"
DriverPackageType = PlugAndPlay


;--------------------------------------------------------------------------
; Class Definition for LibUSB, do not change, see class note in version tag
;--------------------------------------------------------------------------
[ClassInstall32]
Addreg = libusb_class_install_add_reg

[libusb_class_install_add_reg]
HKR,,,0,"libusb-win32 devices"
HKR,,Icon,,-20


;--------------------------------------------------------------------------
; libusb-win32 files
;--------------------------------------------------------------------------
[SourceDisksNames]
1 = "ANT LibUsb Driver Package"

[SourceDisksFiles.x86]
libusb0.sys     = 1,x86
libusb0_x86.dll = 1,x86
AntUsbCoInstall_x86.dll = 1,x86

[SourceDisksFiles.amd64]
libusb0.sys     = 1,amd64
libusb0.dll     = 1,amd64
libusb0_x86.dll = 1,x86 ;Installs 32-bit driver into wow64 emulation as well
AntUsbCoInstall_x64.dll = 1,amd64

[SourceDisksFiles.ia64]
libusb0.sys     = 1,ia64
libusb0.dll     = 1,ia64
libusb0_x86.dll = 1,x86
;no coninstaller support for ia64

[DestinationDirs]
libusb_files_sys       = 10,system32\drivers
libusb_files_dll       = 10,system32
libusb_files_dll_wow64 = 10,syswow64   ;install the x86 dll to the wow64 for x86 emulation
libusb_files_dll_x86   = 10,system32
antUsbCoInstall_x86_dll = 10,system32
antUsbCoInstall_x64_dll = 10,system32

[libusb_files_sys]
libusb0.sys

[libusb_files_dll]
libusb0.dll

[libusb_files_dll_x86]
libusb0.dll, libusb0_x86.dll

[libusb_files_dll_wow64]
libusb0.dll, libusb0_x86.dll

;Note: We give a version number to the co-installer libraries because on an upgrade install, since the old library will be loaded, 
;  Windows caches the new file until the next restart when it deletes the old and places the new version. 
;  The problem is that during the install when we need the co-installer to run, it runs the old version if it has the same name
;  Versioning the name means our new version always gets called during the install, but this means right now the old one never gets deleted.
[antUsbCoInstall_x86_dll]
AntUsbCIv2.dll, AntUsbCoInstall_x86.dll ;Installs the arch specific coinst dll as a generic and 8-char length name

[antUsbCoInstall_x64_dll]
AntUsbCIv2.dll, AntUsbCoInstall_x64.dll ;Installs the arch specific coinst dll as a generic and 8-char length name



[Manufacturer]
"Dynastream Innovations, Inc." = Devices, NT, NTAMD64, NTIA64  ;We have the driver for IA64 because it already exists, but we don't build an ia64 coinstaller
;--------------------------------------------------------------------------
; libusb-win32 Devices Models Section (Driver Nodes)
;--------------------------------------------------------------------------

[Devices]
"ANT USB Stick 2" = LIBUSB_WIN32_DEV, USB\VID_0FCF&PID_1008
"ANT USB-m" = LIBUSB_WIN32_DEV, USB\VID_0FCF&PID_1009

[Devices.NT]
"ANT USB Stick 2" = LIBUSB_WIN32_DEV.NT, USB\VID_0FCF&PID_1008
"ANT USB-m" = LIBUSB_WIN32_DEV.NT, USB\VID_0FCF&PID_1009

[Devices.NTAMD64]
"ANT USB Stick 2" = LIBUSB_WIN32_DEV.NTAMD64, USB\VID_0FCF&PID_1008
"ANT USB-m" = LIBUSB_WIN32_DEV.NTAMD64, USB\VID_0FCF&PID_1009

[Devices.NTIA64]
"ANT USB Stick 2" = LIBUSB_WIN32_DEV.NTIA64, USB\VID_0FCF&PID_1008
"ANT USB-m" = LIBUSB_WIN32_DEV.NTIA64, USB\VID_0FCF&PID_1009

;--------------------------------------------------------------------------
; libusb-win32 Device driver (DDInstall)
;--------------------------------------------------------------------------


[LIBUSB_WIN32_DEV.NT]
CopyFiles = libusb_files_sys, libusb_files_dll_x86

[LIBUSB_WIN32_DEV.NTAMD64]
CopyFiles = libusb_files_sys, libusb_files_dll, libusb_files_dll_wow64

[LIBUSB_WIN32_DEV.NTIA64]
CopyFiles = libusb_files_sys, libusb_files_dll, libusb_files_dll_wow64

[LIBUSB_WIN32_DEV.NT.HW]
DelReg = libusb_del_reg_hw
AddReg = libusb_add_reg_hw

[LIBUSB_WIN32_DEV.NTAMD64.HW]
DelReg = libusb_del_reg_hw
AddReg = libusb_add_reg_hw

[LIBUSB_WIN32_DEV.NTIA64.HW]
DelReg = libusb_del_reg_hw
AddReg = libusb_add_reg_hw

[LIBUSB_WIN32_DEV.NT.Services]
AddService = libusb0, 0x00000002, libusb_add_service

[LIBUSB_WIN32_DEV.NTAMD64.Services]
AddService = libusb0, 0x00000002, libusb_add_service

[LIBUSB_WIN32_DEV.NTIA64.Services]
AddService = libusb0, 0x00000002, libusb_add_service

; Older versions of this .inf file installed filter drivers. They are not
; needed any more and must be removed
[libusb_del_reg_hw]
HKR,,LowerFilters
HKR,,UpperFilters

; libusb-win32 device properties
[libusb_add_reg_hw]
HKR,,SurpriseRemovalOK,0x00010001,1

; (Optional) the usb configuration value to select when this device
; is started.  If this key does not exist the first config is selected.
;HKR,,InitialConfigValue,0x00010001,<your config value>

[LIBUSB_WIN32_DEV.NT.CoInstallers]
CopyFiles=antUsbCoInstall_x86_dll
AddReg=coInstaller_AddReg

[LIBUSB_WIN32_DEV.NTAMD64.CoInstallers]
CopyFiles=antUsbCoInstall_x64_dll
AddReg=coInstaller_AddReg

[coInstaller_AddReg]
HKR,,CoInstallers32,0x00010000,"AntUsbCIv2.dll,AntUsbCoInstaller"


;--------------------------------------------------------------------------
; libusb-win32 service
;--------------------------------------------------------------------------

[libusb_add_service]
DisplayName   = "libusb-win32 - Kernel Driver 04/08/2011 1.2.4.0"
ServiceType   = 1
StartType     = 3
ErrorControl  = 0
ServiceBinary = %12%\libusb0.sys
