mirror of
https://github.com/reactos/reactos.git
synced 2024-10-03 16:05:37 +00:00
[NTOSKRNL]
Add NtPlugPlayControl.PlugPlayControlQueryDeviceRelations. svn path=/trunk/; revision=68074
This commit is contained in:
parent
888c2fb967
commit
8e26f382d9
|
@ -462,6 +462,15 @@ typedef struct _PLUGPLAY_CONTROL_DEPTH_DATA
|
|||
ULONG Depth;
|
||||
} 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
|
||||
typedef struct _PLUGPLAY_CONTROL_RESET_DEVICE_DATA
|
||||
{
|
||||
|
|
|
@ -552,6 +552,7 @@ IopDeviceStatus(PPLUGPLAY_CONTROL_STATUS_DATA StatusData)
|
|||
{
|
||||
return Status;
|
||||
}
|
||||
|
||||
DPRINT("Device name: '%wZ'\n", &DeviceInstance);
|
||||
|
||||
_SEH2_TRY
|
||||
|
@ -616,6 +617,16 @@ IopDeviceStatus(PPLUGPLAY_CONTROL_STATUS_DATA StatusData)
|
|||
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
|
||||
IopGetDeviceDepth(PPLUGPLAY_CONTROL_DEPTH_DATA DepthData)
|
||||
|
@ -673,6 +684,7 @@ IopResetDevice(PPLUGPLAY_CONTROL_RESET_DEVICE_DATA ResetDeviceData)
|
|||
{
|
||||
return Status;
|
||||
}
|
||||
|
||||
DPRINT("IopResetDevice(%wZ)\n", &DeviceInstance);
|
||||
|
||||
/* Get the device object */
|
||||
|
@ -961,11 +973,21 @@ NtPlugPlayControl(IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass,
|
|||
|
||||
switch (PlugPlayControlClass)
|
||||
{
|
||||
// case PlugPlayControlEnumerateDevice:
|
||||
// case PlugPlayControlRegisterNewDevice:
|
||||
// case PlugPlayControlDeregisterDevice:
|
||||
// case PlugPlayControlInitializeDevice:
|
||||
// case PlugPlayControlStartDevice:
|
||||
// case PlugPlayControlUnlockDevice:
|
||||
// case PlugPlayControlQueryAndRemoveDevice:
|
||||
|
||||
case PlugPlayControlUserResponse:
|
||||
if (Buffer || BufferLength != 0)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
return IopRemovePlugPlayEvent();
|
||||
|
||||
// case PlugPlayControlGenerateLegacyDevice:
|
||||
|
||||
case PlugPlayControlGetInterfaceDeviceList:
|
||||
if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_INTERFACE_DEVICE_LIST_DATA))
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
@ -976,11 +998,15 @@ NtPlugPlayControl(IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass,
|
|||
return STATUS_INVALID_PARAMETER;
|
||||
return IopGetDeviceProperty((PPLUGPLAY_CONTROL_PROPERTY_DATA)Buffer);
|
||||
|
||||
// case PlugPlayControlDeviceClassAssociation:
|
||||
|
||||
case PlugPlayControlGetRelatedDevice:
|
||||
if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_RELATED_DEVICE_DATA))
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
return IopGetRelatedDevice((PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA)Buffer);
|
||||
|
||||
// case PlugPlayControlGetInterfaceDeviceAlias:
|
||||
|
||||
case PlugPlayControlDeviceStatus:
|
||||
if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_STATUS_DATA))
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
@ -991,11 +1017,23 @@ NtPlugPlayControl(IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass,
|
|||
return STATUS_INVALID_PARAMETER;
|
||||
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:
|
||||
if (!Buffer || BufferLength < sizeof(PLUGPLAY_CONTROL_RESET_DEVICE_DATA))
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
return IopResetDevice((PPLUGPLAY_CONTROL_RESET_DEVICE_DATA)Buffer);
|
||||
|
||||
// case PlugPlayControlHaltDevice:
|
||||
// case PlugPlayControlGetBlockedDriverList:
|
||||
|
||||
default:
|
||||
return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue