Implementing Custom IOCTLs in AVSTREAM.

Hi All,
I am new to AVSTREAM drivers and want to define my own IOCTL interface for my AVSTREAM driver. I went through the DDK and was not able to find anything on that. Also the avshws does not implement this at all.

Is DeviceIOControl not a standard way of sending IOCTL to AVStream.??

Any information or pointers are highly appriciated.

Thanks,

  • DC

Shape Yahoo! in your own image. Join our Network Research Panel today!

On Fri, Aug 10, 2007 at 04:32:51PM -0700, Driver Coder wrote:

I am new to AVSTREAM drivers and want to define my own IOCTL
interface for my AVSTREAM driver. I went through the DDK and was not able
to find anything on that. Also the avshws does not implement this at all.

Is DeviceIOControl not a standard way of sending IOCTL to AVStream.??

No. Remember that AVStream is essentially a wrapper around a standard
WDM driver. The AVStream wrapper does all of its communications via
ioctls, so the wrapper is intercepting the ioctls and translating them
to the appropriate AVStream callbacks. In order for you to use your
own ioctls, you have to override the AVStream dispatch table and check
for your ioctl before AVStream processes it. It can be done, but the
important point is that it is not the "AVStream way to do things." In
particular, how would you expect your application to get a file handle
to your driver to pass to DeviceIoControl?

The RIGHT way to do this is to define custom KS properties, methods,
and events, and expose them through the automation tables in your
filter's data structures. Then, your application can use the normal
COM IKsControl interface for communication. Anything you can do with
an ioctl can be done via a custom property or method.

Tim Roberts, xxxxx@probo.com
Providenza & Boeklheide, Inc.

Thanks Timir. I really appriciate your reply.

  • DC

xxxxx@probo.com wrote: On Fri, Aug 10, 2007 at 04:32:51PM -0700, Driver Coder wrote:

I am new to AVSTREAM drivers and want to define my own IOCTL
interface for my AVSTREAM driver. I went through the DDK and was not able
to find anything on that. Also the avshws does not implement this at all.

Is DeviceIOControl not a standard way of sending IOCTL to AVStream.??

No. Remember that AVStream is essentially a wrapper around a standard
WDM driver. The AVStream wrapper does all of its communications via
ioctls, so the wrapper is intercepting the ioctls and translating them
to the appropriate AVStream callbacks. In order for you to use your
own ioctls, you have to override the AVStream dispatch table and check
for your ioctl before AVStream processes it. It can be done, but the
important point is that it is not the "AVStream way to do things." In
particular, how would you expect your application to get a file handle
to your driver to pass to DeviceIoControl?

The RIGHT way to do this is to define custom KS properties, methods,
and events, and expose them through the automation tables in your
filter's data structures. Then, your application can use the normal
COM IKsControl interface for communication. Anything you can do with
an ioctl can be done via a custom property or method.

Tim Roberts, xxxxx@probo.com
Providenza & Boeklheide, Inc.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:

To unsubscribe, visit the List Server section of OSR Online at ListServer/Forum


Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.