mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Wait the opening of mouclass device to connect the underlying mouse port driver
svn path=/trunk/; revision=15751
This commit is contained in:
parent
5a2cbdf365
commit
525d26d031
1 changed files with 4 additions and 8 deletions
|
@ -19,6 +19,8 @@
|
|||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
PDEVICE_OBJECT MouclassDeviceObject;
|
||||
|
||||
BOOLEAN MouseClassCallBack(
|
||||
PDEVICE_OBJECT ClassDeviceObject, PMOUSE_INPUT_DATA MouseDataStart,
|
||||
PMOUSE_INPUT_DATA MouseDataEnd, PULONG ConsumedCount)
|
||||
|
@ -160,7 +162,7 @@ NTSTATUS STDCALL MouseClassDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
switch (Stack->MajorFunction)
|
||||
{
|
||||
case IRP_MJ_CREATE:
|
||||
Status = STATUS_SUCCESS;
|
||||
Status = ConnectMousePortDriver(MouclassDeviceObject);
|
||||
break;
|
||||
|
||||
case IRP_MJ_CLOSE:
|
||||
|
@ -264,13 +266,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
|
|||
return Status;
|
||||
}
|
||||
|
||||
Status = ConnectMousePortDriver(DeviceObject);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
IoDeleteSymbolicLink(&SymlinkName);
|
||||
IoDeleteDevice(DeviceObject);
|
||||
return Status;
|
||||
}
|
||||
MouclassDeviceObject = DeviceObject;
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue