ReactOS  0.4.15-dev-1207-g698a8e6
mouhid.h File Reference
#include <ntddk.h>
#include <hidclass.h>
#include <hidpddi.h>
#include <hidpi.h>
#include <debug.h>
#include <ntddmou.h>
#include <kbdmou.h>
Include dependency graph for mouhid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MOUHID_DEVICE_EXTENSION
 

Macros

#define _HIDPI_NO_FUNCTION_MACROS_
 
#define NDEBUG
 
#define WHEEL_DELTA   120
 
#define VIRTUAL_SCREEN_SIZE_X   (65536)
 
#define VIRTUAL_SCREEN_SIZE_Y   (65536)
 
#define MOUHID_TAG   'diHM'
 

Typedefs

typedef struct MOUHID_DEVICE_EXTENSIONPMOUHID_DEVICE_EXTENSION
 

Functions

NTSTATUS MouHid_InitiateRead (IN PMOUHID_DEVICE_EXTENSION DeviceExtension)
 

Macro Definition Documentation

◆ _HIDPI_NO_FUNCTION_MACROS_

#define _HIDPI_NO_FUNCTION_MACROS_

Definition at line 3 of file mouhid.h.

◆ MOUHID_TAG

#define MOUHID_TAG   'diHM'

Definition at line 142 of file mouhid.h.

◆ NDEBUG

#define NDEBUG

Definition at line 8 of file mouhid.h.

◆ VIRTUAL_SCREEN_SIZE_X

#define VIRTUAL_SCREEN_SIZE_X   (65536)

Definition at line 135 of file mouhid.h.

◆ VIRTUAL_SCREEN_SIZE_Y

#define VIRTUAL_SCREEN_SIZE_Y   (65536)

Definition at line 136 of file mouhid.h.

◆ WHEEL_DELTA

#define WHEEL_DELTA   120

Definition at line 134 of file mouhid.h.

Typedef Documentation

◆ PMOUHID_DEVICE_EXTENSION

Function Documentation

◆ MouHid_InitiateRead()

NTSTATUS MouHid_InitiateRead ( IN PMOUHID_DEVICE_EXTENSION  DeviceExtension)

Definition at line 397 of file mouhid.c.

399 {
400  PIO_STACK_LOCATION IoStack;
402 
403  /* re-use irp */
404  IoReuseIrp(DeviceExtension->Irp, STATUS_SUCCESS);
405 
406  /* init irp */
407  DeviceExtension->Irp->MdlAddress = DeviceExtension->ReportMDL;
408 
409  /* get next stack location */
410  IoStack = IoGetNextIrpStackLocation(DeviceExtension->Irp);
411 
412  /* init stack location */
413  IoStack->Parameters.Read.Length = DeviceExtension->ReportLength;
414  IoStack->Parameters.Read.Key = 0;
415  IoStack->Parameters.Read.ByteOffset.QuadPart = 0LL;
416  IoStack->MajorFunction = IRP_MJ_READ;
417  IoStack->FileObject = DeviceExtension->FileObject;
418 
419  /* set completion routine */
420  IoSetCompletionRoutine(DeviceExtension->Irp, MouHid_ReadCompletion, DeviceExtension, TRUE, TRUE, TRUE);
421 
422  /* read is active */
423  DeviceExtension->ReadReportActive = TRUE;
424 
425  /* start the read */
426  Status = IoCallDriver(DeviceExtension->NextDeviceObject, DeviceExtension->Irp);
427 
428  /* done */
429  return Status;
430 }
#define LL
Definition: tui.h:84
VOID NTAPI IoReuseIrp(IN OUT PIRP Irp, IN NTSTATUS Status)
Definition: irp.c:1971
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
Definition: irp.cpp:498
Status
Definition: gdiplustypes.h:24
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2691
PFILE_OBJECT FileObject
Definition: iotypes.h:3148
NTSTATUS NTAPI MouHid_ReadCompletion(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context)
Definition: mouhid.c:303
NTSTATUS NTAPI IoCallDriver(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: irp.c:1218
#define IRP_MJ_READ
Definition: rdpdr.c:46
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:3107
return STATUS_SUCCESS
Definition: btrfs.c:3014

Referenced by MouHid_Create(), and MouHid_ReadCompletion().