30#define DD_KEYBOARD_PORT_DEVICE_NAME "\\Device\\KeyboardPort"
31#define DD_KEYBOARD_PORT_DEVICE_NAME_U L"\\Device\\KeyboardPort"
32#define DD_KEYBOARD_PORT_BASE_NAME_U L"KeyboardPort"
33#define DD_POINTER_PORT_DEVICE_NAME "\\Device\\PointerPort"
34#define DD_POINTER_PORT_DEVICE_NAME_U L"\\Device\\PointerPort"
35#define DD_POINTER_PORT_BASE_NAME_U L"PointerPort"
37#define DD_KEYBOARD_CLASS_BASE_NAME_U L"KeyboardClass"
38#define DD_POINTER_CLASS_BASE_NAME_U L"PointerClass"
40#define DD_KEYBOARD_RESOURCE_CLASS_NAME_U L"Keyboard"
41#define DD_POINTER_RESOURCE_CLASS_NAME_U L"Pointer"
42#define DD_KEYBOARD_MOUSE_COMBO_RESOURCE_CLASS_NAME_U L"Keyboard/Pointer"
44#define POINTER_PORTS_MAXIMUM 8
45#define KEYBOARD_PORTS_MAXIMUM 8
47#define KBDMOU_COULD_NOT_SEND_COMMAND 0x0000
48#define KBDMOU_COULD_NOT_SEND_PARAM 0x0001
49#define KBDMOU_NO_RESPONSE 0x0002
50#define KBDMOU_INCORRECT_RESPONSE 0x0004
52#define I8042_ERROR_VALUE_BASE 1000
53#define INPORT_ERROR_VALUE_BASE 2000
54#define SERIAL_MOUSE_ERROR_VALUE_BASE 3000
56#define IOCTL_INTERNAL_KEYBOARD_CONNECT \
57 CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS)
59#define IOCTL_INTERNAL_KEYBOARD_DISCONNECT \
60 CTL_CODE(FILE_DEVICE_KEYBOARD,0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
62#define IOCTL_INTERNAL_KEYBOARD_ENABLE \
63 CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0200, METHOD_NEITHER, FILE_ANY_ACCESS)
65#define IOCTL_INTERNAL_KEYBOARD_DISABLE \
66 CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0400, METHOD_NEITHER, FILE_ANY_ACCESS)
68#define IOCTL_INTERNAL_MOUSE_CONNECT \
69 CTL_CODE(FILE_DEVICE_MOUSE, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS)
71#define IOCTL_INTERNAL_MOUSE_DISCONNECT \
72 CTL_CODE(FILE_DEVICE_MOUSE, 0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
74#define IOCTL_INTERNAL_MOUSE_ENABLE \
75 CTL_CODE(FILE_DEVICE_MOUSE, 0x0200, METHOD_NEITHER, FILE_ANY_ACCESS)
77#define IOCTL_INTERNAL_MOUSE_DISABLE \
78 CTL_CODE(FILE_DEVICE_MOUSE, 0x0400, METHOD_NEITHER, FILE_ANY_ACCESS)
struct _CONNECT_DATA * PCONNECT_DATA
VOID(STDAPICALLTYPE * PSERVICE_CALLBACK_ROUTINE)(IN PVOID NormalContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2, IN OUT PVOID SystemArgument3)
struct _CONNECT_DATA CONNECT_DATA
PDEVICE_OBJECT ClassDeviceObject
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2