Media Center Core Commands

MC Core Commands are used to control various aspects of Media Center via software or command line.
Each command consists of a name (or number), followed by an optional parameter which selects or specifies the particular command behavior.

How To Issue Media Core Commands

Look up the command name / number and its parameter in the tables below. For example, the command to toggle between play and pause is MCC_PLAY_PAUSE. It has command number (enum value) 10000 and its accompanying parameter is ignored. Some MCC commands may be targeted a particular Zone - see Specifying Zones.

Issuing a command from the command line

Assuming you are familiar with the first section of The Command Line, the general syntax for issuing an MCC command from the Windows command line (or equivalent) is:

MC<version>.exe/MCC<command number>,<parameter>

Note: Command numbers must be used; command names are not used on the command line.

Example: To toggle between play and pause in MC16, use the command:

MC18.exe /MCC 10000,0

Note: The MCC commands can be entered in Vista and Windows 7 directly into Search Files and Programs under the Windows Start menu, or as commands in a Windows command shell, which can be launched in Vista and Windows 7 by entering cmd.exe in Search Files and Programs under the Windows Start menu. It is available under the Accessories menu as Command Prompt in previous versions of Windows.

Issuing a command from C++

The calling syntax for posting a WM_MC_COMMAND -based message to the MC frame is demonstrated in the example below.

Specifying Zones

Media Center Core Commands are targeted to a specific playback zone by combining the command's parameter value with the zone specifier value from the Zone Specifiers table. MC zones are integer indexes, from 0 to n, where 0 is the the first local zone, 1 is the second local zone, and so on. Remote zones, such as those for DLNA devices, will not be contiguous with local zones. A list of zones can be obtained using the MCWS command:

http://<server IP>:52199/MCWS/v1/Playback/Zones

MC version 16.0.118 has simplified command line specification of parameter and zone, eliminating the need for manual calculations prior to usage. The /MCC option now accepts an alternate syntax in the format of [value]:[zone index] for the parameter (see examples). The text that follows documents and describes the original (and still valid) specification, which would be used when issuing an MCC command through a mechanism other than the MC18.exe command.

Zone Specifiers

Zone

Decimal

Hexidecimal

Current

0

0x00000000

0

16777216

0x01000000

1

33554432

0x02000000

2

50331648

0x03000000

3

67108864

0x04000000

4

83886080

0x05000000

5

100663296

0x06000000

...

...

...

30

260046848

0x1F000000

31

520093696

0x20000000

Technically speaking, the command's parameter is OR'd with the zone specifier value, where bits 0 - 23 specify the command parameter, and bits 24 - 29 specify the zone. For command line usage, the final parameter value to pass to Media Center can be calculated as follows:

If the parameter is >= 0, the final value = zone specifier + parameter

If the parameter is < 0, the final value = zone specifier + parameter + 16777216

The look-up table below shows some pre-calculated parameter values for each of zones 0 through 5 for some typical commands. Find the desired operation, command and command number, and select the cell under the desired zone to obtain the final parameter value.