Author: janderwald
Date: Sun Oct 11 11:49:10 2009
New Revision: 43369
URL:
http://svn.reactos.org/svn/reactos?rev=43369&view=rev
Log:
- Store KSPROPERTY_SET in Irp when using KsPropertyHandler
- Fix a bug in KsPinDataIntersection
Modified:
trunk/reactos/drivers/ksfilter/ks/connectivity.c
trunk/reactos/drivers/ksfilter/ks/misc.c
trunk/reactos/drivers/ksfilter/ks/property.c
Modified: trunk/reactos/drivers/ksfilter/ks/connectivity.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/connec…
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/connectivity.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/ksfilter/ks/connectivity.c [iso-8859-1] Sun Oct 11 11:49:10
2009
@@ -291,7 +291,7 @@
IoStack = IoGetCurrentIrpStackLocation(Irp);
Buffer = Irp->UserBuffer;
- DPRINT("KsPinPropertyHandler Irp %p Property %p Data %p DescriptorsCount %u
Descriptor %p OutputLength %u Id %x\n", Irp, Property, Data, DescriptorsCount,
Descriptor, IoStack->Parameters.DeviceIoControl.OutputBufferLength, Property->Id);
+ DPRINT("KsPinPropertyHandler Irp %p Property %p Data %p DescriptorsCount %u
Descriptor %p OutputLength %u Id %u\n", Irp, Property, Data, DescriptorsCount,
Descriptor, IoStack->Parameters.DeviceIoControl.OutputBufferLength, Property->Id);
switch(Property->Id)
{
@@ -585,6 +585,24 @@
}
/*
+ @unimplemented
+*/
+KSDDKAPI NTSTATUS NTAPI
+KsPinDataIntersectionEx(
+ IN PIRP Irp,
+ IN PKSP_PIN Pin,
+ OUT PVOID Data,
+ IN ULONG DescriptorsCount,
+ IN const KSPIN_DESCRIPTOR* Descriptor,
+ IN ULONG DescriptorSize,
+ IN PFNKSINTERSECTHANDLEREX IntersectHandler OPTIONAL,
+ IN PVOID HandlerContext OPTIONAL)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
@implemented
*/
KSDDKAPI
@@ -627,7 +645,7 @@
}
/* get start item */
- Item = (KSMULTIPLE_ITEM*)IoStack->Parameters.DeviceIoControl.Type3InputBuffer;
+ Item = (KSMULTIPLE_ITEM*)(Pin + 1);
/* get first data range */
DataRange = (KSDATARANGE*)(Item + 1);
/* iterate through all data ranges */
Modified: trunk/reactos/drivers/ksfilter/ks/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/misc.c…
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/misc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/ksfilter/ks/misc.c [iso-8859-1] Sun Oct 11 11:49:10 2009
@@ -81,25 +81,6 @@
return Status;
}
-/*
- @unimplemented
-*/
-KSDDKAPI NTSTATUS NTAPI
-KsPinDataIntersectionEx(
- IN PIRP Irp,
- IN PKSP_PIN Pin,
- OUT PVOID Data,
- IN ULONG DescriptorsCount,
- IN const KSPIN_DESCRIPTOR* Descriptor,
- IN ULONG DescriptorSize,
- IN PFNKSINTERSECTHANDLEREX IntersectHandler OPTIONAL,
- IN PVOID HandlerContext OPTIONAL)
-{
- UNIMPLEMENTED;
- return STATUS_UNSUCCESSFUL;
-}
-
-
NTSTATUS
KspCopyCreateRequest(
IN PIRP Irp,
Modified: trunk/reactos/drivers/ksfilter/ks/property.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/proper…
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/property.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/ksfilter/ks/property.c [iso-8859-1] Sun Oct 11 11:49:10 2009
@@ -18,7 +18,8 @@
IN ULONG InputBufferLength,
IN ULONG OutputBufferLength,
OUT PVOID OutputBuffer,
- OUT PFNKSHANDLER *PropertyHandler)
+ OUT PFNKSHANDLER *PropertyHandler,
+ OUT PKSPROPERTY_SET * Set)
{
ULONG Index, ItemIndex;
//PULONG Flags;
@@ -93,6 +94,7 @@
if (Property->Flags & KSPROPERTY_TYPE_GET)
*PropertyHandler =
PropertySet[Index].PropertyItem[ItemIndex].GetPropertyHandler;
+ *Set = (PKSPROPERTY_SET)&PropertySet[Index];
return STATUS_SUCCESS;
}
}
@@ -111,6 +113,7 @@
IN ULONG PropertyItemSize OPTIONAL)
{
PKSPROPERTY Property;
+ PKSPROPERTY_SET Set;
PIO_STACK_LOCATION IoStack;
NTSTATUS Status;
PFNKSHANDLER PropertyHandler = NULL;
@@ -139,11 +142,12 @@
ASSERT(PropertyItemSize == 0 || PropertyItemSize == sizeof(KSPROPERTY_ITEM));
/* find the property handler */
- Status = FindPropertyHandler(&Irp->IoStatus, PropertySet, PropertySetsCount,
Property, IoStack->Parameters.DeviceIoControl.InputBufferLength,
IoStack->Parameters.DeviceIoControl.OutputBufferLength, Irp->UserBuffer,
&PropertyHandler);
+ Status = FindPropertyHandler(&Irp->IoStatus, PropertySet, PropertySetsCount,
Property, IoStack->Parameters.DeviceIoControl.InputBufferLength,
IoStack->Parameters.DeviceIoControl.OutputBufferLength, Irp->UserBuffer,
&PropertyHandler, &Set);
if (NT_SUCCESS(Status) && PropertyHandler)
{
/* call property handler */
+ KSPROPERTY_SET_IRP_STORAGE(Irp) = Set;
Status = PropertyHandler(Irp, Property, Irp->UserBuffer);
if (Status == STATUS_BUFFER_TOO_SMALL)