|
|
1.1 ! root 1: /*++ ! 2: ! 3: Copyright (c) 1989 Microsoft Corporation ! 4: ! 5: Module Name: ! 6: ! 7: kbdmou.h ! 8: ! 9: Abstract: ! 10: ! 11: These are the structures and defines that are used in the ! 12: keyboard class driver, mouse class driver, and keyboard/mouse port ! 13: driver. ! 14: ! 15: Author: ! 16: ! 17: lees ! 18: ! 19: Revision History: ! 20: ! 21: --*/ ! 22: ! 23: #ifndef _KBDMOU_ ! 24: #define _KBDMOU_ ! 25: ! 26: #include <ntddkbd.h> ! 27: #include <ntddmou.h> ! 28: ! 29: // ! 30: // Define the keyboard/mouse port device name strings. ! 31: // ! 32: ! 33: #define DD_KEYBOARD_PORT_DEVICE_NAME "\\Device\\KeyboardPort" ! 34: #define DD_KEYBOARD_PORT_DEVICE_NAME_U L"\\Device\\KeyboardPort" ! 35: #define DD_KEYBOARD_PORT_BASE_NAME_U L"KeyboardPort" ! 36: #define DD_POINTER_PORT_DEVICE_NAME "\\Device\\PointerPort" ! 37: #define DD_POINTER_PORT_DEVICE_NAME_U L"\\Device\\PointerPort" ! 38: #define DD_POINTER_PORT_BASE_NAME_U L"PointerPort" ! 39: ! 40: // ! 41: // Define the keyboard/mouse class device name strings. ! 42: // ! 43: ! 44: #define DD_KEYBOARD_CLASS_BASE_NAME_U L"KeyboardClass" ! 45: #define DD_POINTER_CLASS_BASE_NAME_U L"PointerClass" ! 46: ! 47: // ! 48: // Define the keyboard/mouse resource class names. ! 49: // ! 50: ! 51: #define DD_KEYBOARD_RESOURCE_CLASS_NAME_U L"Keyboard" ! 52: #define DD_POINTER_RESOURCE_CLASS_NAME_U L"Pointer" ! 53: #define DD_KEYBOARD_MOUSE_COMBO_RESOURCE_CLASS_NAME_U L"Keyboard/Pointer" ! 54: ! 55: // ! 56: // Define the maximum number of pointer/keyboard port names the port driver ! 57: // will use in an attempt to IoCreateDevice. ! 58: // ! 59: ! 60: #define POINTER_PORTS_MAXIMUM 8 ! 61: #define KEYBOARD_PORTS_MAXIMUM 8 ! 62: ! 63: // ! 64: // Define the port connection data structure. ! 65: // ! 66: ! 67: typedef struct _CONNECT_DATA { ! 68: IN PDEVICE_OBJECT ClassDeviceObject; ! 69: IN PVOID ClassService; ! 70: } CONNECT_DATA, *PCONNECT_DATA; ! 71: ! 72: // ! 73: // Define the service callback routine's structure. ! 74: // ! 75: ! 76: typedef ! 77: VOID ! 78: (*PSERVICE_CALLBACK_ROUTINE) ( ! 79: IN PVOID NormalContext, ! 80: IN PVOID SystemArgument1, ! 81: IN PVOID SystemArgument2, ! 82: IN OUT PVOID SystemArgument3 ! 83: ); ! 84: ! 85: // ! 86: // NtDeviceIoControlFile internal IoControlCode values for keyboard device. ! 87: // ! 88: ! 89: #define IOCTL_INTERNAL_KEYBOARD_CONNECT CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS) ! 90: #define IOCTL_INTERNAL_KEYBOARD_DISCONNECT CTL_CODE(FILE_DEVICE_KEYBOARD,0x0100, METHOD_NEITHER, FILE_ANY_ACCESS) ! 91: #define IOCTL_INTERNAL_KEYBOARD_ENABLE CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0200, METHOD_NEITHER, FILE_ANY_ACCESS) ! 92: #define IOCTL_INTERNAL_KEYBOARD_DISABLE CTL_CODE(FILE_DEVICE_KEYBOARD, 0x0400, METHOD_NEITHER, FILE_ANY_ACCESS) ! 93: ! 94: // ! 95: // NtDeviceIoControlFile internal IoControlCode values for mouse device. ! 96: // ! 97: ! 98: ! 99: #define IOCTL_INTERNAL_MOUSE_CONNECT CTL_CODE(FILE_DEVICE_MOUSE, 0x0080, METHOD_NEITHER, FILE_ANY_ACCESS) ! 100: #define IOCTL_INTERNAL_MOUSE_DISCONNECT CTL_CODE(FILE_DEVICE_MOUSE, 0x0100, METHOD_NEITHER, FILE_ANY_ACCESS) ! 101: #define IOCTL_INTERNAL_MOUSE_ENABLE CTL_CODE(FILE_DEVICE_MOUSE, 0x0200, METHOD_NEITHER, FILE_ANY_ACCESS) ! 102: #define IOCTL_INTERNAL_MOUSE_DISABLE CTL_CODE(FILE_DEVICE_MOUSE, 0x0400, METHOD_NEITHER, FILE_ANY_ACCESS) ! 103: ! 104: // ! 105: // Error log definitions (specific to the keyboard/mouse) for DumpData[0] ! 106: // in the IO_ERROR_LOG_PACKET. ! 107: // ! 108: // DumpData[1] <= hardware port/register ! 109: // DumpData[2] <= {command byte || expected response byte} ! 110: // DumpData[3] <= {command's parameter byte || actual response byte} ! 111: // ! 112: // ! 113: ! 114: #define KBDMOU_COULD_NOT_SEND_COMMAND 0x0000 ! 115: #define KBDMOU_COULD_NOT_SEND_PARAM 0x0001 ! 116: #define KBDMOU_NO_RESPONSE 0x0002 ! 117: #define KBDMOU_INCORRECT_RESPONSE 0x0004 ! 118: ! 119: // ! 120: // Define the base values for the error log packet's UniqueErrorValue field. ! 121: // ! 122: ! 123: #define I8042_ERROR_VALUE_BASE 1000 ! 124: #define INPORT_ERROR_VALUE_BASE 2000 ! 125: #define SERIAL_MOUSE_ERROR_VALUE_BASE 3000 ! 126: ! 127: #endif // _KBDMOU_ ! 128:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.