Partager via


IWMPSettings::put_invokeURLs 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 put_invokeURLs method specifies a value indicating whether URL events should launch a Web browser.

Syntax

HRESULT put_invokeURLs(
  [in] VARIANT_BOOL fInvokeURLs
);

Parameters

[in] fInvokeURLs

VARIANT_BOOL indicating whether URL events should launch a Web browser. The default is TRUE.

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

Digital media files and streams can contain URL script commands. When a URL script command is sent to the Windows Media Player control, it is passed first to the ScriptCommand event handler regardless of the value specified in put_invokeURLs. After ScriptCommand exits, Windows Media Player checks the VARIANT_BOOL specified in put_invokeURLs to determine whether to launch the default Web browser with the URL. You can selectively display URLs by checking them in ScriptCommand and setting put_invokeURLs as needed.

Windows Media Player 10 Mobile: This method only accepts a VARIANT_BOOL set to FALSE, otherwise an E_INVALIDARG HRESULT is returned.

Requirements

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

See also

IWMPEvents::ScriptCommand

IWMPSettings Interface

IWMPSettings::get_invokeURLs