Online stores can provide custom context menus. To do this, the online store plug-in implements the IWMPContentPartner::GetCommands method. Windows Media Player calls this method to provide information about the location in the user interface where the context menu is displayed (where the user right-clicked). The plug-in returns an array of WMPContextMenuInfo structures that describe each context menu item, including a command ID for each.
After Windows Media Player has retrieved the array, the Player uses the array to build the context menu the user sees. When the user clicks an item in the context menu, the Player calls IWMPContentPartner::InvokeCommand, passing the command ID associated with the menu item through the dwCommandID parameter. The Player also passes a library location value and an array of IDs that represents the items the menu was invoked upon, such as an array of track IDs. By using this information, the plug-in can start any appropriate process in response to the user's mouse click.