changeofpace / MouClassInputInjection

MouClassInputInjection implements a kernel interface for injecting mouse input data packets into the input data stream of HID USB mouse devices.
MIT License
290 stars 82 forks source link

The move command always reports an error #15

Closed imitatorgkw closed 1 year ago

imitatorgkw commented 2 years ago

“Unexpected indicator flags. (movement type)” is always reported when I use the move command. Why is that? Other instructions are normal.

imitatorgkw commented 2 years ago

if (g_MiiManager.DeviceStackContext->MovementDevice.AbsoluteMovement) { if (!(MOUSE_MOVE_ABSOLUTE & IndicatorFlags)) { ERR_PRINT("Unexpected indicator flags. (movement type)"); ntstatus = STATUS_UNSUCCESSFUL; goto exit; } } else { if (MOUSE_MOVE_ABSOLUTE & IndicatorFlags) { ERR_PRINT("Unexpected indicator flags. (movement type)"); ntstatus = STATUS_UNSUCCESSFUL; goto exit; } } if (g_MiiManager.DeviceStackContext->MovementDevice.VirtualDesktop) { if (!(MOUSE_VIRTUAL_DESKTOP & IndicatorFlags)) { ERR_PRINT("Unexpected indicator flags. (virtual desktop)"); ntstatus = STATUS_UNSUCCESSFUL; goto exit; } } else { if (MOUSE_VIRTUAL_DESKTOP & IndicatorFlags) { ERR_PRINT("Unexpected indicator flags. (virtual desktop)"); ntstatus = STATUS_UNSUCCESSFUL; goto exit; } } I can run le after commenting this code. Whether I choose absolute or relative, g_MiiManager.DeviceStackContext->MovementDevice.AbsoluteMovement is always true.

changeofpace commented 2 years ago

Are you trying to inject MOUSE_MOVE_RELATIVE packets?

imitatorgkw commented 2 years ago

Are you trying to inject MOUSE_MOVE_RELATIVE packets?

Yes, I tried to inject MOUSE_MOVE_RELATIVE packets

changeofpace commented 1 year ago

Are you trying to inject MOUSE_MOVE_RELATIVE packets?

Yes, I tried to inject MOUSE_MOVE_RELATIVE packets

Your mouse device will almost always generate relative or absolute movement data. You are trying to send relative movement data while your mouse natively sends absolute movement data. This is suspicious activity to any software that is monitoring mouse input data. If you do not care about this then you can use MouInjectInputPacketUnsafe to bypass these checks.

note that your mouse data type may change when testing on a virtual machine vs testing on hardware.