Author Topic: Using winusb with multiple windows versions  (Read 8363 times)

Hydra

  • Member
  • ***
  • Posts: 1
Using winusb with multiple windows versions
« on: August 27, 2012, 06:33:38 pm »
I want to use generic user mode WinUSB driver supplied by Microsoft to access USB devices. I am using the following document as a reference: http://msdn.microsoft.com/en-us/library/windows/hardware/gg487341.aspx (Here is a scribd link that you can open up in your browser: http://www.scribd.com/doc/55882984/WinUsb-HowTo). Page 12, section "How to use the WinUSB API", the 2nd bullet states:

--------
"""Add WinUsb.lib to the list of libraries that are linked to your application. WinUsb.lib is included with the WDK. The version for Windows XP is located under WINDDK\BuildNumber\lib\wxp\i386. There are separate versions of WinUsb.lib for Windows Vista for each supported CPU architecture. They are located under the WINDDK\BuildNumber\lib\wlh folder."""
--------

As you can see, it says that I have to link the .lib file corresponding to the target Windows version. Currently, I have everything working on my machine (w7, 64-bit), because I linked my application with the corresponding library (lib/w7/amd64). However, as you might imagine, I want my application to work with all versions of windows (xp, win7, vista AND win8). Moreover, I want it to work both in 32 and 64-bit machines.

Can you please help me figure out what to do in this scenario? I hope the solution isn't "a new build for each target OS version"!

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research