[PORTCLS]
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Sun, 11 Dec 2011 10:51:37 +0000 (10:51 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Sun, 11 Dec 2011 10:51:37 +0000 (10:51 +0000)
- Add support for IDrmPort, IDrmPort2
- more debug traces

svn path=/trunk/; revision=54640

reactos/drivers/wdm/audio/backpln/portcls/connection.cpp
reactos/drivers/wdm/audio/backpln/portcls/interrupt.cpp
reactos/drivers/wdm/audio/backpln/portcls/port_topology.cpp
reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp
reactos/drivers/wdm/audio/backpln/portcls/power.cpp
reactos/drivers/wdm/audio/backpln/portcls/registry.cpp
reactos/drivers/wdm/audio/backpln/portcls/resource.cpp
reactos/drivers/wdm/audio/backpln/portcls/service_group.cpp
reactos/drivers/wdm/audio/backpln/portcls/unregister.cpp
reactos/drivers/wdm/audio/backpln/portcls/version.cpp

index b2ce12d..5456c94 100644 (file)
@@ -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;
 }
 
index 30d7856..ffb0fa9 100644 (file)
@@ -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;
 }
 
index d1040aa..36e094d 100644 (file)
@@ -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;
index 3262b5f..b7e99b3 100644 (file)
@@ -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);
     }
 
index ba8276b..2aaf72d 100644 (file)
@@ -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;
     }
index 86c2d3f..9b40602 100644 (file)
@@ -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;
 }
 
index 181ca10..fc6bc6c 100644 (file)
@@ -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);
     }
 
index 3a17fae..c74022c 100644 (file)
@@ -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);
     }
 
index 8f0922e..2d7c6a4 100644 (file)
@@ -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;
 }
 
index 6378e49..2f0ccf1 100644 (file)
@@ -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;
 }