Guest User

Untitled

a guest
Jul 29th, 2012
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. How to get a list of all the USB removable storages attatched in the system using C?
  2. libusb_context * usb_ctx = NULL;
  3.  
  4. int main()
  5. {
  6. ...
  7. libusb_init(&usb_ctx);
  8. ...
  9. libusb_exit(usb_ctx);
  10. ...
  11. }
  12.  
  13. some_func()
  14. {
  15. ...
  16. libusb_device **list;
  17. ssize_t number_of_devices = libusb_get_device_list(usb_ctx, &list);
  18. ...
  19. }
Advertisement
Add Comment
Please, Sign In to add comment