Author: janderwald
Date: Sat Dec 3 17:39:19 2011
New Revision: 54573
URL:
http://svn.reactos.org/svn/reactos?rev=54573&view=rev
Log:
[PORTCLS]
- Use parameters which have been already probed by ks
- re-enable traces for property handler bug
- see bug 6662 6663
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.cpp [iso-8859-1] Sat Dec 3
17:39:19 2011
@@ -6,6 +6,8 @@
* PROGRAMMER: Johannes Anderwald
*/
+#undef NDEBUG
+#define YDEBUG
#include "private.hpp"
NTSTATUS
@@ -91,6 +93,7 @@
// store device descriptor
KSPROPERTY_ITEM_IRP_STORAGE(Irp) = (PKSPROPERTY_ITEM)SubDeviceDescriptor;
+
// then try KsPropertyHandler
return KsPropertyHandler(Irp, PropertySetCount, PropertySet);
@@ -154,7 +157,7 @@
IoStack = IoGetCurrentIrpStackLocation(Irp);
// get input property request
- Property = (PKSPROPERTY)IoStack->Parameters.DeviceIoControl.Type3InputBuffer;
+ Property = (PKSPROPERTY)Request;
// get property set
PropertySet = (PKSPROPERTY_SET)KSPROPERTY_SET_IRP_STORAGE(Irp);
@@ -209,7 +212,7 @@
// store value size
PropertyRequest->ValueSize = ValueSize;
- PropertyRequest->Value = (ValueSize != 0 ? Irp->UserBuffer : NULL);
+ PropertyRequest->Value = Data;
// now scan the property set for the attached property set item stored in Relations
member
if (PropertySet)
@@ -273,14 +276,14 @@
if (PropertyRequest->PropertyItem &&
PropertyRequest->PropertyItem->Handler)
{
// now call the handler
- //UNICODE_STRING GuidBuffer;
- //RtlStringFromGUID(Property->Set, &GuidBuffer);
- //DPRINT("Calling Node %lu MajorTarget %p MinorTarget %p PropertySet %S
PropertyId %lu PropertyFlags %lx InstanceSize %lu ValueSize %lu Handler %p PropertyRequest
%p PropertyItemFlags %lx PropertyItemId %lu\n",
- // PropertyRequest->Node, PropertyRequest->MajorTarget,
PropertyRequest->MinorTarget, GuidBuffer.Buffer, Property->Id, Property->Flags,
PropertyRequest->InstanceSize, PropertyRequest->ValueSize,
- // PropertyRequest->PropertyItem->Handler, PropertyRequest,
PropertyRequest->PropertyItem->Flags, PropertyRequest->PropertyItem->Id);
-
+ UNICODE_STRING GuidBuffer;
+ RtlStringFromGUID(Property->Set, &GuidBuffer);
+ DPRINT1("Calling Node %lu MajorTarget %p MinorTarget %p PropertySet %S
PropertyId %lu PropertyFlags %lx InstanceSize %lu ValueSize %lu Handler %p PropertyRequest
%p PropertyItemFlags %lx PropertyItemId %lu\n",
+ PropertyRequest->Node, PropertyRequest->MajorTarget,
PropertyRequest->MinorTarget, GuidBuffer.Buffer, Property->Id, Property->Flags,
PropertyRequest->InstanceSize, PropertyRequest->ValueSize,
+ PropertyRequest->PropertyItem->Handler, PropertyRequest,
PropertyRequest->PropertyItem->Flags, PropertyRequest->PropertyItem->Id);
+ RtlFreeUnicodeString(&GuidBuffer);
Status = PropertyRequest->PropertyItem->Handler(PropertyRequest);
- //DPRINT("Status %lx ValueSize %lu Information %lu\n", Status,
PropertyRequest->ValueSize, Irp->IoStatus.Information);
+ DPRINT1("Status %lx ValueSize %lu Information %lu\n", Status,
PropertyRequest->ValueSize, Irp->IoStatus.Information);
Irp->IoStatus.Information = PropertyRequest->ValueSize;
if (Status != STATUS_PENDING)
@@ -652,7 +655,7 @@
RtlCopyMemory(Descriptor->Interfaces, InterfaceGuids, sizeof(GUID) *
InterfaceCount);
Descriptor->InterfaceCount = InterfaceCount;
- //DumpFilterDescriptor(FilterDescription);
+ DumpFilterDescriptor(FilterDescription);
// are any property sets supported by the portcls
if (FilterPropertiesCount)