Home > Web Site Updates > WinUSBWrappers v1.0

WinUSBWrappers v1.0

November 27, 2015

Just to let everyone know that v1.0 of WinUSBWrappers has been released.

The new class provided is WinUSB::CDevice which provides a simple RAII wrapper for programming to the WinUSB API for USB devices on Windows.

Features

  • Provides a simple C++ Header only module to easily encapsulate WinUSB.
  • Integrates with STL’s and MFC’s collection and string classes for easier client coding.
  • Should make it easier to use WinUSB from C++ going forward.
  • Provides a RAII wrapper for the WINUSB_INTERFACE_HANDLE handle of WinUSB as well as the HANDLE returned from the CreateFile call when opening a WinUSB device.
  • The class also provides generic enumeration of USB devices given a device interface GUID, a USB PID and / or VID. This enumeration also is customizable from client code using a function pointer callback.

Included in the download is the WinUSBWrappers source code and a VC 2013 console based application which exercises all of the class API methods. If the sample app detects that you have an OSR FX2 Learning Kit device attached to your computer then it will exercise all of the functionality of this board via the WinUSBWrappers API methods. Even if you do not have one of these devices attached the sample app will demonstrate enumeration of USB devices using the WinUSB::CDevice::EnumerateDevices methods before it exits prematurely. For more information about this device, please see www.osronline.com/hardware/osrfx2_32.pdf and https://store.osr.com/product/osr-usb-fx2-learning-kit-v2/ to purchase one of these devices. Most of the Microsoft documentation related to WinUSB assumes you have one of these devices when learning WinUSB programming. Another resource worth reading is https://www.osronline.com/article.cfm?article=532 which provides a MFC wrapper class for WinUSB upon which WinUSBWrappers takes some inspiration. For examples of all the WinUSBWrappers API methods please see the source code of the demo application in the WinUSBWrappersDemo.cpp module in the download. To install the FX2 device using a specific device interface GUID you might want to take a look at http://zadig.akeo.ie/ which allows a specific driver such as WinUSB to be associated with a specific USB device as well as automating creation of signed inf driver installation files.

Advertisements
Categories: Web Site Updates
%d bloggers like this: