Accessing Stream Driver using DeviceIoControl()

Hello everybody,

We are developing a AvStream minidriver for our device. We need to
have a Dispatch routine for IRP_MJ_DEVICE_CONTROL.
This routine is to be called when our client application (user mode)
calls the function DeviceIoControl().

Currently, in the CreateFilter function, KsAllocateObjectHeader() is
called wherein the Dispatch table is passed which lists the Dispatch
routine.

Also KsSetMajorFunctionHandler () is invoked to set the function
Handler for IRP_MJ_DEVICE_CONTROL. However, the dispatch routine
does not seem to get called.

We use DeviceIoControl with IOCTL_KS_PROPERTY and then the
DeviceIoControl succeeds but instead of the above dispatch routine
getting called, the property handler routine (corresponding to
KSPROPERTY structure passed in DeviceIoControl) registered in the
automation table gets invoked.

if we use some other IOCTL, the DeviceIoControl returns with
ERROR_INVALID_FUNCTION.

How do we access the AVStream driver using DeviceIoControl?
Can we access using any IOCTL other than IOCTL_KS_PROPERTY?

Any clues will be greatly appreciated.

Warm regards
Venky


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> We are developing a AvStream minidriver for our device. We need to

have a Dispatch routine for IRP_MJ_DEVICE_CONTROL.
This routine is to be called when our client application (user mode)
calls the function DeviceIoControl().

Currently, in the CreateFilter function, KsAllocateObjectHeader() is
called wherein the Dispatch table is passed which lists the Dispatch
routine.

Also KsSetMajorFunctionHandler () is invoked to set the function
Handler for IRP_MJ_DEVICE_CONTROL. However, the dispatch routine
does not seem to get called.

We use DeviceIoControl with IOCTL_KS_PROPERTY and then the
DeviceIoControl succeeds but instead of the above dispatch routine
getting called, the property handler routine (corresponding to
KSPROPERTY structure passed in DeviceIoControl) registered in the
automation table gets invoked.

if we use some other IOCTL, the DeviceIoControl returns with
ERROR_INVALID_FUNCTION.

How do we access the AVStream driver using DeviceIoControl?
Can we access using any IOCTL other than IOCTL_KS_PROPERTY?

Try to assign your own IOCTL handler to the DRIVER_OBJECT directly after
ks.sys has finished assigning its handlers. Of course, don’t forget to
save what ks.sys assigned and call it to handle everything except
your private IOCTL which you handle in your handler.


Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com