Author: janderwald
Date: Sat Jan 31 06:59:56 2009
New Revision: 39226
URL:
http://svn.reactos.org/svn/reactos?rev=39226&view=rev
Log:
- Fix a few definitions
Modified:
trunk/reactos/include/psdk/ks.h
Modified: trunk/reactos/include/psdk/ks.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ks.h?rev=3922…
==============================================================================
--- trunk/reactos/include/psdk/ks.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/ks.h [iso-8859-1] Sat Jan 31 06:59:56 2009
@@ -1120,6 +1120,20 @@
PFAST_IO_READ FastRead;
PFAST_IO_WRITE FastWrite;
} KSDISPATCH_TABLE, *PKSDISPATCH_TABLE;
+
+
+#define KSCREATE_ITEM_IRP_STORAGE(Irp)
(*(PKSOBJECT_CREATE_ITEM*)&(Irp)->Tail.Overlay.DriverContext[0])
+#define KSEVENT_SET_IRP_STORAGE(Irp) (*(const
KSEVENT_SET**)&(Irp)->Tail.Overlay.DriverContext[0])
+#define KSEVENT_ITEM_IRP_STORAGE(Irp) (*(const
KSEVENT_ITEM**)&(Irp)->Tail.Overlay.DriverContext[3])
+#define KSEVENT_ENTRY_IRP_STORAGE(Irp)
(*(PKSEVENT_ENTRY*)&(Irp)->Tail.Overlay.DriverContext[0])
+#define KSMETHOD_SET_IRP_STORAGE(Irp) (*(const
KSMETHOD_SET**)&(Irp)->Tail.Overlay.DriverContext[0])
+#define KSMETHOD_ITEM_IRP_STORAGE(Irp) (*(const
KSMETHOD_ITEM**)&(Irp)->Tail.Overlay.DriverContext[3])
+#define KSMETHOD_TYPE_IRP_STORAGE(Irp)
(*(ULONG_PTR*)(&(Irp)->Tail.Overlay.DriverContext[2]))
+#define KSQUEUE_SPINLOCK_IRP_STORAGE(Irp)
(*(PKSPIN_LOCK*)&(Irp)->Tail.Overlay.DriverContext[1])
+#define KSPROPERTY_SET_IRP_STORAGE(Irp) (*(const
KSPROPERTY_SET**)&(Irp)->Tail.Overlay.DriverContext[0])
+#define KSPROPERTY_ITEM_IRP_STORAGE(Irp) (*(const
KSPROPERTY_ITEM**)&(Irp)->Tail.Overlay.DriverContext[3])
+#define KSPROPERTY_ATTRIBUTES_IRP_STORAGE(Irp)
(*(PKSATTRIBUTE_LIST*)&(Irp)->Tail.Overlay.DriverContext[2])
+
#endif
typedef struct
@@ -1432,6 +1446,18 @@
typedef struct
{
+ ULONG PropertySetsCount;
+ ULONG PropertyItemSize;
+ const KSPROPERTY_SET* PropertySets;
+ ULONG MethodSetsCount;
+ ULONG MethodItemSize;
+ const KSMETHOD_SET* MethodSets;
+ ULONG EventSetsCount;
+ ULONG EventItemSize;
+ const KSEVENT_SET* EventSets;
+#if !defined(_WIN64)
+ PVOID Alignment;
+#endif
} KSAUTOMATION_TABLE, *PKSAUTOMATION_TABLE;
typedef struct
@@ -1648,11 +1674,17 @@
/* ===============================================================
Device Dispatch
*/
+
+
+
#if defined(_NTDDK_)
-typedef struct
-{
- /* TODO */
-} KSDEVICE, *PKSDEVICE;
+
+typedef struct _KSFILTER_DISPATCH KSFILTER_DISPATCH, *PKSFILTER_DISPATCH;
+typedef struct _KSDEVICE KSDEVICE, *PKSDEVICE;
+typedef struct _KSFILTER KSFILTER, *PKSFILTER;
+typedef struct _KSNODE_DESCRIPTOR KSNODE_DESCRIPTOR, *PKSNODE_DESCRIPTOR;
+typedef struct _KSFILTER_DESCRIPTOR KSFILTER_DESCRIPTOR, *PKSFILTER_DESCRIPTOR;
+typedef struct _KSDEVICE_DESCRIPTOR KSDEVICE_DESCRIPTOR, *PKSDEVICE_DESCRIPTOR;
typedef NTSTATUS (*PFNKSDEVICECREATE)(
IN PKSDEVICE Device);
@@ -1694,8 +1726,7 @@
IN DEVICE_POWER_STATE To,
IN DEVICE_POWER_STATE From);
-typedef struct _KSDEVICE_DISPATCH
-{
+typedef struct _KSDEVICE_DISPATCH {
PFNKSDEVICECREATE Add;
PFNKSDEVICEPNPSTART Start;
PFNKSDEVICE PostStart;
@@ -1707,18 +1738,40 @@
PFNKSDEVICEIRPVOID Remove;
PFNKSDEVICEQUERYCAPABILITIES QueryCapabilities;
PFNKSDEVICEIRPVOID SurpriseRemoval;
- PFNKSDEVICEQUERYPOWER Querypower;
+ PFNKSDEVICEQUERYPOWER QueryPower;
PFNKSDEVICESETPOWER SetPower;
-} KSDEVICE_DISPATCH, *PKSDEVICE_DISPATCH;
+ PFNKSDEVICEIRP QueryInterface;
+}KSDEVICE_DISPATCH, *PKSDEVICE_DISPATCH;
+
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+#define KSDEVICE_DESCRIPTOR_VERSION_2 (0x110)
+#define MIN_DEV_VER_FOR_FLAGS (0x110)
#endif
+struct _KSDEVICE
+{
+ const KSDEVICE_DESCRIPTOR* Descriptor;
+ KSOBJECT_BAG Bag;
+ PVOID Context;
+ PDEVICE_OBJECT FunctionalDeviceObject;
+ PDEVICE_OBJECT PhysicalDeviceObject;
+ PDEVICE_OBJECT NextDeviceObject;
+ BOOLEAN Started;
+ SYSTEM_POWER_STATE SystemPowerState;
+ DEVICE_POWER_STATE DevicePowerState;
+};
+#endif
+
/* ===============================================================
Filter Dispatch
*/
#if defined(_NTDDK_)
-typedef struct
-{
-} KSFILTER, *PKSFILTER;
+struct _KSFILTER
+{
+ const KSFILTER_DESCRIPTOR* Descriptor;
+ KSOBJECT_BAG Bag;
+ PVOID Context;
+};
typedef NTSTATUS (*PFNKSFILTERIRP)(
IN PKSFILTER Filter,
@@ -1731,21 +1784,23 @@
typedef NTSTATUS (*PFNKSFILTERVOID)(
IN PKSFILTER Filter);
-typedef struct _KSFILTER_DISPATCH
+struct _KSFILTER_DISPATCH
{
PFNKSFILTERIRP Create;
PFNKSFILTERIRP Close;
PFNKSFILTERPROCESS Process;
PFNKSFILTERVOID Reset;
-} KSFILTER_DISPATCH, *PKSFILTER_DISPATCH;
-
-typedef struct {
+};
+
+struct _KSNODE_DESCRIPTOR
+{
const KSAUTOMATION_TABLE* AutomationTable;
const GUID* Type;
const GUID* Name;
-} KSNODE_DESCRIPTOR, *PKSNODE_DESCRIPTOR;
-
-typedef struct {
+};
+
+struct _KSFILTER_DESCRIPTOR
+{
const KSFILTER_DISPATCH* Dispatch;
const KSAUTOMATION_TABLE* AutomationTable;
ULONG Version;
@@ -1762,14 +1817,14 @@
ULONG ConnectionsCount;
const KSTOPOLOGY_CONNECTION* Connections;
const KSCOMPONENTID* ComponentId;
-} KSFILTER_DESCRIPTOR, *PKSFILTER_DESCRIPTOR;
-
-typedef struct
+};
+
+struct _KSDEVICE_DESCRIPTOR
{
const KSDEVICE_DISPATCH* Dispatch;
ULONG FilterDescriptorsCount;
const KSFILTER_DESCRIPTOR*const* FilterDescriptors;
-} KSDEVICE_DESCRIPTOR, *PKSDEVICE_DESCRIPTOR;
+};
#endif
/* ===============================================================
Minidriver Callbacks