- AVStream/BDA get property handler - how to get output buffer size?
- Posted by Robert Schlabbach on December 22nd, 2004
There must be something very simple I'm overlooking:
I have an AVStream/BDA property handler for a GET property with a
variable-sized output buffer:
NTSTATUS MyPropertyHandler_Get_ListPIDs(
IN PIRP Irp,
IN PKSPROPERTY Property,
IN PVOID OutputBuffer)
Obviously, I need to know the size of the output buffer to be able to tell
if my data will fit in it (or return STATUS_BUFFER_OVERFLOW if it won't).
But where do I get it from? I suppose I could retrieve the I/O stack
location from the IRP and look at it, but isn't there an "AVStream" or
"BDA" way to do this?
Regards,«
--
Robert Schlabbach
e-mail: robert_s@gmx.net
Berlin, Germany
- Posted by Max Paklin on December 22nd, 2004
This is what I use
ULONG ulOutputSize = IoGetCurrentIrpStackLocation(
pIrp )->Parameters.DeviceIoControl.OutputBufferLength;
Although I don't think it is really necessary. The class driver should do
checking for you and the size that it assumes is the one that it gets from
KSPROPERTY_ITEM for the property in question.
For myself I do the checking anyway. Better be safe than sorry, I guess. Old
habits die hard.
-- Max.
"Robert Schlabbach" <robert_s@gmx.net> wrote in message
news:cqamb4$nh$02$1@news.t-online.com...
- buffer size on hard drive (Hardware) by Adam
- Importance of gigabit switch port buffer size question (Computer Hardware) by NuQ
- Importance of gigabit switch port buffer size question (Routers) by NuQ
- W98SE Config.sys >> Files + Buffer Size Setting (Computers & Technology) by Reinier & Maria Pestman-Steyn
- How important is buffer size in a DVD/CD writer? (Computer Hardware) by Dan

