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

------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to