Libusb-win32 is a port of the USB library
libusb
to the Windows operating systems (Win98SE, WinME, Win2k, WinXP). The library
allows user space applications to access any USB device on Windows in a
generic way without writing any line of kernel driver code.
Features:
- Can be used as a filter driver for existing, already
installed devices. This feature allows libusb-win32 to communicate
with any installed USB device.
- Can be used as a normal device driver for devices for
which no driver exists (self build/developed USB hardware, etc).
- The two methods described above can used in
parallel without any problems.
-
100% API and functional compatible with the main
libusb project.
-
Supports Bulk and Interrupt transfers.
-
Supports all Standard Device Requests (control messages)
described in chapter 9 of the USB specification.
-
Supports vendor specific control messages.
If something isn't working as expected, make sure that you have installed the latest
service packs for your OS, the mainboard's latest driver packages, and
bios updates, and the latest version of libusb-win32 before requesting
any support.
Available Support Options:
- A mailing list is
available for discussions, questions, bug reports, feature request, and
other issues.
Please subscribe
to the list first before posting.
- The project page
offers different forms which can be filled out to get
support, to report
bugs, or to request
new features.
Please describe your problems and your system as precise as possible
(OS, service packs, version of libusb-win32, type of device, etc.).
This will make solving problems a lot easier.
Source code and binary packages can be downloaded from the projects
download
site. Source code is also available via anonymous
CVS.
Requirements
- A Win2k or XP system.
- The XP-DDK (Win2k-DDK could work, but has not
been tested). A gratis CD of the DDK can be ordered at http://www.microsoft.com
-
MinGW/Msys,
Cygwin
is not working yet, but this will change in the future. Microsoft
and Borland compilers can't be used to build the library, due to
their lack of full C99 support.
-
Borland C++ Compiler (BCC) to build the import library for this
compiler. A free command line version of BCC can be
downloaded from
http://www.borland.com.
-
The
NSIS install system.
-
Make sure, that the binary directories of NSIS and BCC are in the
system search path (modify the system's %PATH% environment
variable).
Build Process
The package is currently build with a standard Makefile, there are no
autoconf/automake scripts available yet.
-
Download the latest source code.
-
From a Msys shell run the following command
(replace
<DDKDIR> with your DDK's root
directory):
make DDK_PATH=<DDKDIR>
to the build the
library, services, and drivers.
-
To build the distribution archives and the
installer run:
make dist.
Using
-
To use libusb-win32 in your own programs
include the supplied header file
usb.h, and link
against the import library (libraries for GCC, BCC, and MSVC
are available)
-
To avoid any version conflicts, DO NOT include
the DLL
libusb0.dll in your application's directory.
The DLL is
part of the driver and installed automatically to the Windows
system directory.
-
If you are porting a libusb based program from
Unix style systems to Windows, remove all references to the
library's global variable
usb_busses. Use the
function usb_get_busses()
instead to get this variable. Global variables in shared libraries
(DLLs) do not work on Windows systems across different compilers.
There is no documentation available yet, accept this page. As libusb-win32 is fully
API compatible to libusb, the API documentation from the main libusb
project site at
http://libusb.sourceforge.net can be used.