Share via


Windows Media Player 11 SDK IWMPControls::playItem 

Windows Media Player SDK banner art

Previous Next

IWMPControls::playItem

The playItem method plays the specified media item.

Syntax

  

Parameters

pIWMPMedia

[in]  Pointer to an IWMPMedia interface.

Return Values

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK The method succeeded.

Remarks

The media item will load and play automatically, regardless of the value retrieved by the IWMPSettings::get_autoStart method. To load an item without playing it automatically, pass in a VARIANT_BOOL set to FALSE in the IWMPSettings::put_autoStart method and specify a URL in IWMPCore::put_URL, after which IWMPControls::play can be called to start playing the item.

Note   playItem works only with items retrieved from IWMPCore::get_currentPlaylist. Calling playItem with a reference to a saved media item is not supported.

Requirements

Version: Windows Media Player 9 Series or later.

Header: Include wmp.h.

Library: Use wmp.dll.

See Also

Previous Next