Author: sir_richard
Date: Sat Sep 25 05:15:47 2010
New Revision: 48864
URL:
http://svn.reactos.org/svn/reactos?rev=48864&view=rev
Log:
[PSDK/DDK]: Add more missing definitions. Fix classpnp.h.
Modified:
trunk/reactos/include/ddk/classpnp.h
trunk/reactos/include/psdk/ntdef.h
trunk/reactos/include/psdk/wmistr.h
Modified: trunk/reactos/include/ddk/classpnp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/classpnp.h?rev…
==============================================================================
--- trunk/reactos/include/ddk/classpnp.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/classpnp.h [iso-8859-1] Sat Sep 25 05:15:47 2010
@@ -40,6 +40,42 @@
(opCode == SCSIOP_WRITE16))
#define IS_SCSIOP_READWRITE(opCode) (IS_SCSIOP_READ(opCode) || IS_SCSIOP_WRITE(opCode))
+
+#define ADJUST_FUA_FLAG(fdoExt) {
\
+ if (TEST_FLAG(fdoExt->DeviceFlags, DEV_WRITE_CACHE) &&
\
+ !TEST_FLAG(fdoExt->DeviceFlags, DEV_POWER_PROTECTED) &&
\
+ !TEST_FLAG(fdoExt->ScanForSpecialFlags, CLASS_SPECIAL_FUA_NOT_SUPPORTED) ) {
\
+ fdoExt->CdbForceUnitAccess = TRUE;
\
+ } else {
\
+ fdoExt->CdbForceUnitAccess = FALSE;
\
+ }
\
+}
+
+#define FREE_POOL(_PoolPtr) \
+ if (_PoolPtr != NULL) { \
+ ExFreePool(_PoolPtr); \
+ _PoolPtr = NULL; \
+ }
+
+#ifdef POOL_TAGGING
+#undef ExAllocatePool
+#undef ExAllocatePoolWithQuota
+#define ExAllocatePool(a,b) ExAllocatePoolWithTag(a,b,'nUcS')
+//#define ExAllocatePool(a,b) #assert(0)
+#define ExAllocatePoolWithQuota(a,b) ExAllocatePoolWithQuotaTag(a,b,'nUcS')
+#endif
+
+#define CLASS_TAG_AUTORUN_DISABLE 'ALcS'
+#define CLASS_TAG_FILE_OBJECT_EXTENSION 'FLcS'
+#define CLASS_TAG_MEDIA_CHANGE_DETECTION 'MLcS'
+#define CLASS_TAG_MOUNT 'mLcS'
+#define CLASS_TAG_RELEASE_QUEUE 'qLcS'
+#define CLASS_TAG_POWER 'WLcS'
+#define CLASS_TAG_WMI 'wLcS'
+#define CLASS_TAG_FAILURE_PREDICT 'fLcS'
+#define CLASS_TAG_DEVICE_CONTROL 'OIcS'
+#define CLASS_TAG_MODE_DATA 'oLcS'
+#define CLASS_TAG_MULTIPATH 'mPcS'
#define MAXIMUM_RETRIES 4
@@ -217,12 +253,9 @@
struct _MEDIA_CHANGE_DETECTION_INFO;
typedef struct _MEDIA_CHANGE_DETECTION_INFO MEDIA_CHANGE_DETECTION_INFO,
*PMEDIA_CHANGE_DETECTION_INFO;
-struct _DICTIONARY_HEADER;
-typedef struct _DICTIONARY_HEADER DICTIONARY_HEADER, *PDICTIONARY_HEADER;
-
typedef struct _DICTIONARY {
ULONGLONG Signature;
- PDICTIONARY_HEADER List;
+ struct _DICTIONARY_HEADER* List;
KSPIN_LOCK SpinLock;
} DICTIONARY, *PDICTIONARY;
@@ -558,9 +591,6 @@
ULONG_PTR Reserved4;
} PHYSICAL_DEVICE_EXTENSION, *PPHYSICAL_DEVICE_EXTENSION;
-struct _FAILURE_PREDICTION_INFO;
-typedef struct _FAILURE_PREDICTION_INFO *PFAILURE_PREDICTION_INFO;
-
typedef struct _CLASS_POWER_OPTIONS {
ULONG PowerDown:1;
ULONG LockQueue:1;
@@ -652,7 +682,7 @@
BOOLEAN ReleaseQueueIrpFromPool;
BOOLEAN FailurePredicted;
ULONG FailureReason;
- PFAILURE_PREDICTION_INFO FailurePredictionInfo;
+ struct _FAILURE_PREDICTION_INFO* FailurePredictionInfo;
BOOLEAN PowerDownInProgress;
ULONG EnumerationInterlock;
KEVENT ChildLock;
@@ -734,6 +764,14 @@
PIRP Irp);
SCSIPORTAPI
+NTSTATUS
+NTAPI
+ClassIoComplete(
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp,
+ PVOID Context);
+
+SCSIPORTAPI
BOOLEAN
NTAPI
ClassInterpretSenseInfo(
@@ -848,7 +886,7 @@
ClassGetDescriptor(
PDEVICE_OBJECT DeviceObject,
PSTORAGE_PROPERTY_ID PropertyId,
- PVOID *Descriptor);
+ PSTORAGE_DESCRIPTOR_HEADER *Descriptor);
SCSIPORTAPI
VOID
@@ -1007,6 +1045,13 @@
ClassReleaseChildLock(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension);
+NTSTATUS
+NTAPI
+ClassSignalCompletion(
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp,
+ PKEVENT Event);
+
VOID
NTAPI
ClassSendStartUnit(
@@ -1020,10 +1065,26 @@
UCHAR RemoveType);
SCSIPORTAPI
+NTSTATUS
+NTAPI
+ClassAsynchronousCompletion(
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp,
+ PVOID Event);
+
+SCSIPORTAPI
VOID
NTAPI
ClassCheckMediaState(
PFUNCTIONAL_DEVICE_EXTENSION FdoExtension);
+
+SCSIPORTAPI
+NTSTATUS
+NTAPI
+ClassCheckVerifyComplete(
+ PDEVICE_OBJECT DeviceObject,
+ PIRP Irp,
+ PVOID Context);
SCSIPORTAPI
VOID
Modified: trunk/reactos/include/psdk/ntdef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ntdef.h?rev=4…
==============================================================================
--- trunk/reactos/include/psdk/ntdef.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/ntdef.h [iso-8859-1] Sat Sep 25 05:15:47 2010
@@ -616,6 +616,12 @@
#define RTL_CONSTANT_STRING(s) { sizeof(s)-sizeof((s)[0]), sizeof(s), s }
#define RTL_FIELD_SIZE(type, field) (sizeof(((type *)0)->field))
+
+#define RTL_SIZEOF_THROUGH_FIELD(type, field) \
+ (FIELD_OFFSET(type, field) + RTL_FIELD_SIZE(type, field))
+
+#define RTL_CONTAINS_FIELD(Struct, Size, Field) \
+ ( (((PCHAR)(&(Struct)->Field)) + sizeof((Struct)->Field)) <=
(((PCHAR)(Struct))+(Size)) )
#define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0]))
#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)
Modified: trunk/reactos/include/psdk/wmistr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wmistr.h?rev=…
==============================================================================
--- trunk/reactos/include/psdk/wmistr.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/wmistr.h [iso-8859-1] Sat Sep 25 05:15:47 2010
@@ -25,6 +25,123 @@
ULONG Flags;
} WNODE_HEADER, *PWNODE_HEADER;
+#define WNODE_FLAG_ALL_DATA 0x00000001
+#define WNODE_FLAG_SINGLE_INSTANCE 0x00000002
+#define WNODE_FLAG_SINGLE_ITEM 0x00000004
+#define WNODE_FLAG_EVENT_ITEM 0x00000008
+#define WNODE_FLAG_FIXED_INSTANCE_SIZE 0x00000010
+#define WNODE_FLAG_TOO_SMALL 0x00000020
+#define WNODE_FLAG_INSTANCES_SAME 0x00000040
+#define WNODE_FLAG_STATIC_INSTANCE_NAMES 0x00000080
+#define WNODE_FLAG_INTERNAL 0x00000100
+#define WNODE_FLAG_USE_TIMESTAMP 0x00000200
+#define WNODE_FLAG_PERSIST_EVENT 0x00000400
+#define WNODE_FLAG_EVENT_REFERENCE 0x00002000
+#define WNODE_FLAG_ANSI_INSTANCENAMES 0x00004000
+#define WNODE_FLAG_METHOD_ITEM 0x00008000
+#define WNODE_FLAG_PDO_INSTANCE_NAMES 0x00010000
+#define WNODE_FLAG_TRACED_GUID 0x00020000
+#define WNODE_FLAG_LOG_WNODE 0x00040000
+#define WNODE_FLAG_USE_GUID_PTR 0x00080000
+#define WNODE_FLAG_USE_MOF_PTR 0x00100000
+#define WNODE_FLAG_NO_HEADER 0x00200000
+#define WNODE_FLAG_SEVERITY_MASK 0xff000000
+
+typedef struct tagWNODE_TOO_SMALL
+{
+ struct _WNODE_HEADER WnodeHeader;
+ ULONG SizeNeeded;
+} WNODE_TOO_SMALL, *PWNODE_TOO_SMALL;
+
+typedef struct tagWNODE_SINGLE_INSTANCE
+{
+ struct _WNODE_HEADER WnodeHeader;
+ ULONG OffsetInstanceName;
+ ULONG InstanceIndex;
+ ULONG DataBlockOffset;
+ ULONG SizeDataBlock;
+ UCHAR VariableData[];
+} WNODE_SINGLE_INSTANCE, *PWNODE_SINGLE_INSTANCE;
+
+#define WMIREG_FLAG_EXPENSIVE 0x00000001
+#define WMIREG_FLAG_INSTANCE_LIST 0x00000004
+#define WMIREG_FLAG_INSTANCE_BASENAME 0x00000008
+#define WMIREG_FLAG_INSTANCE_PDO 0x00000020
+#define WMIREG_FLAG_REMOVE_GUID 0x00010000
+#define WMIREG_FLAG_RESERVED1 0x00020000
+#define WMIREG_FLAG_RESERVED2 0x00040000
+#define WMIREG_FLAG_TRACED_GUID 0x00080000
+#define WMIREG_FLAG_TRACE_CONTROL_GUID 0x00001000
+#define WMIREG_FLAG_EVENT_ONLY_GUID 0x00000040
+
+typedef struct
+{
+ GUID Guid;
+ ULONG Flags;
+ ULONG InstanceCount;
+ union
+ {
+ ULONG InstanceNameList;
+ ULONG BaseNameOffset;
+ ULONG_PTR Pdo;
+ ULONG_PTR InstanceInfo;
+ };
+} WMIREGGUIDW, *PWMIREGGUIDW;
+
+typedef struct
+{
+ ULONG BufferSize;
+ ULONG NextWmiRegInfo;
+ ULONG RegistryPath;
+ ULONG MofResourceName;
+ ULONG GuidCount;
+ WMIREGGUIDW WmiRegGuid[];
+} WMIREGINFOW, *PWMIREGINFOW;
+
+typedef WMIREGINFOW WMIREGINFO;
+typedef PWMIREGINFOW PWMIREGINFO;
+
+typedef struct
+{
+ ULONG OffsetInstanceData;
+ ULONG LengthInstanceData;
+} OFFSETINSTANCEDATAANDLENGTH, *POFFSETINSTANCEDATAANDLENGTH;
+
+typedef struct tagWNODE_ALL_DATA
+{
+ struct _WNODE_HEADER WnodeHeader;
+ ULONG DataBlockOffset;
+ ULONG InstanceCount;
+ ULONG OffsetInstanceNameOffsets;
+ union
+ {
+ ULONG FixedInstanceSize;
+ OFFSETINSTANCEDATAANDLENGTH OffsetInstanceDataAndLength[0];
+ };
+} WNODE_ALL_DATA, *PWNODE_ALL_DATA;
+
+typedef struct tagWNODE_SINGLE_ITEM
+{
+ struct _WNODE_HEADER WnodeHeader;
+ ULONG OffsetInstanceName;
+ ULONG InstanceIndex;
+ ULONG ItemId;
+ ULONG DataBlockOffset;
+ ULONG SizeDataItem;
+ UCHAR VariableData[];
+} WNODE_SINGLE_ITEM, *PWNODE_SINGLE_ITEM;
+
+typedef struct tagWNODE_METHOD_ITEM
+{
+ struct _WNODE_HEADER WnodeHeader;
+ ULONG OffsetInstanceName;
+ ULONG InstanceIndex;
+ ULONG MethodId;
+ ULONG DataBlockOffset;
+ ULONG SizeDataBlock;
+ UCHAR VariableData[];
+} WNODE_METHOD_ITEM, *PWNODE_METHOD_ITEM;
+
typedef enum
{
WMI_GET_ALL_DATA = 0,