|
From: Peter F. (L. <las...@gm...> - 2006-09-18 15:32:54
|
Hello,
what is the correct way to spy mouse data with libusb under WindowsXP?
I have found some code snippets here, but unfortunately all of them are
DOS applications and not work:
here is a code snippet form this newsgroup here:
Pseudocode:
MyThread()
{
usb_set_configuration(usbptr,1);
usb_claim_interface(usbptr,0);
usb_set_altinterface(usbptr,0);
while(bRun==1)
{
usb_bulk_read(usbptr, 0x81, tmp, sizeof(tmp),20);
if(tmp & testvalue)
DoSomething();
}
}
when I put this in a separate thread the system, or better the mouse
driver, freeze.
But I want dedect only that one of the mouse button was pressed (this
are additional mouse buttons, therefore WIN-API not work), but all the
data should be forwarded to the original mouse driver and should not
catch and lost from my application.
Can someone tell me this secret or have some example links for this?
Thanks and regards
Peter
--
Newsreader: http://mesnews.net/index-gb.php
Deutsche Hilfedatei: http://www.lastwebpage.de/download/mesnews-de.zip
|