I used a dll Inpout32.dll wich exports the in/out functions that allow me to read and write from any port, under a NT based system.
Yes by win32 i mean functions like mouse_event,keyb_event, sendinput or sendmessage.
All of them allow to simulate mouse/keyb events, BUT all of them can be hooked, so they are useless considering my purposes..
Sending mouse button clicks to PS2 Mouse
- CmpXchg
- Member
- Posts: 61
- Joined: Mon Apr 28, 2008 12:14 pm
- Location: Petrozavodsk, Russia during school months, Vänersborg Sweden in the summertime
OK, now I see...
Well, then you have to implement your sequence:
-wait until buffer is empty
-lock mouse
-write packet sequence for clicking/moving.
-unlock mouse
Many problems might rise, you'll have to use trial and error approach. What if after mouse is locked, writing a packet sequence will have no effect? Maybe we don't need locking at all then.
As you say, you got it working for keyboard, so mouse shouldn't be very difficult
Wonderful! Now I see why we can't use interrupts. (I wonder how this DLL works, by the way. Probably Inpout32.dll requires some driver, which needs to be installed in the system. But that's not important now.)Nitro wrote:I used a dll Inpout32.dll wich exports the in/out functions that allow me to read and write from any port, under a NT based system.
Well, then you have to implement your sequence:
-wait until buffer is empty
-lock mouse
-write packet sequence for clicking/moving.
-unlock mouse
Many problems might rise, you'll have to use trial and error approach. What if after mouse is locked, writing a packet sequence will have no effect? Maybe we don't need locking at all then.
As you say, you got it working for keyboard, so mouse shouldn't be very difficult
Re: Sending mouse button clicks to PS2 Mouse
Nitro, this topic is a few months old, so just wondering if you are still working on sending mouse button clicks to PS2 Mouse? If so, I'm working on the same thing... so give me a pm and we can exchange notes