mirror of
https://github.com/reactos/reactos.git
synced 2024-11-27 13:33:32 +08:00
[NDK] Change the data structure for PlugPlayControlResetDevice control class
PlugPlayControlResetDevice shares the input structure with several other
control classes.
Source: ProcessHacker sources e9c8121f41/ntpnpapi.h
This commit is contained in:
parent
b66bdef370
commit
029accdcf7
@ -3081,7 +3081,7 @@ static CONFIGRET
|
||||
EnableDeviceInstance(
|
||||
_In_ LPWSTR pszDeviceInstance)
|
||||
{
|
||||
PLUGPLAY_CONTROL_RESET_DEVICE_DATA ResetDeviceData;
|
||||
PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ResetDeviceData;
|
||||
CONFIGRET ret = CR_SUCCESS;
|
||||
NTSTATUS Status;
|
||||
|
||||
@ -3091,7 +3091,7 @@ EnableDeviceInstance(
|
||||
pszDeviceInstance);
|
||||
Status = NtPlugPlayControl(PlugPlayControlResetDevice,
|
||||
&ResetDeviceData,
|
||||
sizeof(PLUGPLAY_CONTROL_RESET_DEVICE_DATA));
|
||||
sizeof(PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA));
|
||||
if (!NT_SUCCESS(Status))
|
||||
ret = NtStatusToCrError(Status);
|
||||
|
||||
|
@ -42,11 +42,11 @@ static BOOLEAN
|
||||
ResetDevice(
|
||||
IN LPCWSTR DeviceId)
|
||||
{
|
||||
PLUGPLAY_CONTROL_RESET_DEVICE_DATA ResetDeviceData;
|
||||
PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ResetDeviceData;
|
||||
NTSTATUS Status;
|
||||
|
||||
RtlInitUnicodeString(&ResetDeviceData.DeviceInstance, DeviceId);
|
||||
Status = NtPlugPlayControl(PlugPlayControlResetDevice, &ResetDeviceData, sizeof(PLUGPLAY_CONTROL_RESET_DEVICE_DATA));
|
||||
Status = NtPlugPlayControl(PlugPlayControlResetDevice, &ResetDeviceData, sizeof(PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA));
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("NtPlugPlayControl() failed with status 0x%08x\n", Status);
|
||||
|
@ -1044,7 +1044,7 @@ IopGetDeviceDepth(PPLUGPLAY_CONTROL_DEPTH_DATA DepthData)
|
||||
|
||||
|
||||
static NTSTATUS
|
||||
IopResetDevice(PPLUGPLAY_CONTROL_RESET_DEVICE_DATA ResetDeviceData)
|
||||
IopResetDevice(PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA ResetDeviceData)
|
||||
{
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
NTSTATUS Status;
|
||||
@ -1364,9 +1364,9 @@ NtPlugPlayControl(IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass,
|
||||
// case PlugPlayControlRetrieveDock:
|
||||
|
||||
case PlugPlayControlResetDevice:
|
||||
if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_RESET_DEVICE_DATA))
|
||||
if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA))
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
return IopResetDevice((PPLUGPLAY_CONTROL_RESET_DEVICE_DATA)Buffer);
|
||||
return IopResetDevice((PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA)Buffer);
|
||||
|
||||
// case PlugPlayControlHaltDevice:
|
||||
// case PlugPlayControlGetBlockedDriverList:
|
||||
|
@ -453,14 +453,26 @@ typedef struct _PLUGPLAY_EVENT_BLOCK
|
||||
// Plug and Play Control Classes
|
||||
//
|
||||
|
||||
// Class 0x00
|
||||
// PlugPlayControlEnumerateDevice (0x00)
|
||||
typedef struct _PLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA
|
||||
{
|
||||
UNICODE_STRING DeviceInstance;
|
||||
ULONG Flags;
|
||||
} PLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA, *PPLUGPLAY_CONTROL_ENUMERATE_DEVICE_DATA;
|
||||
|
||||
// Class 0x06
|
||||
// PlugPlayControlRegisterNewDevice (0x1)
|
||||
// PlugPlayControlDeregisterDevice (0x2)
|
||||
// PlugPlayControlInitializeDevice (0x3)
|
||||
// PlugPlayControlStartDevice (0x4)
|
||||
// PlugPlayControlUnlockDevice (0x5)
|
||||
// PlugPlayControlResetDevice (0x14)
|
||||
// PlugPlayControlHaltDevice (0x15)
|
||||
typedef struct _PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA
|
||||
{
|
||||
UNICODE_STRING DeviceInstance;
|
||||
} PLUGPLAY_CONTROL_DEVICE_CONTROL_DATA, *PPLUGPLAY_CONTROL_DEVICE_CONTROL_DATA;
|
||||
|
||||
// PlugPlayControlQueryAndRemoveDevice (0x06)
|
||||
typedef struct _PLUGPLAY_CONTROL_QUERY_REMOVE_DATA
|
||||
{
|
||||
UNICODE_STRING DeviceInstance;
|
||||
@ -470,7 +482,7 @@ typedef struct _PLUGPLAY_CONTROL_QUERY_REMOVE_DATA
|
||||
ULONG NameLength;
|
||||
} PLUGPLAY_CONTROL_QUERY_REMOVE_DATA, *PPLUGPLAY_CONTROL_QUERY_REMOVE_DATA;
|
||||
|
||||
// Class 0x07
|
||||
// PlugPlayControlUserResponse (0x07)
|
||||
typedef struct _PLUGPLAY_CONTROL_USER_RESPONSE_DATA
|
||||
{
|
||||
ULONG Unknown1;
|
||||
@ -479,7 +491,7 @@ typedef struct _PLUGPLAY_CONTROL_USER_RESPONSE_DATA
|
||||
ULONG Unknown4;
|
||||
} PLUGPLAY_CONTROL_USER_RESPONSE_DATA, *PPLUGPLAY_CONTROL_USER_RESPONSE_DATA;
|
||||
|
||||
// Class 0x09
|
||||
// PlugPlayControlGetInterfaceDeviceList (0x09)
|
||||
typedef struct _PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA
|
||||
{
|
||||
UNICODE_STRING DeviceInstance;
|
||||
@ -489,7 +501,7 @@ typedef struct _PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA
|
||||
ULONG BufferSize;
|
||||
} PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA, *PPLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA;
|
||||
|
||||
//Class 0x0A
|
||||
// PlugPlayControlProperty (0x0A)
|
||||
typedef struct _PLUGPLAY_CONTROL_PROPERTY_DATA
|
||||
{
|
||||
UNICODE_STRING DeviceInstance;
|
||||
@ -498,7 +510,7 @@ typedef struct _PLUGPLAY_CONTROL_PROPERTY_DATA
|
||||
ULONG BufferSize;
|
||||
} PLUGPLAY_CONTROL_PROPERTY_DATA, *PPLUGPLAY_CONTROL_PROPERTY_DATA;
|
||||
|
||||
// Class 0x0C
|
||||
// PlugPlayControlGetRelatedDevice (0x0C)
|
||||
typedef struct _PLUGPLAY_CONTROL_RELATED_DEVICE_DATA
|
||||
{
|
||||
UNICODE_STRING TargetDeviceInstance;
|
||||
@ -507,7 +519,7 @@ typedef struct _PLUGPLAY_CONTROL_RELATED_DEVICE_DATA
|
||||
ULONG RelatedDeviceInstanceLength;
|
||||
} PLUGPLAY_CONTROL_RELATED_DEVICE_DATA, *PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA;
|
||||
|
||||
// Class 0x0E
|
||||
// PlugPlayControlDeviceStatus (0x0E)
|
||||
typedef struct _PLUGPLAY_CONTOL_STATUS_DATA
|
||||
{
|
||||
UNICODE_STRING DeviceInstance;
|
||||
@ -516,14 +528,14 @@ typedef struct _PLUGPLAY_CONTOL_STATUS_DATA
|
||||
ULONG DeviceProblem;
|
||||
} PLUGPLAY_CONTROL_STATUS_DATA, *PPLUGPLAY_CONTROL_STATUS_DATA;
|
||||
|
||||
// Class 0x0F
|
||||
// PlugPlayControlGetDeviceDepth (0x0F)
|
||||
typedef struct _PLUGPLAY_CONTROL_DEPTH_DATA
|
||||
{
|
||||
UNICODE_STRING DeviceInstance;
|
||||
ULONG Depth;
|
||||
} PLUGPLAY_CONTROL_DEPTH_DATA, *PPLUGPLAY_CONTROL_DEPTH_DATA;
|
||||
|
||||
// Class 0x10
|
||||
// PlugPlayControlQueryDeviceRelations (0x10)
|
||||
typedef struct _PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA
|
||||
{
|
||||
UNICODE_STRING DeviceInstance;
|
||||
@ -532,19 +544,13 @@ typedef struct _PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA
|
||||
PWCHAR Buffer;
|
||||
} PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA, *PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA;
|
||||
|
||||
// Class 0x13
|
||||
// PlugPlayControlRetrieveDock (0x13)
|
||||
typedef struct _PLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA
|
||||
{
|
||||
ULONG DeviceInstanceLength;
|
||||
PWSTR DeviceInstance;
|
||||
} PLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA, *PPLUGPLAY_CONTROL_RETRIEVE_DOCK_DATA;
|
||||
|
||||
// Class 0x14
|
||||
typedef struct _PLUGPLAY_CONTROL_RESET_DEVICE_DATA
|
||||
{
|
||||
UNICODE_STRING DeviceInstance;
|
||||
} PLUGPLAY_CONTROL_RESET_DEVICE_DATA, *PPLUGPLAY_CONTROL_RESET_DEVICE_DATA;
|
||||
|
||||
//
|
||||
// Plug and Play Bus Type Definition
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user