help with winUSB
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: help with winUSB

  1. #1
    Join Date
    Aug 2011
    Posts
    19

    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 followed all the steps that were listed in msdn website

    http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx

    http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx

    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?

    Thanks,
    --Rudy
    Last edited by rudy01; January 25th, 2013 at 10:08 AM.

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,071

    Re: help with winUSB

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

    Quote Originally Posted by rudy01 View Post
    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).
    Last edited by Igor Vartanov; January 26th, 2013 at 08:27 AM.
    Best regards,
    Igor

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center