- Move definitions from ntpnp.h into NDK and DDK
- Remove ntpnp.h
Deleted: trunk/reactos/include/ddk/ntpnp.h
Modified: trunk/reactos/include/ndk/zwfuncs.h
Modified: trunk/reactos/include/ndk/zwtypes.h
Modified: trunk/reactos/lib/wdmguid/wdmguid.c
Modified: trunk/reactos/ntoskrnl/include/ntoskrnl.h
Modified: trunk/reactos/ntoskrnl/io/plugplay.c
Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c
Modified: trunk/reactos/w32api/include/ddk/wdmguid.h
_____
Deleted: trunk/reactos/include/ddk/ntpnp.h
--- trunk/reactos/include/ddk/ntpnp.h 2005-07-03 13:49:05 UTC (rev
16392)
+++ trunk/reactos/include/ddk/ntpnp.h 2005-07-03 15:21:19 UTC (rev
16393)
@@ -1,277 +0,0 @@
-/*
- * ntpnp.h
- *
- * Plug-and-play interface routines
- *
- * Contributors:
- * Created by Filip Navara <xnavara(a)volny.cz>
- *
- * THIS SOFTWARE IS NOT COPYRIGHTED
- *
- * This source code is offered for use in the public domain. You may
- * use, modify or distribute it freely.
- *
- * This code is distributed in the hope that it will be useful but
- * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAIMED. This includes but is not limited to warranties of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef __NTPNP_H
-#define __NTPNP_H
-
-#include <ddk/cfg.h>
-
-/*
- * TODO:
- * - Describe the undocumented GUIDs.
- * - Finish the description of NtPlugPlayControl.
- */
-
-/*
- * Undocumented GUIDs used by NtGetPlugPlayEvent.
- */
-
-DEFINE_GUID(GUID_DEVICE_STANDBY_VETOED, 0x03B21C13, 0x18D6, 0x11D3,
0x97, 0xDB, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
-DEFINE_GUID(GUID_DEVICE_KERNEL_INITIATED_EJECT, 0x14689B54, 0x0703,
0x11D3, 0x97, 0xD2, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
-DEFINE_GUID(GUID_DEVICE_THERMAL_ZONE, 0x4AFA3D51, 0x74A7, 0x11D0, 0xBE,
0x5E, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57);
-DEFINE_GUID(GUID_DEVICE_SYS_BUTTON, 0x4AFA3D53, 0x74A7, 0x11D0, 0xBE,
0x5E, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57);
-DEFINE_GUID(GUID_DEVICE_REMOVAL_VETOED, 0x60DBD5FA, 0xDDD2, 0x11D2,
0x97, 0xB8, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
-DEFINE_GUID(GUID_DEVICE_HIBERNATE_VETOED, 0x61173AD9, 0x194F, 0x11D3,
0x97, 0xDC, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
-DEFINE_GUID(GUID_DEVICE_BATTERY, 0x72631E54, 0x78A4, 0x11D0, 0xBC,
0xF7, 0x00, 0xAA, 0x00, 0xB7, 0xB3, 0x2A);
-DEFINE_GUID(GUID_DEVICE_SAFE_REMOVAL, 0x8FBEF967, 0xD6C5, 0x11D2, 0x97,
0xB5, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
-#ifndef __USE_W32API
-DEFINE_GUID(GUID_DEVICE_INTERFACE_ARRIVAL, 0xCB3A4004, 0x46F0, 0x11D0,
0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
-DEFINE_GUID(GUID_DEVICE_INTERFACE_REMOVAL, 0xCB3A4005, 0x46F0, 0x11D0,
0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
-#endif
-DEFINE_GUID(GUID_DEVICE_ARRIVAL, 0xCB3A4009, 0x46F0, 0x11D0, 0xB0,
0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
-DEFINE_GUID(GUID_DEVICE_ENUMERATED, 0xCB3A400A, 0x46F0, 0x11D0, 0xB0,
0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
-DEFINE_GUID(GUID_DEVICE_ENUMERATE_REQUEST, 0xCB3A400B, 0x46F0, 0x11D0,
0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
-DEFINE_GUID(GUID_DEVICE_START_REQUEST, 0xCB3A400C, 0x46F0, 0x11D0,
0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
-DEFINE_GUID(GUID_DEVICE_REMOVE_PENDING, 0xCB3A400D, 0x46F0, 0x11D0,
0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
-DEFINE_GUID(GUID_DEVICE_QUERY_AND_REMOVE, 0xCB3A400E, 0x46F0, 0x11D0,
0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
-DEFINE_GUID(GUID_DEVICE_EJECT, 0xCB3A400F, 0x46F0, 0x11D0, 0xB0, 0x8F,
0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
-DEFINE_GUID(GUID_DEVICE_NOOP, 0xCB3A4010, 0x46F0, 0x11D0, 0xB0, 0x8F,
0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
-DEFINE_GUID(GUID_DEVICE_WARM_EJECT_VETOED, 0xCBF4C1F9, 0x18D5, 0x11D3,
0x97, 0xDB, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
-DEFINE_GUID(GUID_DEVICE_SURPRISE_REMOVAL, 0xCE5AF000, 0x80DD, 0x11D2,
0xA8, 0x8D, 0x00, 0xA0, 0xC9, 0x69, 0x6B, 0x4B);
-DEFINE_GUID(GUID_DEVICE_EJECT_VETOED, 0xCF7B71E8, 0xD8FD, 0x11D2, 0x97,
0xB5, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
-DEFINE_GUID(GUID_DEVICE_EVENT_RBC, 0xD0744792, 0xA98E, 0x11D2, 0x91,
0x7A, 0x00, 0xA0, 0xC9, 0x06, 0x8F, 0xF3);
-
-
-#ifndef __GUIDS_ONLY__ /* This is defined to build libwdmguid.a */
-
-typedef enum _PLUGPLAY_EVENT_CATEGORY
-{
- HardwareProfileChangeEvent,
- TargetDeviceChangeEvent,
- DeviceClassChangeEvent,
- CustomDeviceEvent,
- DeviceInstallEvent,
- DeviceArrivalEvent,
- PowerEvent,
- VetoEvent,
- BlockedDriverEvent,
- MaxPlugEventCategory
-} PLUGPLAY_EVENT_CATEGORY;
-
-/*
- * Plug and Play event structure used by NtGetPlugPlayEvent.
- *
- * EventGuid
- * Can be one of the following values:
- * GUID_HWPROFILE_QUERY_CHANGE
- * GUID_HWPROFILE_CHANGE_CANCELLED
- * GUID_HWPROFILE_CHANGE_COMPLETE
- * GUID_TARGET_DEVICE_QUERY_REMOVE
- * GUID_TARGET_DEVICE_REMOVE_CANCELLED
- * GUID_TARGET_DEVICE_REMOVE_COMPLETE
- * GUID_PNP_CUSTOM_NOTIFICATION
- * GUID_PNP_POWER_NOTIFICATION
- * GUID_DEVICE_* (see above)
- *
- * EventCategory
- * Type of the event that happened.
- *
- * Result
- * ?
- *
- * Flags
- * ?
- *
- * TotalSize
- * Size of the event block including the device IDs and other
- * per category specific fields.
- */
-
-typedef struct _PLUGPLAY_EVENT_BLOCK {
- GUID EventGuid;
- PLUGPLAY_EVENT_CATEGORY EventCategory;
- PULONG Result;
- ULONG Flags;
- ULONG TotalSize;
- PVOID DeviceObject;
- union {
- struct {
- GUID ClassGuid;
- WCHAR SymbolicLinkName[ANYSIZE_ARRAY];
- } DeviceClass;
- struct {
- WCHAR DeviceIds[ANYSIZE_ARRAY];
- } TargetDevice;
- struct {
- WCHAR DeviceId[ANYSIZE_ARRAY];
- } InstallDevice;
- struct {
- PVOID NotificationStructure;
- WCHAR DeviceIds[ANYSIZE_ARRAY];
- } CustomNotification;
- struct {
- PVOID Notification;
- } ProfileNotification;
- struct {
- ULONG NotificationCode;
- ULONG NotificationData;
- } PowerNotification;
- struct {
- PNP_VETO_TYPE VetoType;
- WCHAR DeviceIdVetoNameBuffer[ANYSIZE_ARRAY];
- } VetoNotification;
- struct {
- GUID BlockedDriverGuid;
- } BlockedDriverNotification;
- };
-} PLUGPLAY_EVENT_BLOCK, *PPLUGPLAY_EVENT_BLOCK;
-
-/*
- * NtGetPlugPlayEvent
- *
- * Returns one Plug & Play event from a global queue.
- *
- * Parameters
- * Reserved1
- * Reserved2
- * Always set to zero.
- *
- * Buffer
- * The buffer that will be filled with the event information on
- * successful return from the function.
- *
- * BufferSize
- * Size of the buffer pointed by the Buffer parameter. If the
- * buffer size is not large enough to hold the whole event
- * information, error STATUS_BUFFER_TOO_SMALL is returned and
- * the buffer remains untouched.
- *
- * Return Values
- * STATUS_PRIVILEGE_NOT_HELD
- * STATUS_BUFFER_TOO_SMALL
- * STATUS_SUCCESS
- *
- * Remarks
- * This function isn't multi-thread safe!
-NTSTATUS STDCALL
-NtGetPlugPlayEvent(
- ULONG Reserved1,
- ULONG Reserved2,
- PPLUGPLAY_EVENT_BLOCK Buffer,
- ULONG BufferSize);
- */
-
-/*
- * NtPlugPlayControl
- *
- * A function for doing various Plug & Play operations from user mode.
- *
- * Parameters
- * ControlCode
- * 0x00 Reenumerate device tree
- *
- * Buffer points to UNICODE_STRING decribing the instance
- * path (like "HTREE\ROOT\0" or "Root\ACPI_HAL\0000").
For
- * more information about instance paths see !devnode
command
- * in kernel debugger or look at "Inside Windows 2000"
book,
- * chapter "Driver Loading, Initialization, and
Installation".
- *
- * 0x01 Register new device
- * 0x02 Deregister device
- * 0x03 Initialize device
- * 0x04 Start device
- * 0x06 Query and remove device
- * 0x07 User response
- *
- * Called after processing the message from
NtGetPlugPlayEvent.
- *
- * 0x08 Generate legacy device
- * 0x09 Get interface device list
- * 0x0A Get property data
- * 0x0B Device class association (Registration)
- * 0x0C Get related device
- * 0x0D Get device interface alias
- * 0x0E Get/set/clear device status
- * 0x0F Get device depth
- * 0x10 Query device relations
- * 0x11 Query target device relation
- * 0x12 Query conflict list
- * 0x13 Retrieve dock data
- * 0x14 Reset device
- * 0x15 Halt device
- * 0x16 Get blocked driver data
- *
- * Buffer
- * The buffer contains information that is specific to each
control
- * code. The buffer is read-only.
- *
- * BufferSize
- * Size of the buffer pointed by the Buffer parameter. If the
- * buffer size specifies incorrect value for specified control
- * code, error ??? is returned.
- *
- * Return Values
- * STATUS_PRIVILEGE_NOT_HELD
- * STATUS_SUCCESS
- * ...
- */
-
-typedef struct _PLUGPLAY_CONTROL_PROPERTY_DATA
-{
- UNICODE_STRING DeviceInstance;
- ULONG Property;
- PVOID Buffer;
- ULONG BufferSize;
-} PLUGPLAY_CONTROL_PROPERTY_DATA, *PPLUGPLAY_CONTROL_PROPERTY_DATA;
-
-
-/* PLUGPLAY_GET_RELATED_DEVICE (Code 0x0C) */
-
-/* Relation values */
-#define PNP_GET_PARENT_DEVICE 1
-#define PNP_GET_CHILD_DEVICE 2
-#define PNP_GET_SIBLING_DEVICE 3
-
-typedef struct _PLUGPLAY_CONTROL_RELATED_DEVICE_DATA
-{
- UNICODE_STRING TargetDeviceInstance;
- ULONG Relation; /* 1: Parent 2: Child 3: Sibling */
- UNICODE_STRING RelatedDeviceInstance;
-} PLUGPLAY_CONTROL_RELATED_DEVICE_DATA,
*PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA;
-
-
-/* PLUGPLAY_DEVICE_STATUS (Code 0x0E) */
-
-/* Operation values */
-#define PNP_GET_DEVICE_STATUS 0
-#define PNP_SET_DEVICE_STATUS 1
-#define PNP_CLEAR_DEVICE_STATUS 2
-
-
-typedef struct _PLUGPLAY_CONTOL_STATUS_DATA
-{
- UNICODE_STRING DeviceInstance;
- ULONG Operation; /* 0: Get 1: Set 2: Clear */
- ULONG DeviceStatus; /* DN_ see cfg.h */
- ULONG DeviceProblem; /* CM_PROB_ see cfg.h */
-} PLUGPLAY_CONTROL_STATUS_DATA, *PPLUGPLAY_CONTROL_STATUS_DATA;
-
-#endif /* __GUIDS_ONLY__ */
-
-#endif /* __NTPNP_H */
_____
Modified: trunk/reactos/include/ndk/zwfuncs.h
--- trunk/reactos/include/ndk/zwfuncs.h 2005-07-03 13:49:05 UTC (rev
16392)
+++ trunk/reactos/include/ndk/zwfuncs.h 2005-07-03 15:21:19 UTC (rev
16393)
@@ -1220,10 +1220,10 @@
NTSTATUS
STDCALL
NtGetPlugPlayEvent(
- ULONG Reserved1,
- ULONG Reserved2,
- struct _PLUGPLAY_EVENT_BLOCK *Buffer,
- ULONG BufferSize
+ IN ULONG Reserved1,
+ IN ULONG Reserved2,
+ OUT PPLUGPLAY_EVENT_BLOCK Buffer,
+ IN ULONG BufferSize
);
ULONG
_____
Modified: trunk/reactos/include/ndk/zwtypes.h
--- trunk/reactos/include/ndk/zwtypes.h 2005-07-03 13:49:05 UTC (rev
16392)
+++ trunk/reactos/include/ndk/zwtypes.h 2005-07-03 15:21:19 UTC (rev
16393)
@@ -37,6 +37,16 @@
#define DOSDEVICE_DRIVE_CDROM 5
#define DOSDEVICE_DRIVE_RAMDISK 6
+/* PLUGPLAY_CONTROL_RELATED_DEVICE_DATA.Relation values */
+#define PNP_GET_PARENT_DEVICE 1
+#define PNP_GET_CHILD_DEVICE 2
+#define PNP_GET_SIBLING_DEVICE 3
+
+/* PLUGPLAY_CONTROL_STATUS_DATA.Operation values */
+#define PNP_GET_DEVICE_STATUS 0
+#define PNP_SET_DEVICE_STATUS 1
+#define PNP_CLEAR_DEVICE_STATUS 2
+
/* ENUMERATIONS
**************************************************************/
typedef enum _HARDERROR_RESPONSE_OPTION
@@ -63,7 +73,7 @@
ResponseYes
} HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
-typedef enum SHUTDOWN_ACTION_TAG
+typedef enum _SHUTDOWN_ACTION
{
ShutdownNoReboot,
ShutdownReboot,
@@ -90,6 +100,20 @@
SystemDocked
} SYSTEM_DOCK_STATE, *PSYSTEM_DOCK_STATE;
+typedef enum _PLUGPLAY_EVENT_CATEGORY
+{
+ HardwareProfileChangeEvent,
+ TargetDeviceChangeEvent,
+ DeviceClassChangeEvent,
+ CustomDeviceEvent,
+ DeviceInstallEvent,
+ DeviceArrivalEvent,
+ PowerEvent,
+ VetoEvent,
+ BlockedDriverEvent,
+ MaxPlugEventCategory
+} PLUGPLAY_EVENT_CATEGORY;
+
/**** Information Classes ****/
/*
@@ -218,7 +242,8 @@
/*
* Timer
*/
-typedef enum _TIMER_INFORMATION_CLASS {
+typedef enum _TIMER_INFORMATION_CLASS
+{
TimerBasicInformation
} TIMER_INFORMATION_CLASS;
@@ -261,8 +286,84 @@
typedef unsigned short LANGID;
typedef LANGID *PLANGID;
-struct _PLUGPLAY_EVENT_BLOCK; /* FIXME: Ask Filip if it's OK to define
it */
+/*
+ * Plug and Play event structure used by NtGetPlugPlayEvent.
+ *
+ * EventGuid
+ * Can be one of the following values:
+ * GUID_HWPROFILE_QUERY_CHANGE
+ * GUID_HWPROFILE_CHANGE_CANCELLED
+ * GUID_HWPROFILE_CHANGE_COMPLETE
+ * GUID_TARGET_DEVICE_QUERY_REMOVE
+ * GUID_TARGET_DEVICE_REMOVE_CANCELLED
+ * GUID_TARGET_DEVICE_REMOVE_COMPLETE
+ * GUID_PNP_CUSTOM_NOTIFICATION
+ * GUID_PNP_POWER_NOTIFICATION
+ * GUID_DEVICE_* (see above)
+ *
+ * EventCategory
+ * Type of the event that happened.
+ *
+ * Result
+ * ?
+ *
+ * Flags
+ * ?
+ *
+ * TotalSize
+ * Size of the event block including the device IDs and other
+ * per category specific fields.
+ */
+typedef struct _PLUGPLAY_EVENT_BLOCK
+{
+ GUID EventGuid;
+ PLUGPLAY_EVENT_CATEGORY EventCategory;
+ PULONG Result;
+ ULONG Flags;
+ ULONG TotalSize;
+ PVOID DeviceObject;
+ union
+ {
+ struct
+ {
+ GUID ClassGuid;
+ WCHAR SymbolicLinkName[ANYSIZE_ARRAY];
+ } DeviceClass;
+ struct
+ {
+ WCHAR DeviceIds[ANYSIZE_ARRAY];
+ } TargetDevice;
+ struct
+ {
+ WCHAR DeviceId[ANYSIZE_ARRAY];
+ } InstallDevice;
+ struct
+ {
+ PVOID NotificationStructure;
+ WCHAR DeviceIds[ANYSIZE_ARRAY];
+ } CustomNotification;
+ struct
+ {
+ PVOID Notification;
+ } ProfileNotification;
+ struct
+ {
+ ULONG NotificationCode;
+ ULONG NotificationData;
+ } PowerNotification;
+ struct
+ {
+ PNP_VETO_TYPE VetoType;
+ WCHAR DeviceIdVetoNameBuffer[ANYSIZE_ARRAY];
+ } VetoNotification;
+ struct
+ {
+ GUID BlockedDriverGuid;
+ } BlockedDriverNotification;
+ };
+} PLUGPLAY_EVENT_BLOCK, *PPLUGPLAY_EVENT_BLOCK;
+
/**** Information Structures ****/
/*
* Mutant
@@ -296,7 +397,8 @@
*/
/* Class 0 */
-typedef struct _ATOM_BASIC_INFORMATION {
+typedef struct _ATOM_BASIC_INFORMATION
+{
USHORT UsageCount;
USHORT Flags;
USHORT NameLength;
@@ -1017,7 +1119,8 @@
} SYSTEM_KERNEL_DEBUGGER_INFORMATION,
*PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
/* Class 36 */
-typedef struct _SYSTEM_CONTEXT_SWITCH_INFORMATION {
+typedef struct _SYSTEM_CONTEXT_SWITCH_INFORMATION
+{
ULONG ContextSwitches;
ULONG FindAny;
ULONG FindLast;
@@ -1152,5 +1255,34 @@
/* Class 54-81 */
/* FIXME */
+/*
+ * PlugPlay
+ */
+/* Class 0x0A */
+typedef struct _PLUGPLAY_CONTROL_PROPERTY_DATA
+{
+ UNICODE_STRING DeviceInstance;
+ ULONG Property;
+ PVOID Buffer;
+ ULONG BufferSize;
+} PLUGPLAY_CONTROL_PROPERTY_DATA, *PPLUGPLAY_CONTROL_PROPERTY_DATA;
+
+/* Class 0x0C */
+typedef struct _PLUGPLAY_CONTROL_RELATED_DEVICE_DATA
+{
+ UNICODE_STRING TargetDeviceInstance;
+ ULONG Relation; /* 1: Parent 2: Child 3: Sibling */
+ UNICODE_STRING RelatedDeviceInstance;
+} PLUGPLAY_CONTROL_RELATED_DEVICE_DATA,
*PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA;
+
+/* Class 0x0E */
+typedef struct _PLUGPLAY_CONTOL_STATUS_DATA
+{
+ UNICODE_STRING DeviceInstance;
+ ULONG Operation; /* 0: Get 1: Set 2: Clear */
+ ULONG DeviceStatus; /* DN_ see cfg.h */
+ ULONG DeviceProblem; /* CM_PROB_ see cfg.h */
+} PLUGPLAY_CONTROL_STATUS_DATA, *PPLUGPLAY_CONTROL_STATUS_DATA;
+
#endif
_____
Modified: trunk/reactos/lib/wdmguid/wdmguid.c
--- trunk/reactos/lib/wdmguid/wdmguid.c 2005-07-03 13:49:05 UTC (rev
16392)
+++ trunk/reactos/lib/wdmguid/wdmguid.c 2005-07-03 15:21:19 UTC (rev
16393)
@@ -5,7 +5,5 @@
#include "initguid.h"
#include <ddk/wdmguid.h>
-#define __GUIDS_ONLY__
-#include <ddk/ntpnp.h>
/* EOF */
_____
Modified: trunk/reactos/ntoskrnl/include/ntoskrnl.h
--- trunk/reactos/ntoskrnl/include/ntoskrnl.h 2005-07-03 13:49:05 UTC
(rev 16392)
+++ trunk/reactos/ntoskrnl/include/ntoskrnl.h 2005-07-03 15:21:19 UTC
(rev 16393)
@@ -18,7 +18,6 @@
#include <ddk/ntddk.h>
#include <ddk/ntifs.h>
#include <ddk/wdmguid.h>
-#include <ddk/ntpnp.h>
#include <ndk/ntndk.h>
#undef IO_TYPE_FILE
#define IO_TYPE_FILE 0x0F5L /* Temp Hack */
_____
Modified: trunk/reactos/ntoskrnl/io/plugplay.c
--- trunk/reactos/ntoskrnl/io/plugplay.c 2005-07-03 13:49:05 UTC
(rev 16392)
+++ trunk/reactos/ntoskrnl/io/plugplay.c 2005-07-03 15:21:19 UTC
(rev 16393)
@@ -104,13 +104,40 @@
/*
+ * NtGetPlugPlayEvent
+ *
+ * Returns one Plug & Play event from a global queue.
+ *
+ * Parameters
+ * Reserved1
+ * Reserved2
+ * Always set to zero.
+ *
+ * Buffer
+ * The buffer that will be filled with the event information on
+ * successful return from the function.
+ *
+ * BufferSize
+ * Size of the buffer pointed by the Buffer parameter. If the
+ * buffer size is not large enough to hold the whole event
+ * information, error STATUS_BUFFER_TOO_SMALL is returned and
+ * the buffer remains untouched.
+ *
+ * Return Values
+ * STATUS_PRIVILEGE_NOT_HELD
+ * STATUS_BUFFER_TOO_SMALL
+ * STATUS_SUCCESS
+ *
+ * Remarks
+ * This function isn't multi-thread safe!
+ *
* @implemented
*/
NTSTATUS STDCALL
NtGetPlugPlayEvent(IN ULONG Reserved1,
IN ULONG Reserved2,
OUT PPLUGPLAY_EVENT_BLOCK Buffer,
- IN ULONG BufferLength)
+ IN ULONG BufferSize)
{
PPNP_EVENT_ENTRY Entry;
NTSTATUS Status;
@@ -151,7 +178,7 @@
ListEntry);
/* Check the buffer size */
- if (BufferLength < Entry->Event.TotalSize)
+ if (BufferSize < Entry->Event.TotalSize)
{
DPRINT1("Buffer is too small for the pnp-event\n");
return STATUS_BUFFER_TOO_SMALL;
@@ -419,6 +446,59 @@
/*
+ * NtPlugPlayControl
+ *
+ * A function for doing various Plug & Play operations from user mode.
+ *
+ * Parameters
+ * PlugPlayControlClass
+ * 0x00 Reenumerate device tree
+ *
+ * Buffer points to UNICODE_STRING decribing the instance
+ * path (like "HTREE\ROOT\0" or "Root\ACPI_HAL\0000").
For
+ * more information about instance paths see !devnode
command
+ * in kernel debugger or look at "Inside Windows 2000"
book,
+ * chapter "Driver Loading, Initialization, and
Installation".
+ *
+ * 0x01 Register new device
+ * 0x02 Deregister device
+ * 0x03 Initialize device
+ * 0x04 Start device
+ * 0x06 Query and remove device
+ * 0x07 User response
+ *
+ * Called after processing the message from
NtGetPlugPlayEvent.
+ *
+ * 0x08 Generate legacy device
+ * 0x09 Get interface device list
+ * 0x0A Get property data
+ * 0x0B Device class association (Registration)
+ * 0x0C Get related device
+ * 0x0D Get device interface alias
+ * 0x0E Get/set/clear device status
+ * 0x0F Get device depth
+ * 0x10 Query device relations
+ * 0x11 Query target device relation
+ * 0x12 Query conflict list
+ * 0x13 Retrieve dock data
+ * 0x14 Reset device
+ * 0x15 Halt device
+ * 0x16 Get blocked driver data
+ *
+ * Buffer
+ * The buffer contains information that is specific to each
control
+ * code. The buffer is read-only.
+ *
+ * BufferSize
+ * Size of the buffer pointed by the Buffer parameter. If the
+ * buffer size specifies incorrect value for specified control
+ * code, error ??? is returned.
+ *
+ * Return Values
+ * STATUS_PRIVILEGE_NOT_HELD
+ * STATUS_SUCCESS
+ * ...
+ *
* @unimplemented
*/
NTSTATUS STDCALL
_____
Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c
--- trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-07-03 13:49:05 UTC
(rev 16392)
+++ trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-07-03 15:21:19 UTC
(rev 16393)
@@ -16,8 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id$
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: services/umpnpmgr/umpnpmgr.c
@@ -31,7 +30,6 @@
#define NTOS_MODE_USER
#include <ndk/ntndk.h>
#include <ddk/wdmguid.h>
-#include <ddk/ntpnp.h>
#include <rpc.h>
#include <rpcdce.h>
_____
Modified: trunk/reactos/w32api/include/ddk/wdmguid.h
--- trunk/reactos/w32api/include/ddk/wdmguid.h 2005-07-03 13:49:05 UTC
(rev 16392)
+++ trunk/reactos/w32api/include/ddk/wdmguid.h 2005-07-03 15:21:19 UTC
(rev 16393)
@@ -115,4 +115,26 @@
DEFINE_GUID(GUID_POWER_DEVICE_WAKE_ENABLE,
0xa9546a82L, 0xfeb0, 0x11d0, 0xbd, 0x26, 0x00, 0xaa, 0x00, 0xb7,
0xb3, 0x2a);
+DEFINE_GUID(GUID_DEVICE_STANDBY_VETOED, 0x03B21C13, 0x18D6, 0x11D3,
0x97, 0xDB, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
+DEFINE_GUID(GUID_DEVICE_KERNEL_INITIATED_EJECT, 0x14689B54, 0x0703,
0x11D3, 0x97, 0xD2, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
+DEFINE_GUID(GUID_DEVICE_THERMAL_ZONE, 0x4AFA3D51, 0x74A7, 0x11D0, 0xBE,
0x5E, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57);
+DEFINE_GUID(GUID_DEVICE_SYS_BUTTON, 0x4AFA3D53, 0x74A7, 0x11D0, 0xBE,
0x5E, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57);
+DEFINE_GUID(GUID_DEVICE_REMOVAL_VETOED, 0x60DBD5FA, 0xDDD2, 0x11D2,
0x97, 0xB8, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
+DEFINE_GUID(GUID_DEVICE_HIBERNATE_VETOED, 0x61173AD9, 0x194F, 0x11D3,
0x97, 0xDC, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
+DEFINE_GUID(GUID_DEVICE_BATTERY, 0x72631E54, 0x78A4, 0x11D0, 0xBC,
0xF7, 0x00, 0xAA, 0x00, 0xB7, 0xB3, 0x2A);
+DEFINE_GUID(GUID_DEVICE_SAFE_REMOVAL, 0x8FBEF967, 0xD6C5, 0x11D2, 0x97,
0xB5, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
+
+DEFINE_GUID(GUID_DEVICE_ARRIVAL, 0xCB3A4009, 0x46F0, 0x11D0, 0xB0,
0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_ENUMERATED, 0xCB3A400A, 0x46F0, 0x11D0, 0xB0,
0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_ENUMERATE_REQUEST, 0xCB3A400B, 0x46F0, 0x11D0,
0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_START_REQUEST, 0xCB3A400C, 0x46F0, 0x11D0,
0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_REMOVE_PENDING, 0xCB3A400D, 0x46F0, 0x11D0,
0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_QUERY_AND_REMOVE, 0xCB3A400E, 0x46F0, 0x11D0,
0xB0, 0x8F, 0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_EJECT, 0xCB3A400F, 0x46F0, 0x11D0, 0xB0, 0x8F,
0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_NOOP, 0xCB3A4010, 0x46F0, 0x11D0, 0xB0, 0x8F,
0x00, 0x60, 0x97, 0x13, 0x05, 0x3F);
+DEFINE_GUID(GUID_DEVICE_WARM_EJECT_VETOED, 0xCBF4C1F9, 0x18D5, 0x11D3,
0x97, 0xDB, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
+DEFINE_GUID(GUID_DEVICE_SURPRISE_REMOVAL, 0xCE5AF000, 0x80DD, 0x11D2,
0xA8, 0x8D, 0x00, 0xA0, 0xC9, 0x69, 0x6B, 0x4B);
+DEFINE_GUID(GUID_DEVICE_EJECT_VETOED, 0xCF7B71E8, 0xD8FD, 0x11D2, 0x97,
0xB5, 0x00, 0xA0, 0xC9, 0x40, 0x52, 0x2E);
+DEFINE_GUID(GUID_DEVICE_EVENT_RBC, 0xD0744792, 0xA98E, 0x11D2, 0x91,
0x7A, 0x00, 0xA0, 0xC9, 0x06, 0x8F, 0xF3);
+
#endif /* __WDMGUID_H */