Share via


IWMPPlayer4::openPlayer method (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 openPlayer method opens Windows Media Player using the specified URL.

Syntax

HRESULT openPlayer(
  [in] BSTR bstrURL
);

Parameters

[in] bstrURL

BSTR containing the URL of the media item to play.

Return value

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

This method launches Windows Media Player with the specified URL set as the current media item. If the Player was previously closed in skin mode it will open using the skin last chosen by the user. Otherwise, the Player opens in full mode.

If this method is called from a Windows Media Player ActiveX control embedded in remote mode, its behavior is identical to the IWMPPlayerAppication::switchToPlayerApplication method.

Windows Media Player 10 Mobile: This method always returns E_NOTIMPL.

Requirements

   
Minimum supported client Windows Media Player 9 Series or later.
Target Platform Windows
Header wmp.h
DLL Wmp.dll

See also

IWMPPlayer4 Interface

IWMPPlayerAppication::switchToPlayerApplication