Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Dynamic add virtual audio devices

SlimSlim Member Posts: 6

Hi,everyone.
The situation is that I am a newer to windows kernel driver and I want to dynamic add subdevices a pair of mic and speaker.I have a app to send custom IOCTL code to the driver ,and when driver receive the code will add a pair of subdevices.But when I want to add the sixth pair of subdevices the API PcRegisterSubdevice failed with STATUS_ALLOTTED_SPACE_EXCEEDED.I think i pass valid parameters to PcRegisterSubdevice.
I am not sure is this issue caused by the subdevices name is same or other reasion,I wanna change the subdevices name, but like I said I am a newer to Windows kernel I do not find a way to make subdevices name unique. Is anybody can help me figure out what shoud I do?


Comments

  • Mark_RoddyMark_Roddy Member - All Emails Posts: 4,753

    When you called PcAddAdapterDevice what value did you provide for MaxObjects?

  • SlimSlim Member Posts: 6

    @Mark_Roddy said:
    When you called PcAddAdapterDevice what value did you provide for MaxObjects?

    OMG,Your advice was amazing. I ignored the basics.Thank you so much.I should be more careful in the future.

  • SlimSlim Member Posts: 6

    @Mark_Roddy said:
    When you called PcAddAdapterDevice what value did you provide for MaxObjects?

    I have anthoer issue is how to set the subdevice name when driver register the deivces,Do you have any idea?

  • SlimSlim Member Posts: 6

    @Slim said:

    @Mark_Roddy said:
    When you called PcAddAdapterDevice what value did you provide for MaxObjects?

    I have another issue is how to set the subdevice name when driver register the deivces,Do you have any idea?

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,832

    The concept of "name" is quite ambiguous in the audio device world. What, exactly, do you mean by that?

    Tim Roberts, [email protected]
    Software Wizard Emeritus

  • SlimSlim Member Posts: 6

    @Tim_Roberts said:
    The concept of "name" is quite ambiguous in the audio device world. What, exactly, do you mean by that?

    Sorry,My question is not detailed enough.
    When the driver create virtual audio device is a pair,a mic and a speaker.Now the device name is "麦克风 (Virtual Audio Device)" and "扬声器 (Virtual Audio Device)".I want to change the name like this:"Mic 1 (Virtual Audio Device)" and "Speaker 1 (Virtual Audio Device)"
    "Mic 2 (Virtual Audio Device)" and "Speaker 2 (Virtual Audio Device)"
    "Mic 3 (Virtual Audio Device)" and "Speaker 3 (Virtual Audio Device)"
    .
    .
    .
    "Mic N (Virtual Audio Device)" and "Speaker N (Virtual Audio Device)"
    "Mic N+1 (Virtual Audio Device)" and "Speaker N+1 (Virtual Audio Device)"
    Here's what I'm looking for.What should I do.Can you give me some advices?Thank you very much.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 20-24 May 2024 Live, Online