diff --git a/reactos/include/ddk/classpnp.h b/reactos/include/ddk/classpnp.h index 6373cee1d07..0c66113e3e6 100644 --- a/reactos/include/ddk/classpnp.h +++ b/reactos/include/ddk/classpnp.h @@ -13,8 +13,6 @@ #include -#define DEBUG_BUFFER_LENGTH 256 - #define SRB_CLASS_FLAGS_LOW_PRIORITY 0x10000000 #define SRB_CLASS_FLAGS_PERSISTANT 0x20000000 #define SRB_CLASS_FLAGS_PAGING 0x40000000 @@ -54,6 +52,33 @@ #define ClassAcquireRemoveLock(devobj, tag) \ ClassAcquireRemoveLockEx(devobj, tag, __FILE__, __LINE__) +#ifdef TRY +#undef TRY +#endif +#ifdef LEAVE +#undef LEAVE +#endif + +#ifdef FINALLY +#undef FINALLY +#endif + +#define TRY +#define LEAVE goto __tryLabel; +#define FINALLY __tryLabel: + +#if defined DebugPrint +#undef DebugPrint +#endif + +#if DBG +#define DebugPrint(x) ClassDebugPrint x +#else +#define DebugPrint(x) +#endif + +#define DEBUG_BUFFER_LENGTH 256 + #define START_UNIT_TIMEOUT (60 * 4) #define MEDIA_CHANGE_DEFAULT_TIME 1 @@ -606,7 +631,7 @@ typedef struct _FUNCTIONAL_DEVICE_EXTENSION { LONG ProtectedLockCount; LONG InternalLockCount; KEVENT EjectSynchronizationEvent; - USHORT DeviceFlags; + USHORT DeviceFlags; UCHAR SectorShift; #if (NTDDI_VERSION >= NTDDI_VISTA) UCHAR CdbForceUnitAccess; @@ -615,7 +640,7 @@ typedef struct _FUNCTIONAL_DEVICE_EXTENSION { #endif PMEDIA_CHANGE_DETECTION_INFO MediaChangeDetectionInfo; PKEVENT Unused1; - HANDLE Unused2; + HANDLE Unused2; FILE_OBJECT_EXTENSION KernelModeMcnContext; ULONG MediaChangeCount; HANDLE DeviceDirectory; @@ -658,6 +683,7 @@ typedef struct _FUNCTIONAL_DEVICE_EXTENSION { ULONG_PTR Reserved2; ULONG_PTR Reserved3; ULONG_PTR Reserved4; + #endif /* (NTDDI_VERSION <= NTDDI_WIN2K) */ } FUNCTIONAL_DEVICE_EXTENSION, *PFUNCTIONAL_DEVICE_EXTENSION; diff --git a/reactos/include/psdk/ioevent.h b/reactos/include/psdk/ioevent.h index b87c950ccfb..fd2c720ddc4 100644 --- a/reactos/include/psdk/ioevent.h +++ b/reactos/include/psdk/ioevent.h @@ -71,6 +71,44 @@ DEFINE_GUID(GUID_IO_DISK_CLONE_ARRIVAL, DEFINE_GUID(GUID_IO_DISK_LAYOUT_CHANGE, 0x11DFF54C, 0x8469, 0x41F9, 0xB3, 0xDE, 0xEF, 0x83, 0x64, 0x87, 0xC5, 0x4A); +typedef struct _DEVICE_EVENT_MOUNT { + ULONG Version; + ULONG Flags; + ULONG FileSystemNameLength; + ULONG FileSystemNameOffset; +} DEVICE_EVENT_MOUNT, *PDEVICE_EVENT_MOUNT; + +typedef struct _DEVICE_EVENT_BECOMING_READY { + ULONG Version; + ULONG Reason; + ULONG Estimated100msToReady; +} DEVICE_EVENT_BECOMING_READY, *PDEVICE_EVENT_BECOMING_READY; + +typedef struct _DEVICE_EVENT_EXTERNAL_REQUEST { + ULONG Version; + ULONG DeviceClass; + USHORT ButtonStatus; + USHORT Request; + LARGE_INTEGER SystemTime; +} DEVICE_EVENT_EXTERNAL_REQUEST, *PDEVICE_EVENT_EXTERNAL_REQUEST; + +typedef struct _DEVICE_EVENT_GENERIC_DATA { + ULONG EventNumber; +} DEVICE_EVENT_GENERIC_DATA, *PDEVICE_EVENT_GENERIC_DATA; + +typedef struct _DEVICE_EVENT_RBC_DATA { + ULONG EventNumber; + UCHAR SenseQualifier; + UCHAR SenseCode; + UCHAR SenseKey; + UCHAR Reserved; + ULONG Information; +} DEVICE_EVENT_RBC_DATA, *PDEVICE_EVENT_RBC_DATA; + +typedef struct _GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION { + ULONG DiskNumber; +} GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION, *PGUID_IO_DISK_CLONE_ARRIVAL_INFORMATION; + #ifdef __cplusplus } #endif