[wdmaudiodev] Re: Interfacing Audio Driver From USER MODE

  • From: Tim Roberts <timr@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Fri, 30 Jan 2009 14:41:02 -0800

Vipin Kumar wrote:
>
> since i am writing an virtual microphone driver, i definitely want it
> to take data from usermode,( ofcourse via IOCTL).
> i have written few drivers but never a WDM audio one

What kind of driver did you write?  Usually, an audio driver will be a
KS or port class driver, where you don't necessarily control the
dispatching.  The KS framework will registry a device interface with an
instance string; that's how it knows which filter you're talking to.

If it is a KS driver, you could do this as a custom property, using the
normal KS dispatch mechanisms.


> My IOCTL handler  gives me few IOCTLS while recording.

I imagine you're seeing the IOCTL_KS_WRITE_STREAM ioctls from KS.  Is
that right?


> but when i call createfile on it fails
> ...
> i get err code 2 , means file not found,  However, i can see the
> symbolic link using winobj in the Global Directory.
>
> So what's WRONG !!!!

*IF* this is a KS driver, then the KS framework is expecting an instance
string, and you aren't providing one.  You aren't expected to open the
device yourself using CreateFile.  You would use CLSID_SystemDeviceEnum,
then BindToObject, to get an IBaseFilter object that you could send
IKsControl property requests to.

-- 
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: