|
From: Stephan M. <ste...@we...> - 2007-01-22 15:47:48
|
Did you install the driver=3F Does the test program testlibusb-win.exe=20
find any devices=3F
Stephan
> Hi all,=20
> =20
> I have a small program to show list of connected usb devices. It works f=
ine under Linux, but when I port it into libusb-win32, it doesn't - it doe=
sn't detect any device! And I really don't know why :( =20
> =20
> Attached example - testlibusb.c doesn't detect any device too.=20
> =20
> I'm using WinXP, libusb-win32-snapshot-20060827.=20
> =20
> Here is my code:=20
> =20
> #include <stdio.h>=20
> #include "usb.h"=20
> =20
> int print=5Fdevice(struct usb=5Fdevice *dev)=20
> {=20
> usb=5Fdev=5Fhandle *udev;=20
> int ret, i;=20
> =20
> printf("dev:%i\n", dev);=20
> udev =3D usb=5Fopen(dev);=20
> printf("udev:%i", udev);=20
> =20
> printf("#%x - %x\n", dev->descriptor.idVendor, dev->descriptor.idProduct=
);=20
> =20
> for (i =3D 0; i < dev->num=5Fchildren; i++)=20
> print=5Fdevice(dev->children[i]);=20
> =20
> return 0;=20
> }=20
> =20
> int main(int argc, char *argv[])=20
> {=20
> struct usb=5Fbus *bus;=20
> =20
> usb=5Finit();=20
> usb=5Fset=5Fdebug(0);=20
> =20
> usb=5Ffind=5Fbusses();=20
> usb=5Ffind=5Fdevices();=20
> =20
> for (bus =3D usb=5Fget=5Fbusses(); bus; bus =3D bus->next) {=20
> struct usb=5Fdevice *dev;=20
> printf("bus:%i\n", bus);=20
> printf("bus->devices:%i\n", bus->devices);=20
> for (dev =3D bus->devices; dev; dev =3D dev->next) {=20
> print=5Fdevice(dev);=20
> }=20
> }=20
> =20
> return 0;=20
> }=20
>=20
> output:
> bus:4846846
> bus->devices:0
> =20
> Can anyone help me, please... =3F I've installed libusb0.dll into program'=
s directory and then into system32, but it still doesn't work. Thanx in ad=
vance.=20
>=20
> ------------------------------------------------------------------------=
-
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share =
your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php=3Fpage=3Djoin.php&p=3Dsourceforge&CID=3DDEVDE=
V
> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
>=20
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
Viren-Scan f=FCr Ihren PC! Jetzt f=FCr jeden. Sofort, online und kostenlos.
Gleich testen! http://www.pc-sicherheit.web.de/freescan/=3Fmc=3D022222
|