Re: Supporting KSPROPERTY_PIN_CONSTRAINEDDATARANGES under AVStream



Hi Tim,

Thanks again for replying, I really appreciate that =)

I have tried the method you proposed, but when I tried to retrieve the pin
properties of my filter loaded using GraphEdit, it'll prompt me KSPROXY.AX
encountered Access Violation error.

My approach is as follows, please advise and point out my mistake, thanks.

PKSMULTIPLE_ITEM pItem;
PKSDATAFORMAT pDataRangePtr;
switch(pKsProperty->Id)
{
case KSPROPERTY_PIN_CONSTRAINEDDATARANGES:
{
ULONG ulOutputSize = IoGetCurrentIrpStackLocation(pIrp) ->

Parameters.DeviceIoControl.OutputBufferLength;

int nCount = 1;
int nMinBufferSize = sizeof(KSMULTIPLE_ITEM) +
(nCount *
(sizeof(KSDATAFORMAT)));

if(pData != NULL && ulOutputSize >= nMinBufferSize)
{
pItem = (PKSMULTIPLE_ITEM)pData;
pItem->Count = nCount;
pItem->Size = nMinBufferSize;

pDataRangePtr = (PKSDATAFORMAT)(pItem + 1);
for(i = 0; i < nCount; i++)
{
RtlCopyMemory(pDataRangePtr,
PinDefaultDataRanges[i],
sizeof(KSDATAFORMAT));
pDataRangePtr++;
}
Status = STATUS_SUCCESS;
}
else
{
pIrp->IoStatus.Information = nMinBufferSize;
Status = STATUS_BUFFER_OVERFLOW;
}
}
break;

.



Relevant Pages

  • Re: Pin To Axes
    ... Replying to myself... ... I found out that to activate the annotation matlab uses a file called ... > I saw that my annotation gets 2 new children whenever I pin it with ... Prev by Date: ...
    (comp.soft-sys.matlab)
  • Re: How to display N records from a database in some Divs? Thanks.
    ... > As far as I understand I should retrieve all the fields which ... Why not just loop your dataset and output? ... Please delete "REMOVE" from the e-mail address when replying. ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Pin To Axes
    ... Thanks for replying. ... I saw that my annotation gets 2 new children whenever I pin it with ... Prev by Date: ...
    (comp.soft-sys.matlab)
  • Re: Learning Sybase
    ... Hi Pin, ... connect with sybase and send or retrieve the data from DB. ... Prev by Date: ...
    (comp.databases.sybase)
  • Re: Learning Sybase
    ... > Hi Pin, ... > connect with sybase and send or retrieve the data from DB. ... Prev by Date: ...
    (comp.databases.sybase)