Windows Media Player 11 SDK IWMPContentPartner::GetCommands 

Windows Media Player SDK banner art

Previous Next

IWMPContentPartner::GetCommands

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 GetCommands method retrieves context menu commands.

Syntax

  HRESULT GetCommands(
  BSTR  location,
  VARIANT*  pLocationContext,
  BSTR  itemLocation,
  ULONG  cItemIDs,
  ULONG*  prgItemIDs,
  ULONG*  pcItemIDs,
  WMPContextMenuInfo**  pprgItems
);

Parameters

location

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

pLocationContext

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

itemLocation

[in]  A library location constant that indicates 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.

cItemIDs

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

prgItemIDs

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

pcItemIDs

[out]  The number of elements in the pprgItems array.

pprgItems

[out]  Address of a variable that receives a pointer to an array of WMPContextMenuInfo structures.

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

This method must call CoTaskMemAlloc to allocate the array that it returns in pprgItems.

Requirements

Version: Windows Media Player 11

Header: contentpartner.h

See Also

Previous Next