diff --git a/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild b/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild
index b15f9ed89fe..24c458da344 100644
--- a/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild
+++ b/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild
@@ -33,5 +33,6 @@
miniport.c
miniport_dmus.c
miniport_fmsynth.c
+ version.c
portcls.rc
diff --git a/reactos/drivers/wdm/audio/backpln/portcls/registry.c b/reactos/drivers/wdm/audio/backpln/portcls/registry.c
index 722860153ca..3cb7342dd27 100644
--- a/reactos/drivers/wdm/audio/backpln/portcls/registry.c
+++ b/reactos/drivers/wdm/audio/backpln/portcls/registry.c
@@ -253,6 +253,22 @@ PcNewRegistryKey(
Status = ZwOpenKey(&hHandle, DesiredAccess, ObjectAttributes);
}
+ else if (RegistryKeyType == DeviceRegistryKey ||
+ RegistryKeyType == DriverRegistryKey ||
+ RegistryKeyType == HwProfileRegistryKey)
+ {
+ if (RegistryKeyType == HwProfileRegistryKey)
+ {
+ /* IoOpenDeviceRegistryKey used different constant */
+ RegistryKeyType = PLUGPLAY_REGKEY_CURRENT_HWPROFILE;
+ }
+
+ Status = IoOpenDeviceRegistryKey(DeviceObject, RegistryKeyType, DesiredAccess, &hHandle);
+ }
+ else if (RegistryKeyType == DeviceInterfaceRegistryKey)
+ {
+ /* FIXME */
+ }
if (!NT_SUCCESS(Status))
{
diff --git a/reactos/drivers/wdm/audio/backpln/portcls/version.c b/reactos/drivers/wdm/audio/backpln/portcls/version.c
new file mode 100644
index 00000000000..92ea1a9a740
--- /dev/null
+++ b/reactos/drivers/wdm/audio/backpln/portcls/version.c
@@ -0,0 +1,96 @@
+#include "private.h"
+
+
+typedef struct CResourceList
+{
+ IPortClsVersionVtbl *lpVtbl;
+ LONG ref;
+}IPortClsVersionImpl;
+
+const GUID IID_IPortClsVersion;
+
+//---------------------------------------------------------------
+// IPortClsVersion interface functions
+//
+
+NTSTATUS
+NTAPI
+IPortClsVersion_fnQueryInterface(
+ IPortClsVersion * iface,
+ IN REFIID refiid,
+ OUT PVOID* Output)
+{
+ IPortClsVersionImpl * This = (IPortClsVersionImpl*)iface;
+
+ if (IsEqualGUIDAligned(refiid, &IID_IPortClsVersion) ||
+ IsEqualGUIDAligned(refiid, &IID_IUnknown))
+ {
+ *Output = &This->lpVtbl;
+ _InterlockedIncrement(&This->ref);
+ return STATUS_SUCCESS;
+ }
+ return STATUS_UNSUCCESSFUL;
+}
+
+ULONG
+NTAPI
+IPortClsVersion_fnAddRef(
+ IPortClsVersion * iface)
+{
+ IPortClsVersionImpl * This = (IPortClsVersionImpl*)iface;
+
+ return InterlockedIncrement(&This->ref);
+}
+
+ULONG
+NTAPI
+IPortClsVersion_fnRelease(
+ IPortClsVersion * iface)
+{
+ IPortClsVersionImpl * This = (IPortClsVersionImpl*)iface;
+
+ InterlockedDecrement(&This->ref);
+
+ if (This->ref == 0)
+ {
+ ExFreePoolWithTag(This, TAG_PORTCLASS);
+ return 0;
+ }
+ /* Return new reference count */
+ return This->ref;
+}
+
+DWORD
+NTAPI
+IPortClsVersion_fnGetVersion(
+ IPortClsVersion * iface)
+{
+ return kVersionWinXP_UAAQFE;
+}
+
+static IPortClsVersionVtbl vt_PortClsVersion =
+{
+ /* IUnknown methods */
+ IPortClsVersion_fnQueryInterface,
+ IPortClsVersion_fnAddRef,
+ IPortClsVersion_fnRelease,
+ IPortClsVersion_fnGetVersion
+};
+
+NTSTATUS NewPortClsVersion(
+ OUT PPORTCLSVERSION * OutVersion)
+{
+ IPortClsVersionImpl * This = ExAllocatePoolWithTag(NonPagedPool, sizeof(IPortClsVersionImpl), TAG_PORTCLASS);
+
+ if (!This)
+ return STATUS_INSUFFICIENT_RESOURCES;
+
+ This->lpVtbl = &vt_PortClsVersion;
+ This->ref = 1;
+ *OutVersion = (PPORTCLSVERSION)&This->lpVtbl;
+
+ return STATUS_SUCCESS;
+
+}
+
+