[wdmaudiodev] Re: Interfacing Audio Driver From USER MODE

  • From: timr@xxxxxxxxx
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Sun, 1 Feb 2009 17:52:45 -0800

On Sat, Jan 31, 2009 at 06:18:35PM -0800, Vipin Kumar wrote:
> 
> i am using a  MSVAD Simple as a base,( so portcls wavecyclic is the
> type).
> 
> Moreover, as i have told earlier, i have already done
>    DriverObject->MajorFunction [IRP_MJ_DEVICE_CONTROL] =
> IoCtlHandler;
> 
> for IRP_ MJ_CREATE,

How did you do that?  The DriverEntry for MSVAD, like all port class
devices, calls PcInitializeAdapter.  THAT routine sets up all of the
dispatch entry points for you.  Port class is ALREADY handling IRP_MJ_CREATE.
You can't just override it, because you'll lost the class driver support.

This is a kernel streaming driver.  The KS framework is already opening
and closing your driver, and sending you specially formatted ioctls to
handle the KS interfaces.  You need to work within that framework.

The RIGHT way to do this is to add another custom property to handle
your unique needs.  Then, your application can use CLSID_SystemDeviceEnum
to find your driver and get the IBaseFilter interface.  From there, you can
fetch an IKsControl interface, and send property requests to your heart's
content.

Before I get a possible/impossible reply, I will state that it is possible
for you to intercept IRP_MJ_DEVICE_CONTROL requests on your own, after
port class has done its setup.  You have to save the original 
IRP_MJ_DEVICE_CONTROL handler, so you can forward to it any requests that
you don't recognize.  You still have the problem of how to open the device,
given the KS framework.  Overall, I have to think it would be better for 
you to do this through properties.
-- 
Tim Roberts, timr@xxxxxxxxx
Providenza & Boeklheide, 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: