WMPuICE plugin for Windows Media Player 9 Readme

This plugin for Windows Media Player 9 can be used to access the automation interfaces of a running WMP application from external programs or scripts. Included is an application preset for uICE to use remote controls with WMP.

Get uICE at http://www.mediatexx.com. You can also find the latest version of this plugin in the download section.

 

Installation

Copy the files wmpuice.dll, install.bat and uninstall.bat to a location of your choice. To install the plugin, run install.bat, to uninstall it, run uninstall.bat (who would have thought that... ;-) ).

If you want to use the plugin with uICE, copy the file Windows Media Player 9.uap to the uICE\apps folder (C:\Program Files\uICE\apps by default). Run uICE and import the application preset into uICE as usual. Note that the preset requires uICE version 2.27 or later.

 

Usage from external scripts/programs

Create an instance of the plugin's IDispatch interface using the ProgID WMPuICE.WMPApp (try WMPuICE.WMPApp.1 if it doesn't work) or the CLSID {2667A030-07F5-45F3-B064-8ACA073B1F94} with CoCreateInstance, new ActiveXObject, CreateObject or whatever. The property Core of this interface gives you an IDispatch pointer to the IWMPCore interface. Now do what you want with it...

Methods:

Open()  opens WMP
Close() closes WMP
Fullscreen() toggles fullscreen mode

Up()
Down()
Left()
Right()
Select()

DVD menu navigation methods

Properties:

Core    IWMPCore's IDispatch (read-only)
Running    boolean value indicating whether WMP is running (read/write)

ATL Example:

Note: for readability the example code does not contain any error checking. Always check error codes!
You must install the WMP SDK and include the header files somewhere to have a definition of the IWMPCore interface (of course not required if you want to use dispinterfaces only).

CLSID clsid;
CLSIDFromString(L"{2667A030-07F5-45F3-B064-8ACA073B1F94}",&clsid);
CComPtr<IDispatch> pdisp;
CoCreateInstance(clsid,NULL,CLSCTX_ALL,IID_IDispatch,(LPVOID*)&pdisp);
CComVariant var;
pdisp.GetPropertyByName(L"Core",&var);
CComQIPtr<IWMPCore, &__uuidof(IWMPCore)> pCore(var.pdispVal);

JScript Example:

plugin=new ActiveXObject("WMPuICE.WMPApp");
wmp=plugin.Core;

 

Here's a small example with a few buttons to see it in action. Note that you must first install the plugin.

 
 

Show Playlist Contents

 

Disclaimer and legal stuff

This plugin (the "software") is completely free for personal use. Use it without charge as long as you want. If you plan to use it in your own application, distribute it or use it in any other way that may result in distribution ("your product"), you must mention the author (this is /me, Christian Mueller) and include a link to the uICE website ( http://www.mediatexx.com ) somewhere in your product, visible to the end user.

This software is provided "AS IS". Although it is thoroughly tested, it may contain hidden bugs. The author disclaims all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The author assumes no liability for damages, data loss, loss of profits or any other kind of loss, direct or consequential, which may result from the use/misuse, the unability to use or the installation of this software.

Installing, distributing or using the software in any other way signifies acceptance of the above terms.