Author: janderwald
Date: Wed Feb 18 12:00:08 2009
New Revision: 39665
URL:
http://svn.reactos.org/svn/reactos?rev=39665&view=rev
Log:
- Set DEVICE_DESCRIPTION to version1
- Fix interface definition of ISubDevice
- Add missing Init function for IPortFilterWaveCyclic and call it from IPortWaveCyclic
- Add GUIDs for property set of Pin and Topology
- Remove DISPATCH_TABLE from IPortTopology
- Rewrite PcCreateItemDispatch to support pin creation requests
- Add Property handler to IPortWaveCyclic (not yet used)
- Make IPortFilterWaveCyclic singleton
- Implement Adding property handlers to SUBDEVICE_DESCRIPTOR
Added:
trunk/reactos/drivers/wdm/audio/backpln/portcls/dispatcher.c (with props)
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/api.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/drm_port.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/guids.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h
trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/port_midi.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild
trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h
trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.c
trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.c
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/api.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/api.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/api.c [iso-8859-1] Wed Feb 18 12:00:08
2009
@@ -95,6 +95,7 @@
RtlZeroMemory(DeviceDescription, sizeof(DEVICE_DESCRIPTION));
DeviceDescription->Master = TRUE;
+ DeviceDescription->Version = DEVICE_DESCRIPTION_VERSION1;
DeviceDescription->ScatterGather= ScatterGather;
DeviceDescription->Dma32BitAddresses = Dma32BitAddresses;
DeviceDescription->IgnoreCount = IgnoreCount;
@@ -124,6 +125,7 @@
RtlZeroMemory(DeviceDescription, sizeof(DEVICE_DESCRIPTION));
+ DeviceDescription->Version = DEVICE_DESCRIPTION_VERSION1;
DeviceDescription->DemandMode = DemandMode;
DeviceDescription->AutoInitialize = AutoInitialize;
DeviceDescription->DmaSpeed = DmaSpeed;
@@ -132,3 +134,4 @@
return STATUS_SUCCESS;
}
+
Added: trunk/reactos/drivers/wdm/audio/backpln/portcls/dispatcher.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/dispatcher.c (added)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/dispatcher.c [iso-8859-1] Wed Feb 18
12:00:08 2009
@@ -1,0 +1,258 @@
+#include "private.h"
+
+NTSTATUS
+NTAPI
+Dispatch_fnDeviceIoControl(
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp)
+{
+ PIO_STACK_LOCATION IoStack;
+ IIrpTarget * IrpTarget;
+ PKSOBJECT_CREATE_ITEM CreateItem;
+
+ DPRINT1("Dispatch_fnDeviceIoControl called DeviceObject %p Irp %p\n",
DeviceObject);
+
+ /* access the create item */
+ CreateItem = KSCREATE_ITEM_IRP_STORAGE(Irp);
+
+ IoStack = IoGetCurrentIrpStackLocation(Irp);
+ ASSERT(IoStack->FileObject);
+
+ IrpTarget = (IIrpTarget*)CreateItem->Context;
+
+ return IrpTarget->lpVtbl->DeviceIoControl(IrpTarget, DeviceObject, Irp);
+}
+
+NTSTATUS
+NTAPI
+Dispatch_fnRead(
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp)
+{
+ PIO_STACK_LOCATION IoStack;
+ IIrpTarget * IrpTarget;
+ PKSOBJECT_CREATE_ITEM CreateItem;
+
+ DPRINT1("Dispatch_fnRead called DeviceObject %p Irp %p\n", DeviceObject);
+
+ /* access the create item */
+ CreateItem = KSCREATE_ITEM_IRP_STORAGE(Irp);
+
+ IoStack = IoGetCurrentIrpStackLocation(Irp);
+ ASSERT(IoStack->FileObject);
+
+ IrpTarget = (IIrpTarget*)CreateItem->Context;
+
+ return IrpTarget->lpVtbl->Read(IrpTarget, DeviceObject, Irp);
+}
+
+NTSTATUS
+NTAPI
+Dispatch_fnWrite(
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp)
+{
+ PIO_STACK_LOCATION IoStack;
+ IIrpTarget * IrpTarget;
+ PKSOBJECT_CREATE_ITEM CreateItem;
+
+ DPRINT1("Dispatch_fnWrite called DeviceObject %p Irp %p\n", DeviceObject);
+
+ /* access the create item */
+ CreateItem = KSCREATE_ITEM_IRP_STORAGE(Irp);
+
+ IoStack = IoGetCurrentIrpStackLocation(Irp);
+ ASSERT(IoStack->FileObject);
+
+ IrpTarget = (IIrpTarget*)CreateItem->Context;
+
+ return IrpTarget->lpVtbl->Write(IrpTarget, DeviceObject, Irp);
+}
+
+NTSTATUS
+NTAPI
+Dispatch_fnFlush(
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp)
+{
+ PIO_STACK_LOCATION IoStack;
+ IIrpTarget * IrpTarget;
+ PKSOBJECT_CREATE_ITEM CreateItem;
+
+ DPRINT1("Dispatch_fnFlush called DeviceObject %p Irp %p\n", DeviceObject);
+
+ /* access the create item */
+ CreateItem = KSCREATE_ITEM_IRP_STORAGE(Irp);
+
+ IoStack = IoGetCurrentIrpStackLocation(Irp);
+ ASSERT(IoStack->FileObject);
+
+ IrpTarget = (IIrpTarget*)CreateItem->Context;
+
+ return IrpTarget->lpVtbl->Flush(IrpTarget, DeviceObject, Irp);
+}
+
+NTSTATUS
+NTAPI
+Dispatch_fnClose(
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp)
+{
+ PIO_STACK_LOCATION IoStack;
+ IIrpTarget * IrpTarget;
+ PKSOBJECT_CREATE_ITEM CreateItem;
+
+ DPRINT1("Dispatch_fnClose called DeviceObject %p Irp %p\n", DeviceObject);
+
+ /* access the create item */
+ CreateItem = KSCREATE_ITEM_IRP_STORAGE(Irp);
+ ASSERT(CreateItem != NULL);
+
+ IoStack = IoGetCurrentIrpStackLocation(Irp);
+ ASSERT(IoStack != NULL);
+ ASSERT(IoStack->FileObject != NULL);
+
+ IrpTarget = (IIrpTarget*)CreateItem->Context;
+
+ DPRINT1("IrpTarget %p\n", IrpTarget);
+
+ return IrpTarget->lpVtbl->Close(IrpTarget, DeviceObject, Irp);
+}
+
+NTSTATUS
+NTAPI
+Dispatch_fnQuerySecurity(
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp)
+{
+ PIO_STACK_LOCATION IoStack;
+ IIrpTarget * IrpTarget;
+ PKSOBJECT_CREATE_ITEM CreateItem;
+
+ DPRINT1("Dispatch_fnQuerySecurity called DeviceObject %p Irp %p\n",
DeviceObject);
+
+ /* access the create item */
+ CreateItem = KSCREATE_ITEM_IRP_STORAGE(Irp);
+
+ IoStack = IoGetCurrentIrpStackLocation(Irp);
+ ASSERT(IoStack->FileObject);
+
+ IrpTarget = (IIrpTarget*)CreateItem->Context;
+
+ return IrpTarget->lpVtbl->QuerySecurity(IrpTarget, DeviceObject, Irp);
+}
+
+NTSTATUS
+NTAPI
+Dispatch_fnSetSecurity(
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp)
+{
+ PIO_STACK_LOCATION IoStack;
+ IIrpTarget * IrpTarget;
+ PKSOBJECT_CREATE_ITEM CreateItem;
+
+ DPRINT1("Dispatch_fnSetSecurity called DeviceObject %p Irp %p\n",
DeviceObject);
+
+ /* access the create item */
+ CreateItem = KSCREATE_ITEM_IRP_STORAGE(Irp);
+
+ IoStack = IoGetCurrentIrpStackLocation(Irp);
+ ASSERT(IoStack->FileObject);
+
+ IrpTarget = (IIrpTarget*)CreateItem->Context;
+
+ return IrpTarget->lpVtbl->SetSecurity(IrpTarget, DeviceObject, Irp);
+}
+
+BOOLEAN
+NTAPI
+Dispatch_fnFastDeviceIoControl(
+ PFILE_OBJECT FileObject,
+ BOOLEAN Wait,
+ PVOID InputBuffer,
+ ULONG InputBufferLength,
+ PVOID OutputBuffer,
+ ULONG OutputBufferLength,
+ ULONG IoControlCode,
+ PIO_STATUS_BLOCK IoStatus,
+ PDEVICE_OBJECT DeviceObject)
+{
+ DPRINT1("Dispatch_fnFastDeviceIoControl called DeviceObject %p Irp %p\n",
DeviceObject);
+
+
+ return FALSE;
+}
+
+
+BOOLEAN
+NTAPI
+Dispatch_fnFastRead(
+ PFILE_OBJECT FileObject,
+ PLARGE_INTEGER FileOffset,
+ ULONG Length,
+ BOOLEAN Wait,
+ ULONG LockKey,
+ PVOID Buffer,
+ PIO_STATUS_BLOCK IoStatus,
+ PDEVICE_OBJECT DeviceObject)
+{
+ DPRINT1("Dispatch_fnFastRead called DeviceObject %p Irp %p\n",
DeviceObject);
+
+ return FALSE;
+
+}
+
+BOOLEAN
+NTAPI
+Dispatch_fnFastWrite(
+ PFILE_OBJECT FileObject,
+ PLARGE_INTEGER FileOffset,
+ ULONG Length,
+ BOOLEAN Wait,
+ ULONG LockKey,
+ PVOID Buffer,
+ PIO_STATUS_BLOCK IoStatus,
+ PDEVICE_OBJECT DeviceObject)
+{
+ DPRINT1("Dispatch_fnFastWrite called DeviceObject %p Irp %p\n",
DeviceObject);
+
+ return FALSE;
+}
+
+static KSDISPATCH_TABLE DispatchTable =
+{
+ Dispatch_fnDeviceIoControl,
+ Dispatch_fnRead,
+ Dispatch_fnWrite,
+ Dispatch_fnFlush,
+ Dispatch_fnClose,
+ Dispatch_fnQuerySecurity,
+ Dispatch_fnSetSecurity,
+ Dispatch_fnFastDeviceIoControl,
+ Dispatch_fnFastRead,
+ Dispatch_fnFastWrite,
+};
+
+
+NTSTATUS
+NTAPI
+NewDispatchObject(
+ IN PIRP Irp,
+ IN IIrpTarget * Target)
+{
+ NTSTATUS Status;
+ KSOBJECT_HEADER ObjectHeader;
+ PKSOBJECT_CREATE_ITEM CreateItem;
+
+ CreateItem = AllocateItem(NonPagedPool, sizeof(KSOBJECT_CREATE_ITEM),
TAG_PORTCLASS);
+ if (!CreateItem)
+ return STATUS_INSUFFICIENT_RESOURCES;
+
+ CreateItem->Context = (PVOID)Target;
+
+ Status = KsAllocateObjectHeader(&ObjectHeader, 1, CreateItem, Irp,
&DispatchTable);
+ DPRINT1("KsAllocateObjectHeader result %x\n", Status);
+ return Status;
+}
+
Propchange: trunk/reactos/drivers/wdm/audio/backpln/portcls/dispatcher.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/drm_port.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/drm_port.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/drm_port.c [iso-8859-1] Wed Feb 18
12:00:08 2009
@@ -1,7 +1,4 @@
#include "private.h"
-
-
-
typedef struct
{
@@ -46,6 +43,7 @@
IN REFIID refiid,
OUT PVOID* Output)
{
+ WCHAR Buffer[100];
IDrmPort2Impl * This = (IDrmPort2Impl*)iface;
if (IsEqualGUIDAligned(refiid, &IID_IDrmPort) ||
@@ -57,7 +55,9 @@
return STATUS_SUCCESS;
}
- DPRINT("IDrmPort2_QueryInterface: This %p unknown iid\n", This,
This->ref);
+ StringFromCLSID(refiid, Buffer);
+ DPRINT1("IDrmPort2_QueryInterface no interface!!! iface %S\n", Buffer);
+ KeBugCheckEx(0, 0, 0, 0, 0);
return STATUS_UNSUCCESSFUL;
}
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.c [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/filter_wavecyclic.c [iso-8859-1] Wed
Feb 18 12:00:08 2009
@@ -79,7 +79,7 @@
IN WCHAR * Name,
IN PUNKNOWN Unknown,
IN POOL_TYPE PoolType,
- IN PDEVICE_OBJECT * DeviceObject,
+ IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN KSOBJECT_CREATE *CreateObject)
{
@@ -281,6 +281,26 @@
OUT PIO_STATUS_BLOCK StatusBlock,
IN PDEVICE_OBJECT DeviceObject)
{
+ return STATUS_SUCCESS;
+}
+
+/*
+ * @implemented
+ */
+static
+NTSTATUS
+NTAPI
+IPortFilterWaveCyclic_fnInit(
+ IN IPortFilterWaveCyclic* iface,
+ IN IPortWaveCyclic* Port)
+{
+ IPortFilterWaveCyclicImpl * This = (IPortFilterWaveCyclicImpl*)iface;
+
+ This->Port = Port;
+
+ /* increment reference count */
+ iface->lpVtbl->AddRef(iface);
+
return STATUS_SUCCESS;
}
@@ -299,13 +319,13 @@
IPortFilterWaveCyclic_fnSetSecurity,
IPortFilterWaveCyclic_fnFastDeviceIoControl,
IPortFilterWaveCyclic_fnFastRead,
- IPortFilterWaveCyclic_fnFastWrite
+ IPortFilterWaveCyclic_fnFastWrite,
+ IPortFilterWaveCyclic_fnInit
};
-
-NTSTATUS NewPortFilterWaveCyclic(
- OUT IPortFilterWaveCyclic ** OutFilter,
- IN IPortWaveCyclic* iface)
+NTSTATUS
+NewPortFilterWaveCyclic(
+ OUT IPortFilterWaveCyclic ** OutFilter)
{
IPortFilterWaveCyclicImpl * This;
@@ -316,10 +336,6 @@
/* initialize IPortFilterWaveCyclic */
This->ref = 1;
This->lpVtbl = &vt_IPortFilterWaveCyclic;
- This->Port = iface;
-
- /* increment reference count */
- iface->lpVtbl->AddRef(iface);
/* return result */
*OutFilter = (IPortFilterWaveCyclic*)&This->lpVtbl;
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/guids.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/guids.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/guids.c [iso-8859-1] Wed Feb 18
12:00:08 2009
@@ -43,6 +43,9 @@
const GUID IID_IUnknown = {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0xC0, 0x00, 0x00,
0x00, 0x00, 0x46}};
const GUID IID_IPortEvents = {0xA80F29C4L, 0x5498, 0x11D2, {0x95, 0xD9, 0x00, 0xC0, 0x4F,
0xB9, 0x25, 0xD3}};
+const GUID KSNAME_PIN = {0x146F1A80, 0x4791, 0x11D0, {0xA5, 0xD6, 0x28, 0xDB,
0x04, 0xC1, 0x00, 0x00}};
+
+
//FIXME
//
const GUID KS_CATEGORY_AUDIO = {0x6994AD04, 0x93EF, 0x11D0, {0xA3, 0xCC, 0x00, 0xA0,
0xC9, 0x22, 0x31, 0x96}};
@@ -52,9 +55,11 @@
const GUID KSDATAFORMAT_TYPE_AUDIO = {0x73647561L, 0x0000, 0x0010, {0x80,
0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
-const GUID KSDATAFORMAT_SUBTYPE_PCM = {0x00000001, 0x0000, 0x0010, {0x80,
0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
+const GUID KSDATAFORMAT_SUBTYPE_PCM = {0x00000001, 0x0000, 0x0010, {0x80,
0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
const GUID KSDATAFORMAT_SPECIFIER_WAVEFORMATEX = {0x05589f81L, 0xc356, 0x11ce, {0xbf,
0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}};
+const GUID KSPROPSETID_Topology = {0x720D4AC0L, 0x7533, 0x11D0, {0xA5,
0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
+const GUID KSPROPSETID_Pin = {0x8C134960L, 0x51AD, 0x11CF, {0x87,
0x8A, 0x94, 0xF8, 0x01, 0xC1, 0x00, 0x00}};
///
/// undocumented guids
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/interfaces.h [iso-8859-1] Wed Feb 18
12:00:08 2009
@@ -17,7 +17,7 @@
IN WCHAR * Name, \
IN PUNKNOWN Unknown, \
IN POOL_TYPE PoolType, \
- IN PDEVICE_OBJECT * DeviceObject, \
+ IN PDEVICE_OBJECT DeviceObject, \
IN PIRP Irp, \
IN KSOBJECT_CREATE *CreateObject) PURE; \
\
@@ -106,9 +106,17 @@
typedef struct
{
+ ULONG MaxKsPropertySetCount;
+ ULONG FreeKsPropertySetOffset;
+ PKSPROPERTY_SET Properties;
+}KSPROPERTY_SET_LIST;
+
+typedef struct
+{
ULONG InterfaceCount;
GUID *Interfaces;
KSPIN_FACTORY Factory;
+ KSPROPERTY_SET_LIST FilterPropertySet;
}SUBDEVICE_DESCRIPTOR, *PSUBDEVICE_DESCRIPTOR;
#undef INTERFACE
@@ -128,7 +136,7 @@
IN WCHAR * Name,
IN PUNKNOWN Unknown,
IN POOL_TYPE PoolType,
- IN PDEVICE_OBJECT * DeviceObject,
+ IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN KSOBJECT_CREATE *CreateObject) PURE;
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.c [iso-8859-1] Wed Feb
18 12:00:08 2009
@@ -157,11 +157,11 @@
IN WCHAR * Name,
IN PUNKNOWN Unknown,
IN POOL_TYPE PoolType,
- IN PDEVICE_OBJECT * DeviceObject,
+ IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN KSOBJECT_CREATE *CreateObject)
{
-
+ DPRINT1("IPortPinWaveCyclic_fnNewIrpTarget\n");
return STATUS_UNSUCCESSFUL;
}
@@ -181,6 +181,7 @@
IoStack = IoGetCurrentIrpStackLocation(Irp);
+ DPRINT1("IPortPinWaveCyclic_fnDeviceIoControl\n");
if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_KS_PROPERTY)
{
/// FIXME
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_midi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_midi.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_midi.c [iso-8859-1] Wed Feb 18
12:00:08 2009
@@ -330,7 +330,7 @@
IN WCHAR * Name,
IN PUNKNOWN Unknown,
IN POOL_TYPE PoolType,
- IN PDEVICE_OBJECT * DeviceObject,
+ IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN KSOBJECT_CREATE *CreateObject)
{
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.c [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.c [iso-8859-1] Wed Feb
18 12:00:08 2009
@@ -316,7 +316,7 @@
IN WCHAR * Name,
IN PUNKNOWN Unknown,
IN POOL_TYPE PoolType,
- IN PDEVICE_OBJECT * DeviceObject,
+ IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN KSOBJECT_CREATE *CreateObject)
{
@@ -432,152 +432,6 @@
ISubDevice_fnPinCount
};
-
-NTSTATUS
-NTAPI
-ITopology_fnDeviceIoControl(
- PDEVICE_OBJECT DeviceObject,
- PIRP Irp)
-{
- DPRINT1("ITopology_fnDeviceIoControl called\n");
-
- return STATUS_SUCCESS;
-}
-
-NTSTATUS
-NTAPI
-ITopology_fnRead(
- PDEVICE_OBJECT DeviceObject,
- PIRP Irp)
-{
- DPRINT1("ITopology_fnRead called\n");
-
- return STATUS_SUCCESS;
-}
-
-NTSTATUS
-NTAPI
-ITopology_fnWrite(
- PDEVICE_OBJECT DeviceObject,
- PIRP Irp)
-{
- DPRINT1("ITopology_fnWrite called\n");
-
- return STATUS_SUCCESS;
-}
-
-NTSTATUS
-NTAPI
-ITopology_fnFlush(
- PDEVICE_OBJECT DeviceObject,
- PIRP Irp)
-{
- DPRINT1("ITopology_fnFlush called\n");
-
- return STATUS_SUCCESS;
-}
-
-NTSTATUS
-NTAPI
-ITopology_fnClose(
- PDEVICE_OBJECT DeviceObject,
- PIRP Irp)
-{
- DPRINT1("ITopology_fnClose called\n");
-
- return STATUS_SUCCESS;
-}
-
-NTSTATUS
-NTAPI
-ITopology_fnQuerySecurity(
- PDEVICE_OBJECT DeviceObject,
- PIRP Irp)
-{
- DPRINT1("ITopology_fnQuerySecurity called\n");
-
- return STATUS_SUCCESS;
-}
-
-NTSTATUS
-NTAPI
-ITopology_fnSetSecurity(
- PDEVICE_OBJECT DeviceObject,
- PIRP Irp)
-{
- DPRINT1("ITopology_fnSetSecurity called\n");
-
- return STATUS_SUCCESS;
-}
-
-BOOLEAN
-NTAPI
-ITopology_fnFastDeviceIoControl(
- PFILE_OBJECT FileObject,
- BOOLEAN Wait,
- PVOID InputBuffer,
- ULONG InputBufferLength,
- PVOID OutputBuffer,
- ULONG OutputBufferLength,
- ULONG IoControlCode,
- PIO_STATUS_BLOCK IoStatus,
- PDEVICE_OBJECT DeviceObject)
-{
- DPRINT1("ITopology_fnFastDeviceIoControl called\n");
-
- return TRUE;
-}
-
-
-BOOLEAN
-NTAPI
-ITopology_fnFastRead(
- PFILE_OBJECT FileObject,
- PLARGE_INTEGER FileOffset,
- ULONG Length,
- BOOLEAN Wait,
- ULONG LockKey,
- PVOID Buffer,
- PIO_STATUS_BLOCK IoStatus,
- PDEVICE_OBJECT DeviceObject)
-{
- DPRINT1("ITopology_fnFastRead called\n");
-
- return TRUE;
-
-}
-
-BOOLEAN
-NTAPI
-ITopology_fnFastWrite(
- PFILE_OBJECT FileObject,
- PLARGE_INTEGER FileOffset,
- ULONG Length,
- BOOLEAN Wait,
- ULONG LockKey,
- PVOID Buffer,
- PIO_STATUS_BLOCK IoStatus,
- PDEVICE_OBJECT DeviceObject)
-{
- DPRINT1("ITopology_fnFastWrite called\n");
-
- return TRUE;
-}
-
-static KSDISPATCH_TABLE DispatchTable =
-{
- ITopology_fnDeviceIoControl,
- ITopology_fnRead,
- ITopology_fnWrite,
- ITopology_fnFlush,
- ITopology_fnClose,
- ITopology_fnQuerySecurity,
- ITopology_fnSetSecurity,
- ITopology_fnFastDeviceIoControl,
- ITopology_fnFastRead,
- ITopology_fnFastWrite,
-};
-
NTSTATUS
NTAPI
PcCreateItemDispatch(
@@ -585,21 +439,21 @@
IN PIRP Irp)
{
NTSTATUS Status = STATUS_SUCCESS;
-
+ PIO_STACK_LOCATION IoStack;
ISubdevice * SubDevice;
PPCLASS_DEVICE_EXTENSION DeviceExt;
SUBDEVICE_ENTRY * Entry;
+ IIrpTarget *Filter, *Pin;
PKSOBJECT_CREATE_ITEM CreateItem;
- DPRINT1("PcCreateItemDispatch called\n");
+ DPRINT1("PcCreateItemDispatch called DeviceObject %p\n", DeviceObject);
/* access the create item */
CreateItem = KSCREATE_ITEM_IRP_STORAGE(Irp);
if (!CreateItem)
{
DPRINT1("PcCreateItemDispatch no CreateItem\n");
- Status = STATUS_UNSUCCESSFUL;
- goto cleanup;
+ return STATUS_UNSUCCESSFUL;
}
SubDevice = (ISubdevice*)CreateItem->Context;
@@ -608,20 +462,17 @@
if (!SubDevice || !DeviceExt)
{
DPRINT1("PcCreateItemDispatch SubDevice %p DeviceExt %p\n", SubDevice,
DeviceExt);
-
- Status = STATUS_UNSUCCESSFUL;
- goto cleanup;
+ return STATUS_UNSUCCESSFUL;
}
Entry = AllocateItem(NonPagedPool, sizeof(SUBDEVICE_ENTRY), TAG_PORTCLASS);
if (!Entry)
{
DPRINT1("PcCreateItemDispatch no memory\n");
-
- Status = STATUS_INSUFFICIENT_RESOURCES;
- goto cleanup;
- }
-#if 0
+ return STATUS_INSUFFICIENT_RESOURCES;
+ }
+
+#if KS_IMPLEMENTED
Status = KsReferenceSoftwareBusObject(DeviceExt->KsDeviceHeader);
if (!NT_SUCCESS(Status) && Status != STATUS_NOT_IMPLEMENTED)
{
@@ -632,24 +483,77 @@
}
#endif
- Status = KsAllocateObjectHeader(&Entry->ObjectHeader, 0, NULL, Irp,
&DispatchTable);
+
+ /* get current io stack location */
+ IoStack = IoGetCurrentIrpStackLocation(Irp);
+ /* sanity check */
+ ASSERT(IoStack->FileObject != NULL);
+
+ if (IoStack->FileObject->FsContext != NULL)
+ {
+ /* nothing to do */
+ DPRINT1("FsContext already exists\n");
+ return STATUS_SUCCESS;
+ }
+
+
+ /* get filter object
+ * is implemented as a singleton
+ */
+ Status = SubDevice->lpVtbl->NewIrpTarget(SubDevice,
+ &Filter,
+ NULL,
+ NULL,
+ NonPagedPool,
+ DeviceObject,
+ Irp,
+ NULL);
if (!NT_SUCCESS(Status))
{
- DPRINT1("KsAllocateObjectHeader failed with %x\n", Status);
- //KsDereferenceSoftwareBusObject(DeviceExt->KsDeviceHeader);
- FreeItem(Entry, TAG_PORTCLASS);
+ DPRINT1("Failed to get filter object\n");
return Status;
}
- InsertTailList(&DeviceExt->SubDeviceList, &Entry->Entry);
-
-
-cleanup:
- // Irp->IoStatus.Status = Status;
- // Irp->IoStatus.Information = 0;
- // IoCompleteRequest(Irp, IO_NO_INCREMENT);
-
- DPRINT1("PcCreateItemDispatch Status %x\n", Status);
+ /* is just the filter requested */
+ if (IoStack->FileObject->FileName.Buffer == NULL)
+ {
+ /* create the dispatch object */
+ Status = NewDispatchObject(Irp, Filter);
+
+ DPRINT1("Filter %p\n", Filter);
+ DbgBreakPoint();
+ }
+ else
+ {
+ KSOBJECT_CREATE Create;
+ LPWSTR Buffer = IoStack->FileObject->FileName.Buffer;
+
+ static LPWSTR KS_NAME_PIN = L"{146F1A80-4791-11D0-A5D6-28DB04C10000}";
+
+ /* is the request for a new pin */
+ if (!wcsncmp(KS_NAME_PIN, Buffer, wcslen(KS_NAME_PIN)))
+ {
+ /* try to create new pin */
+ Create.CreateItemsCount = 1;
+ Create.CreateItemsList =
(PKSOBJECT_CREATE_ITEM)(IoStack->FileObject->FileName.Buffer + (wcslen(KS_NAME_PIN)
+ 1));
+
+ Status = Filter->lpVtbl->NewIrpTarget(Filter,
+ &Pin,
+ KS_NAME_PIN,
+ NULL,
+ NonPagedPool,
+ DeviceObject,
+ Irp,
+ &Create);
+ if (NT_SUCCESS(Status))
+ {
+ /* create the dispatch object */
+ Status = NewDispatchObject(Irp, Pin);
+ DPRINT1("Pin %p\n", Pin);
+ }
+ }
+ }
+
return Status;
}
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.c [iso-8859-1] Wed Feb
18 12:00:08 2009
@@ -19,7 +19,10 @@
PPOWERNOTIFY pPowerNotify;
PPCFILTER_DESCRIPTOR pDescriptor;
PSUBDEVICE_DESCRIPTOR SubDeviceDescriptor;
+ IPortFilterWaveCyclic * Filter;
}IPortWaveCyclicImpl;
+
+GUID KSPROPERTY_SETID_Topology = {0x720D4AC0L, 0x7533, 0x11D0, {0xA5,
0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
static GUID InterfaceGuids[3] =
{
@@ -36,6 +39,32 @@
0x6994AD04, 0x93EF, 0x11D0, {0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96}
}
};
+
+DEFINE_KSPROPERTY_TOPOLOGYSET(PortFilterWaveCyclicTopologySet, TopologyPropertyHandler);
+DEFINE_KSPROPERTY_PINSETCONSTRAINED(PortFilterWaveCyclicPinSet, PinPropertyHandler,
PinPropertyHandler, PinPropertyHandler);
+
+KSPROPERTY_SET WaveCyclicPropertySet[] =
+{
+ {
+ &KSPROPSETID_Topology,
+ sizeof(PortFilterWaveCyclicTopologySet) / sizeof(KSPROPERTY_ITEM),
+ (const KSPROPERTY_ITEM*)&PortFilterWaveCyclicTopologySet,
+ 0,
+ NULL
+ },
+ {
+ &KSPROPSETID_Pin,
+ sizeof(PortFilterWaveCyclicPinSet) / sizeof(KSPROPERTY_ITEM),
+ (const KSPROPERTY_ITEM*)&PortFilterWaveCyclicPinSet,
+ 0,
+ NULL
+ }
+};
+
+//KSEVENTSETID_LoopedStreaming, Type = KSEVENT_LOOPEDSTREAMING_POSITION
+//KSEVENTSETID_Connection, Type = KSEVENT_CONNECTION_ENDOFSTREAM,
+
+
#if 0
static const KSIDENTIFIER Identifiers[] =
@@ -319,11 +348,11 @@
/* create the subdevice descriptor */
Status = PcCreateSubdeviceDescriptor(&This->SubDeviceDescriptor,
3,
- InterfaceGuids,
+ InterfaceGuids,
0,
NULL,
- 0,
- NULL,
+ 2,
+ WaveCyclicPropertySet,
0,
0,
0,
@@ -536,7 +565,7 @@
IN WCHAR * Name,
IN PUNKNOWN Unknown,
IN POOL_TYPE PoolType,
- IN PDEVICE_OBJECT * DeviceObject,
+ IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN KSOBJECT_CREATE *CreateObject)
{
@@ -546,13 +575,28 @@
DPRINT1("ISubDevice_NewIrpTarget this %p\n", This);
- Status = NewPortFilterWaveCyclic(&Filter, (IPortWaveCyclic*)This);
- if (NT_SUCCESS(Status))
- {
- *OutTarget = (IIrpTarget*)Filter;
- }
-
- return STATUS_UNSUCCESSFUL;
+ if (This->Filter)
+ {
+ *OutTarget = (IIrpTarget*)This->Filter;
+ return STATUS_SUCCESS;
+ }
+
+
+ Status = NewPortFilterWaveCyclic(&Filter);
+ if (!NT_SUCCESS(Status))
+ {
+ return Status;
+ }
+
+ Status = Filter->lpVtbl->Init(Filter, (IPortWaveCyclic*)This);
+ if (!NT_SUCCESS(Status))
+ {
+ Filter->lpVtbl->Release(Filter);
+ return Status;
+ }
+
+ *OutTarget = (IIrpTarget*)Filter;
+ return Status;
}
static
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.c [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.c [iso-8859-1] Wed Feb 18
12:00:08 2009
@@ -613,7 +613,7 @@
IN WCHAR * Name,
IN PUNKNOWN Unknown,
IN POOL_TYPE PoolType,
- IN PDEVICE_OBJECT * DeviceObject,
+ IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN KSOBJECT_CREATE *CreateObject)
{
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild [iso-8859-1] Wed Feb 18
12:00:08 2009
@@ -12,6 +12,7 @@
<library>libcntpr</library>
<file>api.c</file>
<file>connection.c</file>
+ <file>dispatcher.c</file>
<file>dll.c</file>
<file>dma_slave.c</file>
<file>drm_port.c</file>
@@ -35,6 +36,7 @@
<file>port_topology.c</file>
<file>port_wavepci.c</file>
<file>port_wavecyclic.c</file>
+ <file>propertyhandler.c</file>
<file>miniport.c</file>
<file>miniport_dmus.c</file>
<file>miniport_fmsynth.c</file>
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/private.h [iso-8859-1] Wed Feb 18
12:00:08 2009
@@ -83,11 +83,16 @@
OUT PPORTCLSVERSION * OutVersion);
NTSTATUS NewPortFilterWaveCyclic(
- OUT IPortFilterWaveCyclic ** OutFilter,
- IN IPortWaveCyclic* iface);
+ OUT IPortFilterWaveCyclic ** OutFilter);
NTSTATUS NewPortPinWaveCyclic(
OUT IPortPinWaveCyclic ** OutPin);
+
+NTSTATUS
+NTAPI
+NewDispatchObject(
+ IN PIRP Irp,
+ IN IIrpTarget * Target);
PVOID AllocateItem(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag);
@@ -118,6 +123,19 @@
ULONG ToPin;
}PHYSICAL_CONNECTION;
+NTSTATUS
+NTAPI
+TopologyPropertyHandler(
+ IN PIRP Irp,
+ IN PKSIDENTIFIER Request,
+ IN OUT PVOID Data);
+
+NTSTATUS
+NTAPI
+PinPropertyHandler(
+ IN PIRP Irp,
+ IN PKSIDENTIFIER Request,
+ IN OUT PVOID Data);
typedef struct
{
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/registry.c [iso-8859-1] Wed Feb 18
12:00:08 2009
@@ -64,6 +64,7 @@
}
DPRINT("IRegistryKey_QueryInterface: This %p unknown iid\n", This,
This->ref);
+KeBugCheckEx(0,0,0,0,0);
return STATUS_UNSUCCESSFUL;
}
@@ -138,8 +139,11 @@
return STATUS_INSUFFICIENT_RESOURCES;
}
+ if (OuterUnknown)
+ OuterUnknown->lpVtbl->AddRef(OuterUnknown);
+
NewThis->hKey = hKey;
- NewThis->ref = 1;
+ NewThis->ref = 2;
NewThis->lpVtbl = &vt_IRegistryKey;
*RegistrySubKey = (PREGISTRYKEY)&NewThis->lpVtbl;
@@ -222,7 +226,7 @@
};
/*
- * @unimplemented
+ * @implemented
*/
NTSTATUS NTAPI
PcNewRegistryKey(
@@ -301,9 +305,12 @@
return STATUS_INSUFFICIENT_RESOURCES;
}
+ if (OuterUnknown)
+ OuterUnknown->lpVtbl->AddRef(OuterUnknown);
+
This->hKey = hHandle;
This->lpVtbl = &vt_IRegistryKey;
- This->ref = 1;
+ This->ref = 2;
*OutRegistryKey = (PREGISTRYKEY)&This->lpVtbl;
DPRINT1("PcNewRegistryKey result %p\n", *OutRegistryKey);
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/resource.c [iso-8859-1] Wed Feb 18
12:00:08 2009
@@ -37,13 +37,27 @@
IN REFIID refiid,
OUT PVOID* Output)
{
- IResourceListImpl * This = (IResourceListImpl*)iface;
- if (IsEqualGUIDAligned(refiid, &IID_IResourceList))
+ WCHAR Buffer[100];
+
+ IResourceListImpl * This = (IResourceListImpl*)iface;
+ if (IsEqualGUIDAligned(refiid, &IID_IResourceList) ||
+ IsEqualGUIDAligned(refiid, &IID_IUnknown))
{
*Output = &This->lpVtbl;
InterlockedIncrement(&This->ref);
return STATUS_SUCCESS;
}
+#if 0
+ else if (IsEqualGUIDAligned(refiid, &IID_IDrmPort) ||
+ IsEqualGUIDAligned(refiid, &IID_IDrmPort2))
+ {
+ return NewIDrmPort((PDRMPORT2*)Output);
+ }
+#endif
+ StringFromCLSID(refiid, Buffer);
+ DPRINT1("IResourceList_fnQueryInterface no interface!!! iface %S\n",
Buffer);
+ KeBugCheckEx(0, 0, 0, 0, 0);
+
return STATUS_UNSUCCESSFUL;
}
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/undoc.c [iso-8859-1] Wed Feb 18
12:00:08 2009
@@ -79,6 +79,41 @@
return STATUS_NOT_IMPLEMENTED;
}
+NTSTATUS
+AddToPropertyTable(
+ IN OUT SUBDEVICE_DESCRIPTOR * Descriptor,
+ IN KSPROPERTY_SET * FilterProperty)
+{
+ if (Descriptor->FilterPropertySet.FreeKsPropertySetOffset >=
Descriptor->FilterPropertySet.MaxKsPropertySetCount)
+ {
+ DPRINT1("FIXME\n");
+ return STATUS_UNSUCCESSFUL;
+ }
+
+
RtlMoveMemory(&Descriptor->FilterPropertySet.Properties[Descriptor->FilterPropertySet.FreeKsPropertySetOffset],
+ FilterProperty,
+ sizeof(KSPROPERTY_SET));
+
+ if (FilterProperty->PropertiesCount)
+ {
+
Descriptor->FilterPropertySet.Properties[Descriptor->FilterPropertySet.FreeKsPropertySetOffset].PropertyItem
= AllocateItem(NonPagedPool,
+
sizeof(KSPROPERTY_ITEM) *
FilterProperty->PropertiesCount,
+
TAG_PORTCLASS);
+
+ if
(!Descriptor->FilterPropertySet.Properties[Descriptor->FilterPropertySet.FreeKsPropertySetOffset].PropertyItem)
+ {
+
Descriptor->FilterPropertySet.Properties[Descriptor->FilterPropertySet.FreeKsPropertySetOffset].PropertiesCount
= 0;
+ return STATUS_INSUFFICIENT_RESOURCES;
+ }
+
RtlMoveMemory((PVOID)Descriptor->FilterPropertySet.Properties[Descriptor->FilterPropertySet.FreeKsPropertySetOffset].PropertyItem,
+ FilterProperty->PropertyItem,
+ sizeof(KSPROPERTY_ITEM) * FilterProperty->PropertiesCount);
+ }
+
+ Descriptor->FilterPropertySet.FreeKsPropertySetOffset++;
+
+ return STATUS_SUCCESS;
+}
/*
* @unimplemented
@@ -117,13 +152,28 @@
RtlCopyMemory(Descriptor->Interfaces, InterfaceGuids, sizeof(GUID) *
InterfaceCount);
Descriptor->InterfaceCount = InterfaceCount;
+ if (FilterPropertiesCount)
+ {
+
+ /// FIXME
+ /// handle driver properties
+ Descriptor->FilterPropertySet.Properties = AllocateItem(NonPagedPool,
sizeof(KSPROPERTY_SET) * FilterPropertiesCount, TAG_PORTCLASS);
+ if (! Descriptor->FilterPropertySet.Properties)
+ goto cleanup;
+
+ Descriptor->FilterPropertySet.MaxKsPropertySetCount = FilterPropertiesCount;
+ for(Index = 0; Index < FilterPropertiesCount; Index++)
+ {
+ Status = AddToPropertyTable(Descriptor, &FilterProperties[Index]);
+ if (!NT_SUCCESS(Status))
+ goto cleanup;
+ }
+ }
+
if (FilterDescription->PinCount)
{
- /// FIXME
- /// handle extra size
- ASSERT(FilterDescription->PinSize == sizeof(KSPIN_DESCRIPTOR));
- Descriptor->Factory.KsPinDescriptor = AllocateItem(NonPagedPool,
sizeof(KSPIN_DESCRIPTOR) * FilterDescription->PinCount, TAG_PORTCLASS);
+ Descriptor->Factory.KsPinDescriptor = AllocateItem(NonPagedPool,
FilterDescription->PinSize * FilterDescription->PinCount, TAG_PORTCLASS);
if (!Descriptor->Factory.KsPinDescriptor)
goto cleanup;
@@ -132,7 +182,7 @@
/* copy pin factories */
for(Index = 0; Index < FilterDescription->PinCount; Index++)
- RtlMoveMemory(&Descriptor->Factory.KsPinDescriptor[Index],
&FilterDescription->Pins[Index].KsPinDescriptor, sizeof(KSPIN_DESCRIPTOR));
+ RtlMoveMemory(&Descriptor->Factory.KsPinDescriptor[Index],
&FilterDescription->Pins[Index].KsPinDescriptor, FilterDescription->PinSize);
}
*OutSubdeviceDescriptor = Descriptor;