mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:32:59 +00:00
[NTOSKRNL]
Add NtPlugPlayControl.PlugPlayControlQueryDeviceRelations. svn path=/trunk/; revision=68074
This commit is contained in:
parent
888c2fb967
commit
8e26f382d9
2 changed files with 47 additions and 0 deletions
|
@ -462,6 +462,15 @@ typedef struct _PLUGPLAY_CONTROL_DEPTH_DATA
|
||||||
ULONG Depth;
|
ULONG Depth;
|
||||||
} PLUGPLAY_CONTROL_DEPTH_DATA, *PPLUGPLAY_CONTROL_DEPTH_DATA;
|
} PLUGPLAY_CONTROL_DEPTH_DATA, *PPLUGPLAY_CONTROL_DEPTH_DATA;
|
||||||
|
|
||||||
|
// Class 0x10
|
||||||
|
typedef struct _PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA
|
||||||
|
{
|
||||||
|
UNICODE_STRING DeviceInstance;
|
||||||
|
ULONG Relations; // 0:EjectRelations, 1:RemovalRelations, 3:BusRelations
|
||||||
|
ULONG BufferSize;
|
||||||
|
PWCHAR Buffer;
|
||||||
|
} PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA, *PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA;
|
||||||
|
|
||||||
// Class 0x14
|
// Class 0x14
|
||||||
typedef struct _PLUGPLAY_CONTROL_RESET_DEVICE_DATA
|
typedef struct _PLUGPLAY_CONTROL_RESET_DEVICE_DATA
|
||||||
{
|
{
|
||||||
|
|
|
@ -552,6 +552,7 @@ IopDeviceStatus(PPLUGPLAY_CONTROL_STATUS_DATA StatusData)
|
||||||
{
|
{
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("Device name: '%wZ'\n", &DeviceInstance);
|
DPRINT("Device name: '%wZ'\n", &DeviceInstance);
|
||||||
|
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
|
@ -616,6 +617,16 @@ IopDeviceStatus(PPLUGPLAY_CONTROL_STATUS_DATA StatusData)
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
NTSTATUS
|
||||||
|
IopGetDeviceRelations(PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA RelationsData)
|
||||||
|
{
|
||||||
|
DPRINT("IopGetDeviceRelations() called\n");
|
||||||
|
DPRINT("Device name: %wZ\n", &RelationsData->DeviceInstance);
|
||||||
|
DPRINT("Relations: %lu\n", &RelationsData->Relations);
|
||||||
|
|
||||||
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
static NTSTATUS
|
static NTSTATUS
|
||||||
IopGetDeviceDepth(PPLUGPLAY_CONTROL_DEPTH_DATA DepthData)
|
IopGetDeviceDepth(PPLUGPLAY_CONTROL_DEPTH_DATA DepthData)
|
||||||
|
@ -673,6 +684,7 @@ IopResetDevice(PPLUGPLAY_CONTROL_RESET_DEVICE_DATA ResetDeviceData)
|
||||||
{
|
{
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT("IopResetDevice(%wZ)\n", &DeviceInstance);
|
DPRINT("IopResetDevice(%wZ)\n", &DeviceInstance);
|
||||||
|
|
||||||
/* Get the device object */
|
/* Get the device object */
|
||||||
|
@ -961,11 +973,21 @@ NtPlugPlayControl(IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass,
|
||||||
|
|
||||||
switch (PlugPlayControlClass)
|
switch (PlugPlayControlClass)
|
||||||
{
|
{
|
||||||
|
// case PlugPlayControlEnumerateDevice:
|
||||||
|
// case PlugPlayControlRegisterNewDevice:
|
||||||
|
// case PlugPlayControlDeregisterDevice:
|
||||||
|
// case PlugPlayControlInitializeDevice:
|
||||||
|
// case PlugPlayControlStartDevice:
|
||||||
|
// case PlugPlayControlUnlockDevice:
|
||||||
|
// case PlugPlayControlQueryAndRemoveDevice:
|
||||||
|
|
||||||
case PlugPlayControlUserResponse:
|
case PlugPlayControlUserResponse:
|
||||||
if (Buffer || BufferLength != 0)
|
if (Buffer || BufferLength != 0)
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
return IopRemovePlugPlayEvent();
|
return IopRemovePlugPlayEvent();
|
||||||
|
|
||||||
|
// case PlugPlayControlGenerateLegacyDevice:
|
||||||
|
|
||||||
case PlugPlayControlGetInterfaceDeviceList:
|
case PlugPlayControlGetInterfaceDeviceList:
|
||||||
if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA))
|
if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA))
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
|
@ -976,11 +998,15 @@ NtPlugPlayControl(IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass,
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
return IopGetDeviceProperty((PPLUGPLAY_CONTROL_PROPERTY_DATA)Buffer);
|
return IopGetDeviceProperty((PPLUGPLAY_CONTROL_PROPERTY_DATA)Buffer);
|
||||||
|
|
||||||
|
// case PlugPlayControlDeviceClassAssociation:
|
||||||
|
|
||||||
case PlugPlayControlGetRelatedDevice:
|
case PlugPlayControlGetRelatedDevice:
|
||||||
if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_RELATED_DEVICE_DATA))
|
if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_RELATED_DEVICE_DATA))
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
return IopGetRelatedDevice((PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA)Buffer);
|
return IopGetRelatedDevice((PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA)Buffer);
|
||||||
|
|
||||||
|
// case PlugPlayControlGetInterfaceDeviceAlias:
|
||||||
|
|
||||||
case PlugPlayControlDeviceStatus:
|
case PlugPlayControlDeviceStatus:
|
||||||
if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_STATUS_DATA))
|
if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_STATUS_DATA))
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
|
@ -991,11 +1017,23 @@ NtPlugPlayControl(IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass,
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
return IopGetDeviceDepth((PPLUGPLAY_CONTROL_DEPTH_DATA)Buffer);
|
return IopGetDeviceDepth((PPLUGPLAY_CONTROL_DEPTH_DATA)Buffer);
|
||||||
|
|
||||||
|
case PlugPlayControlQueryDeviceRelations:
|
||||||
|
if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA))
|
||||||
|
return STATUS_INVALID_PARAMETER;
|
||||||
|
return IopGetDeviceRelations((PPLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA)Buffer);
|
||||||
|
|
||||||
|
// case PlugPlayControlTargetDeviceRelation:
|
||||||
|
// case PlugPlayControlQueryConflictList:
|
||||||
|
// case PlugPlayControlRetrieveDock:
|
||||||
|
|
||||||
case PlugPlayControlResetDevice:
|
case PlugPlayControlResetDevice:
|
||||||
if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_RESET_DEVICE_DATA))
|
if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_RESET_DEVICE_DATA))
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
return IopResetDevice((PPLUGPLAY_CONTROL_RESET_DEVICE_DATA)Buffer);
|
return IopResetDevice((PPLUGPLAY_CONTROL_RESET_DEVICE_DATA)Buffer);
|
||||||
|
|
||||||
|
// case PlugPlayControlHaltDevice:
|
||||||
|
// case PlugPlayControlGetBlockedDriverList:
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue