I want to control an USB port connected to a Microcontroller using simple GUI Visual Basic program(Read, Write, Open, Close ... etc). Does anyone know how to use the API of the USB in WindowsXP with VB to do that?
And if there is any other way to do this function, what is it then?
Please answer in deep Details, because I've never done something like that before.
Bad News is that no any direct api you can use.. for that u have to reach via USB throgh driver.. USB COMPLETE explain it but i think its too cloumpsy for new user like you,...
Good News is that alredy easy to use libusb are available and u can use it to communicate with USB...just search LIBUSB and u can find more...
Now make simple DLL and make write and read function which use libusb ,, and just call this write and read in VB from DLL...
in short you have bellow consept clear....
1) USB driver
2) libusb
3) how to call dll in VB
this file is very very helpful for me ... thanks alot.
But i have one question: the program here defines and uses a certain API ... is this API already implemented in Windows XP. ... or should I search for it and add it first before using the program??
If I should add the API to use .... how exactly can I do that?
it is the first time for me to deal with an API.
I've tested the program that u gave me with a USB flash memory (memory stick) and it didn't respond (it actually gives: Device not found !)... is the problem with the program ... or the flash memories just use another protocol than the other USB devices?