mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Hervé Poussineau <poussine@freesurf.fr>
No need to create \??\Mouse symlink in mouse driver, it's done in mouclass. svn path=/trunk/; revision=13323
This commit is contained in:
parent
0053497f82
commit
5546cc5fd3
2 changed files with 2 additions and 27 deletions
|
@ -177,7 +177,6 @@ AllocatePointerDevice(PDRIVER_OBJECT DriverObject)
|
||||||
PDEVICE_OBJECT DeviceObject;
|
PDEVICE_OBJECT DeviceObject;
|
||||||
UNICODE_STRING DeviceName;
|
UNICODE_STRING DeviceName;
|
||||||
UNICODE_STRING SuffixString;
|
UNICODE_STRING SuffixString;
|
||||||
UNICODE_STRING SymlinkName;
|
|
||||||
PDEVICE_EXTENSION DeviceExtension;
|
PDEVICE_EXTENSION DeviceExtension;
|
||||||
ULONG Suffix;
|
ULONG Suffix;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
@ -213,25 +212,16 @@ AllocatePointerDevice(PDRIVER_OBJECT DriverObject)
|
||||||
}
|
}
|
||||||
|
|
||||||
ExFreePool(DeviceName.Buffer);
|
ExFreePool(DeviceName.Buffer);
|
||||||
|
ExFreePool(SuffixString.Buffer);
|
||||||
|
|
||||||
/* Couldn't create device */
|
/* Couldn't create device */
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
ExFreePool(SuffixString.Buffer);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
DeviceObject->Flags = DeviceObject->Flags | DO_BUFFERED_IO;
|
DeviceObject->Flags = DeviceObject->Flags | DO_BUFFERED_IO;
|
||||||
|
|
||||||
/* Create symlink */
|
|
||||||
RtlInitUnicodeString(&SymlinkName, NULL);
|
|
||||||
SymlinkName.MaximumLength = sizeof(L"\\??\\Mouse") + SUFFIX_MAXIMUM_SIZE + sizeof(UNICODE_NULL);
|
|
||||||
SymlinkName.Buffer = ExAllocatePool(PagedPool, SymlinkName.MaximumLength);
|
|
||||||
RtlAppendUnicodeToString(&SymlinkName, L"\\??\\Mouse");
|
|
||||||
RtlAppendUnicodeToString(&DeviceName, SuffixString.Buffer);
|
|
||||||
IoCreateSymbolicLink(&SymlinkName, &DeviceName);
|
|
||||||
ExFreePool(SuffixString.Buffer);
|
|
||||||
|
|
||||||
DeviceExtension = DeviceObject->DeviceExtension;
|
DeviceExtension = DeviceObject->DeviceExtension;
|
||||||
KeInitializeDpc(&DeviceExtension->IsrDpc, (PKDEFERRED_ROUTINE)PS2MouseIsrDpc, DeviceObject);
|
KeInitializeDpc(&DeviceExtension->IsrDpc, (PKDEFERRED_ROUTINE)PS2MouseIsrDpc, DeviceObject);
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
#define SERMOUSE_COM1_SUPPORT
|
#define SERMOUSE_COM1_SUPPORT
|
||||||
/* Check for mouse on COM2? */
|
/* Check for mouse on COM2? */
|
||||||
/* #define SERMOUSE_COM2_SUPPORT */
|
/* #define SERMOUSE_COM2_SUPPORT */
|
||||||
/* Create \??\Mouse* symlink for device? */
|
|
||||||
#define SERMOUSE_MOUSESYMLINK_SUPPORT
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Definitions
|
* Definitions
|
||||||
|
@ -511,7 +509,6 @@ AllocatePointerDevice(PDRIVER_OBJECT DriverObject)
|
||||||
PDEVICE_OBJECT DeviceObject;
|
PDEVICE_OBJECT DeviceObject;
|
||||||
UNICODE_STRING DeviceName;
|
UNICODE_STRING DeviceName;
|
||||||
UNICODE_STRING SuffixString;
|
UNICODE_STRING SuffixString;
|
||||||
UNICODE_STRING SymlinkName;
|
|
||||||
PDEVICE_EXTENSION DeviceExtension;
|
PDEVICE_EXTENSION DeviceExtension;
|
||||||
ULONG Suffix;
|
ULONG Suffix;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
@ -541,28 +538,16 @@ AllocatePointerDevice(PDRIVER_OBJECT DriverObject)
|
||||||
}
|
}
|
||||||
|
|
||||||
ExFreePool(DeviceName.Buffer);
|
ExFreePool(DeviceName.Buffer);
|
||||||
|
ExFreePool(SuffixString.Buffer);
|
||||||
|
|
||||||
/* Couldn't create device */
|
/* Couldn't create device */
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
ExFreePool(SuffixString.Buffer);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
DeviceObject->Flags = DeviceObject->Flags | DO_BUFFERED_IO;
|
DeviceObject->Flags = DeviceObject->Flags | DO_BUFFERED_IO;
|
||||||
|
|
||||||
#ifdef SERMOUSE_MOUSESYMLINK_SUPPORT
|
|
||||||
/* Create symlink */
|
|
||||||
/* FIXME: Why? FiN 20/08/2003 */
|
|
||||||
RtlInitUnicodeString(&SymlinkName, NULL);
|
|
||||||
SymlinkName.MaximumLength = sizeof(L"\\??\\Mouse") + SUFFIX_MAXIMUM_SIZE + sizeof(UNICODE_NULL);
|
|
||||||
SymlinkName.Buffer = ExAllocatePool(PagedPool, SymlinkName.MaximumLength);
|
|
||||||
RtlAppendUnicodeToString(&SymlinkName, L"\\??\\Mouse");
|
|
||||||
RtlAppendUnicodeToString(&DeviceName, SuffixString.Buffer);
|
|
||||||
IoCreateSymbolicLink(&SymlinkName, &DeviceName);
|
|
||||||
#endif
|
|
||||||
ExFreePool(SuffixString.Buffer);
|
|
||||||
|
|
||||||
DeviceExtension = DeviceObject->DeviceExtension;
|
DeviceExtension = DeviceObject->DeviceExtension;
|
||||||
KeInitializeDpc(&DeviceExtension->IsrDpc, (PKDEFERRED_ROUTINE)SerialMouseIsrDpc, DeviceObject);
|
KeInitializeDpc(&DeviceExtension->IsrDpc, (PKDEFERRED_ROUTINE)SerialMouseIsrDpc, DeviceObject);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue