libusbK 
3.0
Library Documentation
© 2011-2021 Travis Lee Robinson. All rights reserved.
About

Explanation of the libusbK project, the user mode library, and its Supported Drivers

libusbK can be separated into two major components:

  • A Windows user mode USB library (libusbK.dll)
  • A Windows kernel mode USB driver (libusbK.sys)

libusbK.dll (libusbK user library)

libusbK.dll is a generic user mode usb library for the Microsoft Windows Operating System family. (Windows XP and up)

Windows 2000 is currently not supported by the release builds or driver installer packages but can still be achieved with manual builds and custom driver installations.

Note
The libusbK library allows developers to target multiple drivers using the same set of api function declarations.

Supported Drivers

The following usb kernel drivers are supported by the libusbK library:

  • libusbK.sys
  • libusb0.sys
    • Using the api functions exported by the libusbK library (functions beginning with with UsbK_)
    • Using dynamically loaded functions based on the devices driver type. see USB General
  • WinUSB.sys
    • Using dynamically loaded functions based on the devices driver type. see USB General

WinUSB Compatibility Layer

The libusbK library includes a Winusb.dll compatiblity layer. This makes libusbK a drop-in replacement for an existing WinUSB application. Developers can make use of this functionality in two ways:

  • Using the WinUsb_ prefixed function which are directly exported by libusbK.dll
    • Usage of the WinUsb_ prefixed functions is intended for developers who want to switch away from the WinUSB.sys driver without modifying application code.
    • The WinUsb_ prefixed functions must not be used for devices installed with the WinUSB.sys driver.
    • The WinUsb_ prefixed functions are identical to the exported UsbK_ prefixed functions, thus must be installed with either the libusbK.sys or libusb0.sys driver.
  • Using the USB General
    • This option allows users to target any of the Supported Drivers but requires small modifications to the applications source code.

libusbK.sys (libusbK kernel driver)

libusbK.sys is a KMDF based usb device kernel driver for the Microsoft Windows Operating System family. (Windows XP and up)

Windows 2000 is currently not supported by the release builds or driver installer packages but can still be achieved with manual builds and custom driver installations.

The libusbK kernel driver uses an extended libusb-win32 (libusb0.sys) compatible driver api and provides higher-level functionality when compared to libusb0.sys.

The following user mode usb libraries support the libusbK.sys kernel driver:

  • libusbK.dll
  • libusb0.dll