The IMMRemovableMediaHandler class is the base handler class for removable devices. This class provides the ability for derived classes to implement their own processing when media is loaded or unloaded from a device. For example, if the user ejects the CD from a CD player, then you might want to gray out the controls of the CD player until the user inserts a new CD.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~IMMRemovableMediaHandler()
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
IMMRemovableMediaHandler()
Creates IMMRemovableMediaHandler objects.
Windows | OS/2 | AIX |
Yes | Yes | No |
Derived classes must supply these functions to process a pass device event.
![]() |
public:
virtual IMMRemovableMediaHandler& handleEventsFor( IMMRemovableMedia* device )
Attaches the handler to the specified IMMDevice object. This is overridden to force attachment of this handler to only one device.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
virtual bool passDevice(const IMMPassDeviceEvent& event)
Processes pass device events. It is implemented by derived classes.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
virtual IMMRemovableMediaHandler& stopHandlingEventsFor( IMMRemovableMedia* device )
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
protected:
virtual bool dispatchHandlerEvent(IEvent& event)
Windows | OS/2 | AIX |
Yes | Yes | No |
Use these members to provide processing when media is either loaded or unloaded from the device. They are implemented by derived classes.
![]() |
public:
virtual IMMRemovableMediaHandler& mediaLoaded()
Called whenever media is loaded into the device.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
virtual IMMRemovableMediaHandler& mediaUnloaded()
Called whenever media is unloaded from the device.
Windows | OS/2 | AIX |
Yes | Yes | No |
virtual ~IHandler()
virtual IString asDebugInfo() const
virtual IString asString() const
virtual IHandler& disable()
virtual IHandler& enable(bool enable = true)
virtual IHandler& handleEventsFor(IWindow* window)
IHandler()
bool isEnabled() const
virtual IHandler& stopHandlingEventsFor(IWindow* window)
virtual ~IMMDeviceHandler()
virtual bool cuePoint(const IMMCuePointEvent& event)
virtual bool deviceEvent(const IMMDeviceEvent& event)
virtual IMMDeviceHandler& handleEventsFor( IMMDevice* device )
IMMDeviceHandler()
virtual bool positionChange( const IMMPositionChangeEvent& event )
virtual IMMDeviceHandler& stopHandlingEventsFor( IMMDevice* device )
virtual IEventResult defaultProcedure(IEvent& event)
virtual bool dispatchHandlerEvent(IEvent& event) = 0