huanxinyin
驱动牛犊
驱动牛犊
  • 注册日期2009-10-31
  • 最后登录2010-01-13
  • 粉丝0
  • 关注0
  • 积分7分
  • 威望61点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:2931回复:0

请教DDK里的 moufiltr 的回调函数MouFilter_ServiceCallback问题

楼主#
更多 发布于:2009-11-06 16:06
 对鼠标的点击可以控制,但坐标修改 却不做响应,这是什么原因啊?
怎么解决?  网上找了2天 都没找到怎么解决问题的,DDK源码和说明如下


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;
    KIRQL oldirql;
    devExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
    KdPrint(("Enter MouFilter_ServiceCallback\n"));
    //
    // UpperConnectData must be called at DISPATCH
    //
//    InputDataStart->ButtonFlags = devExt->b;
//    if(devExt->b ==1)
//        devExt->b =2;
//    else
//        devExt->b=1;
    InputDataStart->LastX = 10;
    InputDataStart->LastY = 10;
    InputDataEnd->LastX = 10;
    InputDataEnd->LastY = 10;

  
    (*(PSERVICE_CALLBACK_ROUTINE) devExt->UpperConnectData.ClassService)(
        devExt->UpperConnectData.ClassDeviceObject,
        InputDataStart,
        InputDataEnd,
        InputDataConsumed
        );
}
无穷的求知欲。
游客

返回顶部