Hi there. I've searched and read on MSDN, CodeProject, Google for a few hours but couldn't find much talking about this, or explaining the basis of it. I want to simulate mouse clicks to WoW (or any other program; but I'm currently targeting WoW) and after doing a couple of tests, I found that WoW will still use the current mouse position even when receiving specific Mouse/Cursor WindowsMessages. It will do a GetCursorPos() WinAPI call whenever it receives a Mouse message. That's why in my tests, I could send a mouse click, but only at the real mouse position and not at a specified one.
tl;dr: WoW doesn't use the position value specified in the WM, it will call the GetCursorPos() function to get it.
As I don't want my "bot" to use the global mouse - which would make user unable to do something else on their computer while it is active - I've been searching a way to create either a second mouse using a Driver (or anything else for it) or hook the WinAPI to modify the values that are returned to WoW when it calls the GetCursorPos() function. I know that WinAPI hooking requires injection (unless there's something I didn't read about), and I don't mind about using it.
I've seen a couple of posts that were confirming that using 2 mouses (with 2 different cursors) on the same computer was possible; and this is what makes me think that simulating a second mouse could be a good idea.
Did anyone try something like this before? I'm requesting any link/info that could be useful in my project.
P.S: I'm mainly using C#, but I'm ready to use C++ for the DLL if needed.