| Previous | Next |
| NS_E_WMPOCX_NOT_RUNNING_REMOTELY | NS_E_WMPOCX_ERRORMANAGERNOTAVAILABLE |
NS_E_WMPOCX_NO_REMOTE_WINDOW
When you embed the Windows Media Player control in a C++ program, you can use it as a remote extension of the full mode of the Player. This is called "remoting" the Windows Media Player control, and it lets you provide all the features of the full mode Player without implementing them yourself.
When you remote the control, it shares the same playback engine as the full mode of the Player and your users can switch back and forth between embedded mode (the "docked" state) and full mode (the "undocked" state) while digital media playback continues uninterrupted.
Enabling Remote Embedding
To enable remote embedding of the Windows Media Player control, your program must implement the IServiceProvider and IWMPRemoteMediaServices interfaces. IServiceProvider is a standard Component Object Model (COM) interface with a single method called QueryService. Windows Media Player calls this method to retrieve a pointer to an IWMPRemoteMediaServices interface.
IWMPRemoteMediaServices has several methods, but only two of them are directly relevant to remoting. In GetApplicationName, you return the name of your program, which Windows Media Player adds to the Switch to Other Program list on the View menu. In GetServiceType, you indicate the embedding mode of the control by returning a value of either "Remote" or "Local". If a remote connection is successfully established, the get_isRemote method of the IWMPPlayer4 interface returns true.
Media Player (Windows)
Media Player (formerly Windows Media Player or WMP) is a media player and media library application developed by Microsoft that is used for playing audio, video and viewing images on personal computers running the Microsoft Windows operating system, as well as on Pocket PC and Windows Mobile-based devices. Editions of Windows Media Player were also released for classic Mac OS, Mac OS X and Solaris but development of these has since been discontinued.
In addition to being a media player, Windows Media Player includes the ability to rip music from and copy music to compact discs, burn recordable discs in Audio CD format or as data discs with playlists such as an MP3 CD, synchronize content with a digital audio player (MP3 player) or other mobile devices, and enable users to purchase or rent music from a number of online music stores.
Windows Media Player 11 is available for Windows XP and included in Windows Vista and Windows Server 2008. The default file formats are Windows Media Video (WMV), Windows Media Audio (WMA), and Advanced Systems Format (ASF), and its own XML based playlist format called Windows Playlist (WPL). The player is also able to utilize a digital rights management service in the form of Windows Media DRM.
Windows Media Player 12 is the most recent version of Windows Media Player prior to Windows 11. It was released on October 22, 2009 along with Windows 7 and has not been made available for previous versions of Windows nor has it been updated since for Windows 8, Windows 8.1, Windows 10, and Windows 11. Windows 8 and later instead use Groove Music (for audio) and Microsoft Movies & TV (for video) as the default playback applications for most media; As of October 2021, Windows Media Player is still included as a Windows component. Windows RT does not run Windows Media Player.
On November 16, 2021, Microsoft announced that it would replace Groove Music with the new Media Player application, though the legacy Windows Media Player will continue to be included with Windows 11.