Author Topic: WinUSB c# and osrusbfx2  (Read 9975 times)

ph0en1x3

  • Member
  • ***
  • Posts: 4
WinUSB c# and osrusbfx2
« on: November 22, 2010, 11:27:33 am »
I have successfully installed and can use the osrusbfx2 driver and testapp.c that the WDK provided, out of the box.    

I need to bring the USB functionality to a C# project and found Jan's download.     I changed the WINUSB_DEMO_GUID_STRING = "{78A1C341-4539-11d3-B88D-00C04FAD5171}"  to match my USB bulk read/write device.    

I can successfully step throught the code until I get to SetupDiEnumDeviceInterfaces (SetupDiGetClassDevs is successful).      SetupDiEnumDeviceInterfaces returns a false (error 259) which means it can't find the USB device but it is listed in the registry and hardware manager as:  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_0547&Pid_1002\5&34fa6fd6&0&2 with GUID = {78A1C341-4539-11D3-B88D-00C04FAD5171}

The osrusbfx2 driver is based on the WinUSB driver so the device has been installed using osrusbfx2.sys and WdfCoInstaller01009.dll (attached the inf file)

What do I have to do to get the WinUSB_cs to recognize a device that is successfully installed?

[attachment deleted by admin]
« Last Edit: November 22, 2010, 11:55:21 am by ph0en1x3 »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: WinUSB c# and osrusbfx2
« Reply #1 on: November 22, 2010, 12:41:53 pm »
My WinUSB application is for devices using the WinUSB driver. My application example includes an INF file.

Jan

ph0en1x3

  • Member
  • ***
  • Posts: 4
Re: WinUSB c# and osrusbfx2
« Reply #2 on: November 22, 2010, 02:30:29 pm »
Th OSRUSBFX GUID is hard coded to {573e8c73-0cb4-4471-a1bf-fab26c31d384} in the driver.    Once I found that bit of information and plugged it in - the device is recognized!!!!    Now to debug the write...   Thanks again Jan!!!!!!! :)

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: WinUSB c# and osrusbfx2
« Reply #3 on: November 23, 2010, 01:58:59 pm »
Glad to hear you got it solved.

Jan