Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Hardware & Devices
  4. Map USB Port to DirectSound Device

Map USB Port to DirectSound Device

Scheduled Pinned Locked Moved Hardware & Devices
csharphelpvisual-studioquestionannouncement
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GrizzlyDoug
    wrote on last edited by
    #1

    I am having a problem with mapping the USB Port of a USB Device to it's coresponding DirectSound Device. I am doing this in order to associate a specific USB Port with a specific DirectSound Device in order to get the FriendlyName for the DirectSound Device to associate with an audio control. I need to have specific knowledge of the USB Port in order to make sure the endpoint audio device is going to the correct user. I'm working in VS 2005.NET C# and hope this is possible. I've taken a look at the C# version of USBView, which gets you down to the USB Device, and I have also looked at DirectSoundEnumerator, which I can use to search the Interface string for the "USB" substring in order to select the DirectSound USB Audio Devices. From what I can see so far, there is no matching information coming from either side in order to map these two together. Does anyone have any way of doing this? Thanks in advance for any help, which is greatly appreciated.

    GrizMan

    G 1 Reply Last reply
    0
    • G GrizzlyDoug

      I am having a problem with mapping the USB Port of a USB Device to it's coresponding DirectSound Device. I am doing this in order to associate a specific USB Port with a specific DirectSound Device in order to get the FriendlyName for the DirectSound Device to associate with an audio control. I need to have specific knowledge of the USB Port in order to make sure the endpoint audio device is going to the correct user. I'm working in VS 2005.NET C# and hope this is possible. I've taken a look at the C# version of USBView, which gets you down to the USB Device, and I have also looked at DirectSoundEnumerator, which I can use to search the Interface string for the "USB" substring in order to select the DirectSound USB Audio Devices. From what I can see so far, there is no matching information coming from either side in order to map these two together. Does anyone have any way of doing this? Thanks in advance for any help, which is greatly appreciated.

      GrizMan

      G Offline
      G Offline
      GrizzlyDoug
      wrote on last edited by
      #2

      Here is a further update on what I have done: I have a question about ParentIdPrefix. I am down at the device level for USB devices and I found the DriverKeyName by first setting up a SP_DEVINFO_DATA da = new SP_DEVINFO_DATA() structure and then calling SetupDiEnumDeviceInfo(h,i,ref da) and then using SetupDiGetDeviceRegistryProperty with SPDRP_DRIVER. Now I want to access the ParentIdPrefix at that level and compare it to the ParentIdPrefix I extract from the Interfaces ID string provided by DirectSound. In my code in which I have used the example from USBView to get to the USB Device level. I tried to get the ParentIdPrefix by using CM_Get_Parent with the da.DevInst value I have. The value I received (3042) does not represent the ParentIdPrefix value (string) (7&f4e88d5&0) I can see in the registry. I would like to get the value I see in the registry. Do you know how I would go about this? Thanks in advance for your help.

      GrizMan

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups