IWMPEvents interface (wmp.h)

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The IWMPEvents interface provides events that originate from the Windows Media Player control. An embedding program can respond to these events. The events exposed by IWMPEvents are also exposed by the _WMPOCXEvents interface.

In addition to the methods inherited from IUnknown, the IWMPEvents interface exposes the following methods.

Method Description
AudioLanguageChange Occurs when the current audio language changes.
Buffering Occurs when the Windows Media Player control begins or ends buffering.
CdromMediaChange Occurs when a CD or DVD is inserted into or ejected from a CD or DVD drive.
Click Occurs when the user clicks a mouse button.
CurrentItemChange Occurs when the currentItem property of the IWMPControls interface changes value.
CurrentMediaItemAvailable Occurs when the current media item becomes available.
CurrentPlaylistChange Occurs when something changes within the current playlist.
CurrentPlaylistItemAvailable Occurs when the current playlist item becomes available.
Disconnect Reserved for future use.
DomainChange Occurs when the DVD domain changes.
DoubleClick Occurs when the user double-clicks a mouse button.
DurationUnitChange Reserved for future use.
EndOfStream Reserved for future use.
Error Occurs when the Windows Media Player control has an error condition.
KeyDown Occurs when a key is pressed.
KeyPress Occurs when a key is pressed and then released.
KeyUp Occurs when a key is released.
MarkerHit Occurs when a marker is reached.
MediaChange Occurs when a media item changes.
MediaCollectionAttributeStringAdded Occurs when an attribute is added to the library.
MediaCollectionAttributeStringChanged Occurs when an attribute in the library is changed.
MediaCollectionAttributeStringRemoved Occurs when an attribute is removed from the library.
MediaCollectionChange Occurs when the media collection changes.
MediaError Occurs when the Media object has an error condition.
ModeChange Occurs when a mode of Windows Media Player is changed.
MouseDown Occurs when a mouse button is pressed.
MouseMove Occurs when the mouse pointer is moved.
MouseUp Occurs when a mouse button is released.
NewStream Reserved for future use.
OpenPlaylistSwitch Occurs when a title on a DVD begins playing.
OpenStateChange Occurs when the Windows Media Player control changes state.
PlayerDockedStateChange Occurs when a remoted Windows Media Player control docks or undocks.
PlayerReconnect Occurs when a remoted Windows Media Player control reconnects to the Player.
PlaylistChange Occurs when a playlist changes.
PlaylistCollectionChange Occurs when something changes in the playlist collection.
PlaylistCollectionPlaylistAdded Occurs when a playlist is added to the playlist collection.
PlaylistCollectionPlaylistRemoved Occurs when a playlist is removed from the playlist collection.
PlaylistCollectionPlaylistSetAsDeleted Reserved for future use.
PlayStateChange Occurs when the play state of the Windows Media Player control changes.
PositionChange Occurs when the current position of the media has been changed.
ScriptCommand Occurs when a synchronized command or URL is received.
StatusChange Occurs when the status property changes value.
SwitchedToControl Occurs when a remoted Windows Media Player control switches to the docked state.
SwitchedToPlayerApplication Occurs when a remoted Windows Media Player control switches to the full mode of the Player.
Warning Reserved for future use.

Inheritance

The IWMPEvents interface inherits from the IUnknown interface.

Methods

The IWMPEvents interface has these methods.

 
IWMPEvents::AudioLanguageChange

The AudioLanguageChange event occurs when the current audio language changes.
IWMPEvents::Buffering

The Buffering event occurs when the Windows Media Player control begins or ends buffering.
IWMPEvents::CdromMediaChange

The CdromMediaChange event occurs when a CD or DVD is inserted into or ejected from a CD or DVD drive.
IWMPEvents::Click

The Click event occurs when the user clicks a mouse button.
IWMPEvents::CurrentItemChange

The CurrentItemChange event occurs when the user or the IWMPControls::put_CurrentItem method changes the current item value.
IWMPEvents::CurrentMediaItemAvailable

The CurrentMediaItemAvailable event occurs when the current media item becomes available.
IWMPEvents::CurrentPlaylistChange

The CurrentPlaylistChange event occurs when something changes within the current playlist.
IWMPEvents::CurrentPlaylistItemAvailable

