Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
135 user(s) are online (114 user(s) are browsing Forums)

Members: 0
Guests: 135

more...

Support us!

Headlines

 
  Register To Post  

Insert/remove USB device
Just popping in
Just popping in


See User information
I am using WinUAE, so I can't test this myself.

How do I have my program "listen" for USB devices being inserted/removed? ie, thumb drives, external harddrives.

If you have a complete working C example, that would be great since I can't test it myself.

Go to top
Re: Insert/remove USB device
Not too shy to talk
Not too shy to talk


See User information

I don't know how to make it specific for USB, but generally you would just listen for IDCMP_DISKINSERTED and IDCMP_DISKREMOVED messages. Or, if you want to get the information when your window is inactive, too, you would create an input handler or commodity which watches for IECLASS_DISKINSERTED resp. IECLASS_DISKREMOVED events.

Regarding WinUAE I am quite sure that you have removable harddisk support, at least when using UAE controller.

Go to top
Re: Insert/remove USB device
Just can't stay away
Just can't stay away


See User information
@mritter0
There is already a USB utility like that at OS4Depot called "UsbSound". However, it notifies the user with a sound for any USB device insertion/removal, not just media devices. It does not provide notification for other types of nonUSB removable disk media like CDROM or Floppy drive. I've never tested it with WinUAE but it uses datatype sound play and notification from the OS4 USB system, so it might work.

Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450

Go to top
Re: Insert/remove USB device
Just popping in
Just popping in


See User information
I totally overlooked what this option is for:

WinUAE->CD & Hard drives->Automount removable drives

It mounts my thumbdrive as RDH0: and I get IDCMP_DISKINSERTED. Exactly what I wanted.


Workbench Explorer - A better way to browse drawers
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project