Re: Supporting KSPROPERTY_PIN_CONSTRAINEDDATARANGES under AVStream.
- From: Tim Roberts <timr@xxxxxxxxx>
- Date: Fri, 13 May 2005 22:40:05 -0700
yinmun <yinmun@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
>I am developing an AVStream driver, and need to support the
>KSPROPERTY_PIN_CONSTRAINEDDATARANGES under the KSPROPSETID_Pin property set
>to return different set of data ranges based on different internal states.
An AVStream driver will almost never handle this property on its own. You
generally set up your data structure will all the possible data ranges, and
then refine them based on state in your SetDataFormat and Intersect
handlers.
>The difficulty that I'm facing now is during the first call to the property
>handler, which has the following prototype:
>NTSTATUS KStrGetPropertyHandler (
> IN PIRP Irp,
> IN PKSIDENTIFIER Request,
> IN/OUT PVOID Data
>);
>The parameter Data that the function passes in is a NULL pointer. In such
>situation, I return STATUS_BUFFER_TOO_SMALL. This will result the handler
>function to be called for the second time with a valid Data pointer.
And are you setting the Irp's IoStatus.Information field to the number of
bytes of data you expect to return? That second Data pointer you get will
have been allocated by the caller to the number of bytes you specified. If
you leave IoStatus.Information set to 0, the buffer will be too small,
you'll write off the end, and you'll get a BAD_POOL_HEADER bugcheck.
--
- Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc
.
- Follow-Ups:
- References:
- Prev by Date: Re: Tweaking the postscript printer driver
- Next by Date: Re: Tweaking the postscript printer driver
- Previous by thread: Supporting KSPROPERTY_PIN_CONSTRAINEDDATARANGES under AVStream.
- Next by thread: Re: Supporting KSPROPERTY_PIN_CONSTRAINEDDATARANGES under AVStream
- Index(es):
Loading