From be38b5da3bfd918fa55d708d8fe4e7f3c6cf90f7 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sun, 11 Dec 2011 10:51:37 +0000 Subject: [PATCH] [PORTCLS] - Add support for IDrmPort, IDrmPort2 - more debug traces svn path=/trunk/; revision=54640 --- .../wdm/audio/backpln/portcls/connection.cpp | 8 ++++++++ .../wdm/audio/backpln/portcls/interrupt.cpp | 10 +++++++++- .../wdm/audio/backpln/portcls/port_topology.cpp | 15 ++++++++++----- .../wdm/audio/backpln/portcls/port_wavecyclic.cpp | 2 +- .../drivers/wdm/audio/backpln/portcls/power.cpp | 2 +- .../wdm/audio/backpln/portcls/registry.cpp | 9 ++++++++- .../wdm/audio/backpln/portcls/resource.cpp | 2 +- .../wdm/audio/backpln/portcls/service_group.cpp | 2 +- .../wdm/audio/backpln/portcls/unregister.cpp | 8 ++++++++ .../drivers/wdm/audio/backpln/portcls/version.cpp | 9 +++++++++ 10 files changed, 56 insertions(+), 11 deletions(-) diff --git a/reactos/drivers/wdm/audio/backpln/portcls/connection.cpp b/reactos/drivers/wdm/audio/backpln/portcls/connection.cpp index b2ce12df612..5456c94ffa1 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/connection.cpp +++ b/reactos/drivers/wdm/audio/backpln/portcls/connection.cpp @@ -58,6 +58,8 @@ CUnregisterPhysicalConnection::QueryInterface( IN REFIID refiid, OUT PVOID* Output) { + UNICODE_STRING GuidString; + if (IsEqualGUIDAligned(refiid, IID_IUnregisterPhysicalConnection) || IsEqualGUIDAligned(refiid, IID_IUnknown)) { @@ -67,6 +69,12 @@ CUnregisterPhysicalConnection::QueryInterface( return STATUS_SUCCESS; } + if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) + { + DPRINT1("CUnregisterPhysicalConnection::QueryInterface no interface!!! iface %S\n", GuidString.Buffer); + RtlFreeUnicodeString(&GuidString); + } + return STATUS_UNSUCCESSFUL; } diff --git a/reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp b/reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp index 30d78568550..ffb0fa9e49a 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp +++ b/reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp @@ -73,6 +73,8 @@ CInterruptSync::QueryInterface( IN REFIID refiid, OUT PVOID* Output) { + UNICODE_STRING GuidString; + DPRINT("CInterruptSync::QueryInterface: this %p\n", this); if (IsEqualGUIDAligned(refiid, IID_IInterruptSync) || @@ -83,7 +85,13 @@ CInterruptSync::QueryInterface( return STATUS_SUCCESS; } - DPRINT("CInterruptSync::QueryInterface: this %p UNKNOWN interface requested\n", this); + + if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) + { + DPRINT1("CInterruptSync::QueryInterface: no interface!!! iface %S\n", GuidString.Buffer); + RtlFreeUnicodeString(&GuidString); + } + return STATUS_UNSUCCESSFUL; } diff --git a/reactos/drivers/wdm/audio/backpln/portcls/port_topology.cpp b/reactos/drivers/wdm/audio/backpln/portcls/port_topology.cpp index d1040aa9c60..36e094db109 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/port_topology.cpp +++ b/reactos/drivers/wdm/audio/backpln/portcls/port_topology.cpp @@ -137,15 +137,15 @@ CPortTopology::QueryInterface( PUNKNOWN(*Output)->AddRef(); return STATUS_SUCCESS; } - else if (IsEqualGUIDAligned(refiid, IID_ISubdevice)) + else if (IsEqualGUIDAligned(refiid, IID_IPortEvents)) { - *Output = PVOID(PSUBDEVICE(this)); + *Output = PVOID(PPORTEVENTS(this)); PUNKNOWN(*Output)->AddRef(); return STATUS_SUCCESS; } - else if (IsEqualGUIDAligned(refiid, IID_IPortEvents)) + else if (IsEqualGUIDAligned(refiid, IID_ISubdevice)) { - *Output = PVOID(PPORTEVENTS(this)); + *Output = PVOID(PSUBDEVICE(this)); PUNKNOWN(*Output)->AddRef(); return STATUS_SUCCESS; } @@ -153,6 +153,11 @@ CPortTopology::QueryInterface( { return NewPortClsVersion((PPORTCLSVERSION*)Output); } + else if (IsEqualGUIDAligned(refiid, IID_IDrmPort) || + IsEqualGUIDAligned(refiid, IID_IDrmPort2)) + { + return NewIDrmPort((PDRMPORT2*)Output); + } else if (IsEqualGUIDAligned(refiid, IID_IUnregisterSubdevice)) { return NewIUnregisterSubdevice((PUNREGISTERSUBDEVICE*)Output); @@ -164,7 +169,7 @@ CPortTopology::QueryInterface( if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) { - DPRINT("IPortTopology_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer); + DPRINT1("IPortTopology_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer); RtlFreeUnicodeString(&GuidString); } return STATUS_UNSUCCESSFUL; diff --git a/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp b/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp index 3262b5f64b0..b7e99b35a85 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp +++ b/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp @@ -179,7 +179,7 @@ CPortWaveCyclic::QueryInterface( if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) { - DPRINT("IPortWaveCyclic_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer); + DPRINT1("IPortWaveCyclic_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer); RtlFreeUnicodeString(&GuidString); } diff --git a/reactos/drivers/wdm/audio/backpln/portcls/power.cpp b/reactos/drivers/wdm/audio/backpln/portcls/power.cpp index ba8276b207d..2aaf72db4d2 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/power.cpp +++ b/reactos/drivers/wdm/audio/backpln/portcls/power.cpp @@ -32,7 +32,7 @@ PcRegisterAdapterPowerManagement( Status = pUnknown->QueryInterface(IID_IAdapterPowerManagement, (PVOID*)&pPower); if (!NT_SUCCESS(Status)) { - DPRINT("PcRegisterAdapterPowerManagement no IAdapterPowerManagement interface %x\n", Status); + DPRINT1("PcRegisterAdapterPowerManagement no IAdapterPowerManagement interface %x\n", Status); DeviceExt->AdapterPowerManagement = NULL; return STATUS_SUCCESS; } diff --git a/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp b/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp index 86c2d3f8784..9b406022611 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp +++ b/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp @@ -54,6 +54,8 @@ CRegistryKey::QueryInterface( IN REFIID refiid, OUT PVOID* Output) { + UNICODE_STRING GuidString; + DPRINT("CRegistryKey::QueryInterface entered\n"); if (IsEqualGUIDAligned(refiid, IID_IRegistryKey) || IsEqualGUIDAligned(refiid, IID_IUnknown)) @@ -63,7 +65,12 @@ CRegistryKey::QueryInterface( return STATUS_SUCCESS; } - DPRINT("IRegistryKey_QueryInterface: This %p\n", this); + if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) + { + DPRINT1("CRegistryKey::QueryInterface no interface!!! iface %S\n", GuidString.Buffer); + RtlFreeUnicodeString(&GuidString); + } + return STATUS_UNSUCCESSFUL; } diff --git a/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp b/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp index 181ca10d862..fc6bc6c550b 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp +++ b/reactos/drivers/wdm/audio/backpln/portcls/resource.cpp @@ -69,7 +69,7 @@ CResourceList::QueryInterface( if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) { - DPRINT("IResourceList_QueryInterface no interface!!! iface %S\n", GuidString.Buffer); + DPRINT1("IResourceList_QueryInterface no interface!!! iface %S\n", GuidString.Buffer); RtlFreeUnicodeString(&GuidString); } diff --git a/reactos/drivers/wdm/audio/backpln/portcls/service_group.cpp b/reactos/drivers/wdm/audio/backpln/portcls/service_group.cpp index 3a17faeec85..c74022c8d07 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/service_group.cpp +++ b/reactos/drivers/wdm/audio/backpln/portcls/service_group.cpp @@ -91,7 +91,7 @@ CServiceGroup::QueryInterface( if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) { - DPRINT("CServiceGroup::QueryInterface no interface!!! iface %S\n", GuidString.Buffer); + DPRINT1("CServiceGroup::QueryInterface no interface!!! iface %S\n", GuidString.Buffer); RtlFreeUnicodeString(&GuidString); } diff --git a/reactos/drivers/wdm/audio/backpln/portcls/unregister.cpp b/reactos/drivers/wdm/audio/backpln/portcls/unregister.cpp index 8f0922e019f..2d7c6a4816b 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/unregister.cpp +++ b/reactos/drivers/wdm/audio/backpln/portcls/unregister.cpp @@ -47,6 +47,8 @@ CUnregisterSubdevice::QueryInterface( IN REFIID refiid, OUT PVOID* Output) { + UNICODE_STRING GuidString; + if (IsEqualGUIDAligned(refiid, IID_IUnregisterSubdevice) || IsEqualGUIDAligned(refiid, IID_IUnknown)) { @@ -55,6 +57,12 @@ CUnregisterSubdevice::QueryInterface( return STATUS_SUCCESS; } + if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) + { + DPRINT1("IPortWaveCyclic_fnQueryInterface no interface!!! iface %S\n", GuidString.Buffer); + RtlFreeUnicodeString(&GuidString); + } + return STATUS_UNSUCCESSFUL; } diff --git a/reactos/drivers/wdm/audio/backpln/portcls/version.cpp b/reactos/drivers/wdm/audio/backpln/portcls/version.cpp index 6378e4944c2..2f0ccf14aad 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/version.cpp +++ b/reactos/drivers/wdm/audio/backpln/portcls/version.cpp @@ -60,6 +60,8 @@ CPortClsVersion::QueryInterface( IN REFIID refiid, OUT PVOID* Output) { + UNICODE_STRING GuidString; + if (IsEqualGUIDAligned(refiid, IID_IPortClsVersion) || IsEqualGUIDAligned(refiid, IID_IUnknown)) { @@ -67,6 +69,13 @@ CPortClsVersion::QueryInterface( PUNKNOWN(*Output)->AddRef(); return STATUS_SUCCESS; } + + if (RtlStringFromGUID(refiid, &GuidString) == STATUS_SUCCESS) + { + DPRINT1("CPortClsVersion::QueryInterface no interface!!! iface %S\n", GuidString.Buffer); + RtlFreeUnicodeString(&GuidString); + } + return STATUS_UNSUCCESSFUL; } -- 2.17.1