| 
What you're trying to do won't work, at least not with libusb. 
libusb is not a USB filter or USB monitor. It's not possible to extract
data packets from a mouse's or any other device's data stream.
Take a look at Microsofts RawInput API, maybe this works:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/rawinput.asp
Stephan
> 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
> 
> 
> 
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066
 |