Page 1 of 1
Access a USB device from PB?
Posted: Tue May 14, 2024 2:56 am
by RobertRioja
Is there a way to access a USB device from PB? Is there a library?
I tried to search the forum for "USB" but the search function will not accept words of less than 4 characters!
Re: Access a USB device from PB?
Posted: Tue May 14, 2024 3:23 am
by RASHAD
Hi
What kind of USB device ?
HDD , BT , Wireless Mouse ...etc
And what do you want to do with it
Re: Access a USB device from PB?
Posted: Tue May 14, 2024 3:37 am
by idle
you will need a library unless the usb appears as a serial port or drive
see
https://github.com/libusb/hidapi
I have hidapi build for windows x86/x64 if you need to access a hid device.
Re: Access a USB device from PB?
Posted: Tue May 14, 2024 10:58 am
by juergenkulow
Re: Access a USB device from PB?
Posted: Tue May 14, 2024 1:58 pm
by blueb
Much like juergenkulow's suggestion..
I've bookmarked my web browser to:
https://www.google.com/advanced_search?hl=en-DE&fg=1
(Google's advanced search page).. it allows 3 character searches.
In this case:
all these words:USB
desired site search is:
www.purebasic.fr
Re: Access a USB device from PB?
Posted: Tue May 14, 2024 5:07 pm
by RobertRioja
Thank you all for your replies!!!
Idle: Please send me the Win64 library, or tell me how to get it. Thanks.
I downloaded the library that User_Russian posted but it asks for another lib called MISC, which I cannot find.
Thank you
Robert
Re: Access a USB device from PB?
Posted: Tue May 14, 2024 8:41 pm
by idle
check you Messages for include and dll
Re: Access a USB device from PB?
Posted: Thu May 16, 2024 12:41 am
by RobertRioja
Idle: Thank you for the library. I cannot find documentation on how to use it, routine names, parameters, etc. Where can I find it?
Thanks,
Robert
Re: Access a USB device from PB?
Posted: Thu May 16, 2024 7:23 am
by idle
RobertRioja wrote: Thu May 16, 2024 12:41 am
Idle: Thank you for the library. I cannot find documentation on how to use it, routine names, parameters, etc. Where can I find it?
Thanks,
Robert
should be docs and examples here
https://github.com/libusb/hidapi
Re: Access a USB device from PB?
Posted: Tue May 21, 2024 4:17 am
by RobertRioja
Idle,
Thanks again.
Robert
Re: Access a USB device from PB?
Posted: Tue May 21, 2024 4:51 am
by AZJIO
If it is a USB drive, then it is easier to use
WM_DEVICECHANGE
Re: Access a USB device from PB?
Posted: Fri May 24, 2024 12:44 am
by RobertRioja
AZJIO,
Thank you.
Robert