⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dispatch_v1.cpp

📁 2009 最新測試成功的 Virtual Mouse 哈哈 !! 只有這裡才有喔
💻 CPP
字号:
/////////////////////////////////////////////////////////////////////////////
//	dispatch.cpp:	Other IRP handlers
/////////////////////////////////////////////////////////////////////////////
//	Create			Handle Create/Open file IRP
//	Close			Handle Close file IRPs
//	Read			Handle Read IRPs
//	Write			Handle Write IRPs
//	DeviceControl	Handle DeviceIoControl IRPs
//	SystemControl	Handle WMI IRPs
/////////////////////////////////////////////////////////////////////////////

//////////////// Jason


#include "VKeyFdo.h"
#include "..\inc\vkIoctl.h"


#define _MOUSE_

/////////////////////////////////////////////////////////////////////////////
//	Create:
//
//	Description:
//		Handle IRP_MJ_CREATE requests
//
//	Arguments:
//		Pointer to our FDO
//		Pointer to the IRP
//			IrpStack->Parameters.Create.xxx has create parameters
//			IrpStack->FileObject->FileName has file name of device
//
//	Return Value:
//		This function returns STATUS_XXX

PDEVICE_OBJECT FunctionDevice  = 0;
PDEVICE_OBJECT KeyboardClassDO = 0;
int UnitId = 0;


//#ifdef _MOUSE_
MouseClassServiceCallback SeviceCallbackMouse = 0;
//#else
KeyboardClassServiceCallback SeviceCallback = 0;
//#endif
/////////////////////////////////////// Jason Yu

static ULONG InCtrlCodeRight=0x00000000;
static ULONG InCtrlCodeMid=0x00000000;
static ULONG InCtrlCodeLeft=0x00000000;
static ULONG OutCtrlCodeFlg=0x00000000;
static ULONG ChangeWay=0x00000000;
static ULONG SwheelFlg=0x00000003;

VOID
MouFilter_ServiceCallback(
    IN PDEVICE_OBJECT DeviceObject,
    IN PMOUSE_INPUT_DATA InputDataStart,
    IN PMOUSE_INPUT_DATA InputDataEnd,
    IN OUT PULONG InputDataConsumed
    )
/*++

Routine Description:

    Called when there are mouse packets to report to the RIT.  You can do 
    anything you like to the packets.  For instance:
    
    o Drop a packet altogether
    o Mutate the contents of a packet 
    o Insert packets into the stream 
                    
Arguments:

    DeviceObject - Context passed during the connect IOCTL
    
    InputDataStart - First packet to be reported
    
    InputDataEnd - One past the last packet to be reported.  Total number of
                   packets is equal to InputDataEnd - InputDataStart
    
    InputDataConsumed - Set to the total number of packets consumed by the RIT
                        (via the function pointer we replaced in the connect
                        IOCTL)

Return Value:

    Status is returned.

--*/
{
    PDEVICE_EXTENSION   devExt;

    devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
/////////////////////zt00/////////

//癸

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -