The IMMNotifyEvent class is the class for notification events. These events get generated when any device function gets called. This can be powerful for asynchronous processing when you do not want to wait for something to finish. For more information, see IMMDevice::nowait. To get notified of events, you attach an observer to the device, and it sends a notification when a command has finished processing. From this event, you can find out what command was called, from which device it came, the return value of the command that was executed, and, if the command generated an error, what its error number and string are.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~IMMNotifyEvent()
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
IMMNotifyEvent(const IEvent& event)
Although you can construct objects of this class, typically IMMDeviceHandler::dispatchHandlerEvent creates objects of this class from an object of the class IEvent or another IMMNotifyEvent object.
Windows | OS/2 | AIX |
Yes | Yes | No |
Use these members to determine what command generated this notification.
![]() |
public:
Command command() const
Returns the command that generated this notification event.
Windows | OS/2 | AIX |
Yes | Yes | No |
Use these members to parse the event information into the success state of the command (and, if there is an error, its error code and string) and to access the user parameter.
![]() |
public:
IMMDevice* device() const
Returns a pointer to the device that this event is from.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
unsigned short errorId() const
Returns the error code from the command if there was one; otherwise, it returns 0.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
static IString errorText(unsigned long errorCode)
Returns the error text for a given error code. If there was not any error text, then it returns a null IString.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
unsigned short userParameter() const
Returns the user parameter that was set at the time of this event. See IMMDevice::setUserParameter for more information.
Windows | OS/2 | AIX |
Yes | Yes | No |
Use these members to determine if the command succeeded.
![]() |
public:
SuccessCode successCode() const
Returns the success code, which indicates if the command succeeded or failed.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
enum Command { unknownCommand=0, open=1, close, escape, play, seek, stop, pause, info, getDeviceCapabilities, status, spin, set, step, record, sysInfo, save, cue, update, setCuePoint, setPositionAdvise, setSyncOffset, load, acquireDevice, releaseDevice, masterAudio, getTableOfContents, deviceSettings, connector, resume, connectorInfo, defaultConnection, connection, group, capture=40, freeze, getImageBuffer, getImagePalette, put, realize, rewind, restore, setImageBuffer, setImagePalette, unfreeze, where, windowCommand, deleteCommand, cut, paste, copy, redo, undo, breakCommand, monitor, reserve, setAudioCommand, signal, setVideoCommand, qualityCommand, listCommand, configureCommand }
Enumeration that specifies the command that this event was generated for.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
enum SuccessCode { successful, preempted, aborted, error }
Enumeration that specifies if the command was successful. The following are valid values:
Windows | OS/2 | AIX |
Yes | Yes | No |
virtual ~IEvent()
IWindowHandle controlHandle() const
virtual IWindow* controlWindow() const
IEvent& decrementOwnerLevels()
virtual IWindow* dispatchingWindow() const
unsigned long eventId() const
IWindowHandle handle() const
IEvent(const IEvent& event)
IEvent( const IWindowHandle& handle, unsigned long eventId, const IEventParameter1& parameter1, const IEventParameter2& parameter2 )
IEvent( IWindow* window, unsigned long eventId, const IEventParameter1& parameter1, const IEventParameter2& parameter2 )
IEvent& operator =(const IEvent& event)
IEventParameter1 parameter1() const
IEventParameter2 parameter2() const
bool passToOwner() const
IEventResult result() const
IEvent& setControlHandle(const IWindowHandle& handle)
IEvent& setDispatchingHandle(const IWindowHandle& handle)
IEvent& setDispatchingWindow(IWindow* window)
IEvent& setHandle(const IWindowHandle& handle)
IEvent& setNumberOfLevels(int levels = - 1)
IEvent& setPassToOwner(bool passOn = true)
IEvent& setResult(const IEventResult& eventResult)
IEvent& setResult(bool eventResult)
virtual IWindow* window() const