Re: DeviceIOControl

From: Max Paklin (mpaklin_at_hotmail.com)
Date: 06/01/04


Date: Tue, 1 Jun 2004 01:22:54 -0700


> I would like to clarify my question. I have own driver for a virtual sound
> card and I want to redirect some sound data to the hardware sound card
which
> have third party driver.

Why don't you have a user mode service building a small graph of your
device's filter with the output pin connected to the input of real sound
card filter?
That would save you a lot of pain.
Base your driver on Testcap sample and have it expose regular filters that
the sound card driver is expected to expose. On top of that make it create a
special filter of yours with one output pin for a data to be sent to a real
sound card. Then hook it up to a sound card renderer filter.

> At the moment I have enumerated all sound devices (Max, thank you very
much)
> and create connection to a pin (KsCreatePin) of hardware sound card.
> KsCreatePin return HANDLE and I have no any ideas how to send
> IOCTL_KS_WRITE_STREAM. All functions such as KsSynchronousIoControlDevice
> need a FILE_OBJECT on input. How can I obtain a FILE_OBJECT from a pin

KsSynchronousIoControlDevice needs a file handle. That's what KsCreatePin
gives you.
The API such as KsCreatePin is not very widely used. I don't know of anybody
outside of MS who would be willing to use it. Why?

> HANDLE? I have tried to use KsSynchronousDeviceControl but the driver was
> not loaded during a boot. Probably there was a linkage problem: May be
there
> is other way. What do you think?

Huh?
Linkage problem?
Your virtual driver won't load by default. It loads when an app tries to use
it.
Once again, you can do it the way you are trying to do it, but it is MUCH
more difficult. I see no point going down that road.

-- Max.

>
>
>
>
>
> "Max Paklin" <mpaklin@hotmail.com> сообщил/сообщила в новостях следующее:
> news:eVGfnKuREHA.2404@TK2MSFTNGP09.phx.gbl...
> > PDO for KS based minidriver is owned by the class driver (ks.sys).
> > This means that you can't send anything to your driver directly, it will
> all
> > go through KS (unless you bother to hook dispatch table in PDO or you
> create
> > an extra PDO and make it a target for your IOCTL).
> >
> > Still nothing stops you from creating a custom property set and sending
> > IOCTLs to your driver using IKsControl, IKsPropertySet or plain
> > KsSynchronousDeviceControl.
> >
> > -- Max.
> >
> >
> >
> > "Alexander" <fastbrain@hotbox.ru> wrote in message
> > news:Ot41OMtREHA.3452@TK2MSFTNGP10.phx.gbl...
> > > I want to send IRP_MJ_DEVICEIOCONTROL to the stream driver from kernel
> > mode.
> > > Is there function similar to DeviceIOControl or I have to send IRP to
> > driver
> > > directrly?
> > >
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: VIA Envy24PT sound card driver loads at startup properly 9 of 10 times
    ... driver updates including the latest and correct driver for the sound card. ... Onboard sound chip is disabled in BIOS and the driver for it is not installed. ... The sound card, Chaintech, Envy24 Family Audio Controller WDM, is installed/seated properly and uses the IRQ 16 exclusively. ...
    (microsoft.public.windowsxp.hardware)
  • Re: Reading audio samples immediately
    ... driver assembly code for my particular soundcard and set up, ... stopped the card and the DMA controller myself. ... wishing some special mode would be created for use of real-time sound. ...
    (microsoft.public.win32.programmer.directx.audio)
  • RE: Sound device problems
    ... Tomorrow I shall reinstall the PCI card. ... I once had to reinstall windows and I used a Flopy to boot then ... sometimes pc makers use a variety of sound card manufacturers. ... install the sound device but will install the audio driver as well. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Trying to Install New Sound Card... ARRRRGGGGHHH!
    ... The only sound card I've had is the one on-board, ... but their driver does no better. ... rebooted and install the drivers. ...
    (microsoft.public.windowsxp.hardware)
  • Re: Driver that handles multiple instance of the same card
    ... The AddDevice routine should be called once for each device object you are ... you need to turn on driver verifier's ... There is 16550 UART on the card. ... may be the toaster filter driver does not support multiple instances. ...
    (microsoft.public.development.device.drivers)

Loading