ReactOS  0.4.12-dev-934-g9a4676f
patch.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

BOOLEAN PatchKeyboardDriver (void)
 
void RestoreKeyboardDriver (void)
 

Variables

UCHAR ucBreakKey
 

Function Documentation

◆ PatchKeyboardDriver()

BOOLEAN PatchKeyboardDriver ( void  )

Definition at line 193 of file patch.c.

194 {
196  //When we have i8042 driver this should be changed!!!!!!!
197  UNICODE_STRING DevName = ROS_STRING_INITIALIZER(L"\\Device\\Keyboard");
198  PDEVICE_OBJECT kbdDevice = NULL;
199  PFILE_OBJECT FO = NULL;
201 
202  ENTER_FUNC();
203 
204  //Get pointer to keyboard device
205  if( !NT_SUCCESS( status = IoGetDeviceObjectPointer( &DevName, FILE_READ_ACCESS, &FO, &kbdDevice ) ) )
206  {
207  DPRINT((0,"PatchKeyboardDriver: IoGetDeviceObjectPointer status: %x\n", status));
208  return FALSE;
209  }
210  phkData = ExAllocatePool( PagedPool, sizeof( INTERNAL_I8042_HOOK_KEYBOARD ) );
211  RtlZeroMemory( phkData, sizeof( INTERNAL_I8042_HOOK_KEYBOARD ) );
212 
214  phkData->Context = (PVOID) NULL; //DeviceObject;
215 
216  //call keyboard device internal io control to hook keyboard input stream
218  phkData, sizeof( INTERNAL_I8042_HOOK_KEYBOARD ) );
219  DPRINT((0,"PatchKeyboardDriver: PiceSendIoctl status: %x\n", status));
220 
221 
223  ExFreePool(phkData);
224 
225  LEAVE_FUNC();
226 
227  return NT_SUCCESS(status);
228 }
#define FILE_READ_ACCESS
Definition: nt_native.h:610
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS PiceSendIoctl(PDEVICE_OBJECT Target, ULONG Ioctl, PVOID InputBuffer, ULONG InputBufferLength)
Definition: patch.c:146
#define LEAVE_FUNC()
Definition: debug.h:43
NTSTATUS NTAPI IoGetDeviceObjectPointer(IN PUNICODE_STRING ObjectName, IN ACCESS_MASK DesiredAccess, OUT PFILE_OBJECT *FileObject, OUT PDEVICE_OBJECT *DeviceObject)
Definition: device.c:1434
VOID NTAPI ObDereferenceObject(IN PVOID Object)
Definition: obref.c:375
BOOLEAN PiceKbdIsr(PVOID IsrContext, PKEYBOARD_INPUT_DATA pCurrentInput, POUTPUT_PACKET pCurrentOutput, UCHAR StatusByte, PUCHAR pByte, PBOOLEAN pContinueProcessing, PKEYBOARD_SCAN_STATE pScanState)
Definition: patch.c:70
OUT PI8042_KEYBOARD_ISR IsrRoutine
Definition: ntdd8042.h:179
smooth NULL
Definition: ftsmooth.c:416
void DPRINT(...)
Definition: polytest.cpp:61
void * PVOID
Definition: retypes.h:9
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
* PFILE_OBJECT
Definition: iotypes.h:1954
static const WCHAR L[]
Definition: oid.c:1250
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
#define IOCTL_INTERNAL_I8042_HOOK_KEYBOARD
Definition: ntdd8042.h:36
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
#define ENTER_FUNC()
Definition: debug.h:42
BOOLEAN(NTAPI * PI8042_KEYBOARD_ISR)(PVOID IsrContext, PKEYBOARD_INPUT_DATA CurrentInput, POUTPUT_PACKET CurrentOutput, UCHAR StatusByte, PUCHAR Byte, PBOOLEAN ContinueProcessing, PKEYBOARD_SCAN_STATE ScanState)
Definition: ntdd8042.h:167
static SERVICE_STATUS status
Definition: service.c:31
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
Definition: ps.c:97

Referenced by InitPICE().

◆ RestoreKeyboardDriver()

void RestoreKeyboardDriver ( void  )

Definition at line 230 of file patch.c.

231 {
232  ENTER_FUNC();
233  DbgPrint("RestoreKeyboardDriver: Not Implemented yet!!!\n");
234  LEAVE_FUNC();
235 }
#define DbgPrint
Definition: loader.c:25
#define LEAVE_FUNC()
Definition: debug.h:43
#define ENTER_FUNC()
Definition: debug.h:42

Referenced by CleanUpPICE().

Variable Documentation

◆ ucBreakKey

UCHAR ucBreakKey

Definition at line 56 of file patch.c.

Referenced by COMMAND_PROTOTYPE(), and PiceKbdIsr().