How to Install Winusb.sys as the Device's Function Driver
- Install the Windows Driver Kit.
- Create a driver package folder on the machine to which the USB device is connected. For example c:\UsbDevice.
- Copy the WinUSB co-installer (WinusbcoinstallerX.dll) from the WinDDK\BuildNumber\redist\winusb to the driver package folder.
The WinUSB co-installer (Winusbcoinstaller.dll) installs WinUSB on the target system, if necessary. The WDK includes three versions of the co-installer depending on the system architecture: x86-based, x64-based, and Itanium-based systems. They are all named WinusbcoinstallerX.dll and are located in the appropriate subdirectory in the WinDDK\BuildNumber\redist\winusb folder.
- Copy the KMDF co-installer (WdfcoinstallerXXX.dll) from the WinDDK\BuildNumber\redist\wdf to the driver package folder.
The KMDF co-installer (WdfcoinstallerXXX.dll) installs the correct version of KMDF on the target system, if necessary. The version of WinUSB co-installer must match the KMDF co-installer because KMDF-based client drivers, such as Winusb.sys, require the corresponding version of the KMDF framework to be installed properly on the system. For example, Winusbcoinstaller2.dll requires KMDF version 1.9, which is installed by Wdfcoinstaller01009.dll. The x86 and x64 versions of WdfcoinstallerXXX.dll are included with the WDK under the WinDDK\BuildNumber\redist\wdf folder. The following table shows the WinUSB co-installer and the associated KMDF co-installer to use on the target system.
Use the following table to determine the WinUSB co-installer and the associated KMDF co-installer.
WinUSB co-installer KMDF library version KMDF co-installer Winusbcoinstaller.dll Requires KMDF version 1.5 or later. Wdfcoinstaller01005.dll
Wdfcoinstaller01007.dll
Wdfcoinstaller01009.dll
Winusbcoinstaller2.dll Requires KMDF version 1.9 or later. Wdfcoinstaller01009.dll - Write an INF that installs Winusb.sys as the function driver for the USB device.
- Create a signed catalog file for the package. This file is required to install WinUSB on x64 versions of Windows Vista.
- Attach the USB device to your computer.
- Run devcon.exe as follows:
devcon.exe install inf_file.inf "hardware_id"
- devcon.exe can be found in the
\WinDDK\build_number\tools\devcon\ \devcon.exe folder. - inf_file indicates the name of your INF.
- hardware_id indicates the hardware identifier for the device provided by the device vendor. This can be found in the INF. For example, for the OSR USB-FX2 Learning Kit device from OSR, the identifier is USB\Vid_0547&Pid_1002.
Note Because the hardware id contains '&', make sure that you specify the hardware id within quotes.
- devcon.exe can be found in the
- Alternatively, you can use the Device Manager to install the driver. Follow the instructions on the Update Driver Software wizard and choose manual installation. You will need to provide the location of the driver package folder to complete the installation.
No comments:
Post a Comment