The CurrentPlaylistItemAvailable event occurs when the current playlist item becomes available.
IWMPEvents::Disconnect

The Disconnect event is reserved for future use.
IWMPEvents::DomainChange

The DomainChange event occurs when the DVD domain changes.
IWMPEvents::DoubleClick

The DoubleClick event occurs when the user double-clicks a mouse button.
IWMPEvents::DurationUnitChange

The DurationUnitChange event is reserved for future use.
IWMPEvents::EndOfStream

The EndOfStream event is reserved for future use.
IWMPEvents::Error

The Error event occurs when the Windows Media Player control has an error condition..
IWMPEvents::KeyDown

The KeyDown event occurs when a key is pressed.
IWMPEvents::KeyPress

The KeyPress event occurs when a key is pressed and then released.
IWMPEvents::KeyUp

The KeyUp event occurs when a key is released.
IWMPEvents::MarkerHit

The MarkerHit event occurs when a marker is reached.
IWMPEvents::MediaChange

The MediaChange event occurs when a media item changes.
IWMPEvents::MediaCollectionAttributeStringAdded

The MediaCollectionAttributeStringAdded event occurs when an attribute is added to the library.
IWMPEvents::MediaCollectionAttributeStringChanged

The MediaCollectionAttributeStringChanged event occurs when an attribute value in the library is changed.
IWMPEvents::MediaCollectionAttributeStringRemoved

The MediaCollectionAttributeStringRemoved event occurs when an attribute is removed from the library.
IWMPEvents::MediaCollectionChange

The MediaCollectionChange event occurs when the media collection changes.
IWMPEvents::MediaError

The MediaError event occurs when the Media object has an error condition.
IWMPEvents::ModeChange

The ModeChange event occurs when a mode of the player is changed.
IWMPEvents::MouseDown

The MouseDown event occurs when a mouse button is pressed.
IWMPEvents::MouseMove

The MouseMove event occurs when the mouse pointer is moved.
IWMPEvents::MouseUp

The MouseUp event occurs when a mouse button is released.
IWMPEvents::NewStream

The NewStream event is reserved for future use.
IWMPEvents::OpenPlaylistSwitch

The OpenPlaylistSwitch event occurs when a title on a DVD begins playing.
IWMPEvents::OpenStateChange

The OpenStateChange event occurs when the Windows Media Player control changes state.
IWMPEvents::PlayerDockedStateChange

The PlayerDockedStateChange event occurs when a remoted Windows Media Player control docks or undocks.
IWMPEvents::PlayerReconnect

The PlayerReconnect event occurs when a remoted Windows Media Player control reconnects to the Player.
IWMPEvents::PlaylistChange

The PlaylistChange event occurs when a playlist changes.
IWMPEvents::PlaylistCollectionChange

The PlaylistCollectionChange event occurs when something changes in the playlist collection.
IWMPEvents::PlaylistCollectionPlaylistAdded

The PlaylistCollectionPlaylistAdded event occurs when a playlist is added to the playlist collection.
IWMPEvents::PlaylistCollectionPlaylistRemoved

The PlaylistCollectionPlaylistRemoved event occurs when a playlist is removed from the playlist collection.
IWMPEvents::PlaylistCollectionPlaylistSetAsDeleted

The PlaylistCollectionPlaylistSetAsDeleted event is reserved for future use.
IWMPEvents::PlayStateChange

The PlayStateChange event occurs when the play state of the Windows Media Player control changes.
IWMPEvents::PositionChange

The PositionChange event occurs when the current playback position within the media item has been changed.
IWMPEvents::ScriptCommand

The ScriptCommand event occurs when a synchronized command or URL is received.
IWMPEvents::StatusChange

The StatusChange event occurs when the status property changes value.
IWMPEvents::SwitchedToControl

The SwitchedToControl event occurs when a remoted Windows Media Player control switches to the docked state.
IWMPEvents::SwitchedToPlayerApplication

The SwitchedToPlayerApplication event occurs when a remoted Windows Media Player control switches to the full mode of the Player.
IWMPEvents::Warning

The Warning event is reserved for future use.

Requirements

   
Target Platform Windows
Header wmp.h

See also

IWMPEvents2 Interface

Interfaces