Share via


IWMPContentPartner::InvokeCommand method (contentpartner.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.]

Note  This section describes functionality designed for use by online stores. Use of this functionality outside the context of an online store is not supported.
 
The InvokeCommand method invokes a context menu command.

Syntax

HRESULT InvokeCommand(
  [in] DWORD   dwCommandID,
  [in] BSTR    location,
  [in] VARIANT *pLocationContext,
  [in] BSTR    itemLocation,
  [in] ULONG   cItemIDs,
  [in] ULONG   *rgItemIDs
);

Parameters

[in] dwCommandID

ID of the command to invoke. Windows Media Player previously obtained this command ID from the content partner plug-in by calling IWMPContentPartner::GetCommands.

[in] location

A library location constant that specifies the type of library view where the user right-clicked. For example, the constant g_szCPGenreID specifies that the user right-clicked in the view of a particular genre.

[in] pLocationContext

TheID of the specific view where the user right-clicked. For example, if location is g_szCPGenreID, then this parameter is the ID of the particular genre the user was viewing when he or she right-clicked.

[in] itemLocation

A library location constant that specifies the type of the media item or items that were selected when the user right-clicked. For example, the constant g_szCPAlbumID specifies that the user right-clicked when one or more albums were selected.

[in] cItemIDs

The number of items that were selected when the user right-clicked. This is the number of elements in the rgItemIDs array.

[in] rgItemIDs

An array that contains the IDs of the media items that were selected when the user right-clicked.

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.

Requirements

Requirement Value
Minimum supported client Windows Media Player 11
Target Platform Windows
Header contentpartner.h

See also

IWMPContentPartner Interface