AVStream' KStrGetPropertyHandler get input parameter

Hi all,

i am developing a AVStream mini driver and a ks-proxy plugin. it was modified from Max Paklin’s Wd3KsProxyPluginSample.

In user mode i used IKsPropertySet::Get method with some input parameter’s. But i can’t find the input parameters in the driver’s KStrGetPropertyHandler routine.

the prototype is:
HRESULT IKsPropertySet::Get(
[in] REFGUID guidPropSet,
[in] DWORD dwPropID,
[in] LPVOID pInstanceData,
[in] DWORD cbInstanceData,
[out] LPVOID pPropData,
[in] DWORD cbPropData,
[out] DWORD *pcbReturned
);

is pInstanceData the input parameter?

then how to get it in KStrGetPropertyHandler routine?

thanks in advance!

xxxxx@gmail.com wrote:

i am developing a AVStream mini driver and a ks-proxy plugin. it was modified from Max Paklin’s Wd3KsProxyPluginSample.

In user mode i used IKsPropertySet::Get method with some input parameter’s. But i can’t find the input parameters in the driver’s KStrGetPropertyHandler routine.

the prototype is:
HRESULT IKsPropertySet::Get(
[in] REFGUID guidPropSet,
[in] DWORD dwPropID,
[in] LPVOID pInstanceData,
[in] DWORD cbInstanceData,
[out] LPVOID pPropData,
[in] DWORD cbPropData,
[out] DWORD *pcbReturned
);

is pInstanceData the input parameter?

then how to get it in KStrGetPropertyHandler routine?

I agree that this should be a lot simpler than it is, that the
documentation doesn’t make this entirely clear, and making it worse is
the fact is that not all property handlers behave in the same way.

Theoretically, pInstanceData has the “input” structure, and pPropData
has the “output” structure, at least for a property Get. The
documentation is USUALLY pretty good about identifying the structures
used for each one. The pInstanceData always starts with a KSIDENTIFIER
that includes the property set GUID and the property ID number.
Sometimes the pPropData struct does as well, but not always.

The pInstanceData pointer becomes the Request parameter to your
handler. pPropData becomes the Data parameter to your handler. The
sizes of the two fields are in the IRP’s IO_STACK_LOCATION
Parameters.DeviceIoControl.InputBufferSize and OutputBufferSize.


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

Thank you Tim.

I’ve found my input parameter. It’s at the end of PKSIDENTIFIER data structure.