[Gambas-user] Gambas2 USB detect !!??

Benoit Minisini gambas at ...1...
Fri Jan 2 19:45:32 CET 2009


On vendredi 2 janvier 2009, Biggy UAC wrote:
> Happy new year !
>
> in my application i want to detect usb flash drive when pluged/unpluged and
> display in a textbox usb drive letter.
>
> how to detect usb drive stick plug/unplug in gambas2 ??
>
> thanks .

USB "driver letter" ??? That does not exist on Linux...

Anyway, this is not possible in Gambas 2 directly.

AFAIK, when you plug a device, the kernel warns the HAL daemon which then 
sends a signal on the DBUS system bus. This signal then can be catched by any 
application that ask for it on the DBUS system bus.

You cannot do that in Gambas without support for DBUS.

Maybe there is another way with a command-line tool, but I don't know.

Regards,

-- 
Benoit Minisini




More information about the User mailing list