If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

help with winUSB

Hi all,

I would really really appreciate some help with winUSB. I wasn't sure where else to post this. I wasn't able to find much help on this topic elsewhere. So, if you know of a better place for me to post this, please let me know. And, if anyone has experience with this please help me out.

I tried to run it on Windows 7 with Visual Studio 2010. Even though it compiles with no errors, I cannot pass the function SetupDiEnumDeviceInfo, and it errors out (I think error #259). I don't know how to pass this error.

However I am not sure of the few steps in the process:

1. What does msdn talk about with "A signed catalog file for the package. This file is required to install WinUSB on x64 versions"? What is a signed catalog package? How do I set this?

2. It also talks about making some directory (For example, c:\UsbDevice) to put the .inf file in there ! But how does my VS project know that I am pointing to c:\UsbDevice, and how does it know what the name of the ".inf' file should be? what should I call the .inf file? And how to point the project to it?

3. Inside the .inf file there are two GUID numbers. I can get the Class GUID number by going to the Device Manager. But how do I set the Device Interface GUID? Please help. Is is possible that the error that I am getting is because I don't have one of the following items set up correctly?

Re: help with winUSB

Waiver: I know very little about driver setup, and nothing about WinUSB.

Originally Posted by rudy01

1. What does msdn talk about with "A signed catalog file for the package. This file is required to install WinUSB on x64 versions"? What is a signed catalog package? How do I set this?

Signed means digitally signed. To sign anything, you have to acquire a digital signature certificate from some trusted authority like VeriSign or Thawte. Catalog file has something to do with driver setup. From second link, prerequisite:

You are familiar with SetupAPI routines that are used for device enumeration. For more information, see SetupAPI.

2. It also talks about making some directory (For example, c:\UsbDevice) to put the .inf file in there ! But how does my VS project know that I am pointing to c:\UsbDevice, and how does it know what the name of the ".inf' file should be? what should I call the .inf file? And how to point the project to it?

Inf file instructs the system how to install and setup your driver package. I doubt it has anything to do with your project, as it's all about setup.

3. Inside the .inf file there are two GUID numbers. I can get the Class GUID number by going to the Device Manager. But how do I set the Device Interface GUID? Please help. Is is possible that the error that I am getting is because I don't have one of the following items set up correctly?

From the first link:

Registering a device interface GUID

An extended properties OS feature descriptor that is required to register its device interface GUID. The GUID is required to find the device from an application or service, configure the device, and perform I/O operations.

In previous versions of Windows, device interface GUID registration is done through the custom INF. Starting in Windows 8, your device should report the interface GUID by using extended properties OS feature descriptor.

The extended properties OS feature descriptor includes a header section that is followed by one or more custom property sections. The header section describes the entire extended properties descriptor, including its total length, the version number, and the number of custom property sections. To register the device interface GUID, add a custom property section that sets the bPropertyName field to "DeviceInterfaceGUID" and wPropertyNameLength to 40 bytes. Generate a unique device interface GUID by using a GUID generator and set the bPropertyData field to that GUID, such as "{8FE6D4D7-49DD-41E7-9486-49AFC6BFE475}". Note that the GUID is specified as a Unicode string and the length of the string is 78 bytes (including the null terminator).