Author: janderwald
Date: Sat Oct 23 12:00:11 2010
New Revision: 49237
URL:
http://svn.reactos.org/svn/reactos?rev=49237&view=rev
Log:
[KS]
- Fix property set support handler for topology nodes
- Check if the driver supports a basic support handler. In that case return the basic
support handler
Modified:
trunk/reactos/drivers/ksfilter/ks/property.c
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] Sat Oct 23 12:00:11 2010
@@ -47,6 +47,25 @@
IoStatus->Information =
PropertySet[Index].PropertyItem[ItemIndex].MinData;
return STATUS_MORE_ENTRIES;
}
+
+ /* store property set */
+ *Set = (PKSPROPERTY_SET)&PropertySet[Index];
+
+ if (Property->Flags & KSPROPERTY_TYPE_SET)
+ {
+ /* store property handler */
+ *PropertyHandler =
PropertySet[Index].PropertyItem[ItemIndex].SetPropertyHandler;
+ return STATUS_SUCCESS;
+ }
+
+ if (Property->Flags & KSPROPERTY_TYPE_GET)
+ {
+ /* store property handler */
+ *PropertyHandler =
PropertySet[Index].PropertyItem[ItemIndex].GetPropertyHandler;
+ return STATUS_SUCCESS;
+ }
+
+
if (Property->Flags & KSPROPERTY_TYPE_BASICSUPPORT)
{
PULONG Flags;
@@ -64,13 +83,20 @@
/* clear flags */
*Flags = 0;
+ IoStatus->Information = sizeof(ULONG);
+
+ if (PropertySet[Index].PropertyItem[ItemIndex].SupportHandler)
+ {
+ /* use support handler from driver */
+ *PropertyHandler =
PropertySet[Index].PropertyItem[ItemIndex].SupportHandler;
+ return STATUS_SUCCESS;
+ }
+
if (PropertySet[Index].PropertyItem[ItemIndex].GetSupported)
*Flags |= KSPROPERTY_TYPE_GET;
if (PropertySet[Index].PropertyItem[ItemIndex].SetSupported)
*Flags |= KSPROPERTY_TYPE_SET;
-
- IoStatus->Information = sizeof(ULONG);
if (OutputBufferLength >= sizeof(KSPROPERTY_DESCRIPTION))
{
@@ -89,14 +115,6 @@
}
return STATUS_SUCCESS;
}
- if (Property->Flags & KSPROPERTY_TYPE_SET)
- *PropertyHandler =
PropertySet[Index].PropertyItem[ItemIndex].SetPropertyHandler;
-
- if (Property->Flags & KSPROPERTY_TYPE_GET)
- *PropertyHandler =
PropertySet[Index].PropertyItem[ItemIndex].GetPropertyHandler;
-
- *Set = (PKSPROPERTY_SET)&PropertySet[Index];
- return STATUS_SUCCESS;
}
}
}
@@ -171,7 +189,7 @@
}
}
}
- else if (IsEqualGUIDAligned(&Property->Set, &GUID_NULL) &&
Property->Id == 0 && Property->Flags == KSPROPERTY_TYPE_SETSUPPORT)
+ else if (IsEqualGUIDAligned(&Property->Set, &GUID_NULL) &&
Property->Id == 0 && (Property->Flags & KSPROPERTY_TYPE_SETSUPPORT) ==
KSPROPERTY_TYPE_SETSUPPORT)
{
// store output size
Irp->IoStatus.Information = sizeof(GUID) * PropertySetsCount;
@@ -189,7 +207,7 @@
{
RtlMoveMemory(&Guid[Index], PropertySet[Index].Set, sizeof(GUID));
}
- return STATUS_SUCCESS;
+ Status = STATUS_SUCCESS;
}
/* done */