Compartir a través de


Registry Keys and Entries for a Type 2 Online Store

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

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.

To make a type 2 online store available in Windows Media Player, the online store provider must create the following registry subkeys and entries on the user's computer.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaPlayer\Subscriptions\keyName]
"Capabilities"=dword:flags
"SubscriptionObjectGUID"=clsid
"FriendlyName"=friendlyName

[HKEY_CLASSES_ROOT\CLSID\clsid]
@=className

[HKEY_CLASSES_ROOT\CLSID\clsid\InprocServer32]
@=moduleName
"ThreadingModel"="Apartment"

In the preceding registry syntax, the symbols in italic are placeholders for names and globally unique identifiers (GUIDs) that are specific to the online store. The following table describes those placeholders.

Placeholder Description
keyName A string agreed upon between Microsoft and the online store. This string uniquely identifies the online store.Example: "Proseware"
flags A bitwise OR of one or more plug-in capability flags These flags specify whether Windows Media Player should call particular methods of IWMPSubscriptionService and IWMPSubscriptionService2. For information about supported flags, see the table of plug-in capability flags that follows this table.Example: 00000037
clsid A GUID that is the class identifier (CLSID) for the class that implements IWMPSubscriptionService in the online store's plug-in. This GUID must be in registry format, complete with the curly braces.Format: {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
friendlyname A friendly name for the online store.Example: "Proseware Music Service"
pluginName A name for the online store's plug-in.Example: "Proseware Service Plug-in"
className The name of the class that implements IWMPSubscriptionService in the online store's plug-in.Example: "CProsewareService"
moduleName The fully qualified path to the DLL that implements the online store's plug-in.Example: "C:\Program Files\Proseware\ProsewareService.dll"

The following table describes the plug-in capability flags.

Flag Value Description
SUBSCRIPTION_CAP_ALLOWPLAY 0X1 Windows Media Player should call IWMPSubscriptionService::allowPlay.
SUBSCRIPTION_CAP_ALLOWCDBURN 0X2 Windows Media Player should call IWMPSubscriptionService::allowCDBurn.
SUBSCRIPTION_CAP_ALLOWPDATRANSFER 0X4 Windows Media Player should call IWMPSubscriptionService::allowPDATransfer.
SUBSCRIPTION_CAP_BACKGROUNDPROCESSING 0X8 Windows Media Player should call IWMPSubscriptionService::startBackgroundProcessing.
SUBSCRIPTION_CAP_DEVICEAVAILABLE 0X10 Windows Media Player should call IWMPSubscriptionService2::deviceAvailable.
SUBSCRIPTION_CAP_PREPAREFORSYNC 0X20 Windows Media Player should call IWMPSubscriptionService2::prepareForSync.
SUBSCRIPTION_V1_CAPS 0XF Default. This value is used if none is registered. This is equivalent to combining SUBSCRIPTION_CAP_ALLOWPLAY, SUBSCRIPTION_CAP_ALLOWCDBURN, SUBSCRIPTION_CAP_ALLOWPDATRANSFER, and SUBSCRIPTION_CAP_BACKGROUNDPROCESSING.

Registry Entries for Development and Testing

When you begin developing your online store, Microsoft provides you with two keys: a test key and a production key. During the development and testing phase, your online store will appear in Windows Media Player only if your test key or your production key is in the registry on the user's computer. For more information about the test and production keys, see Test and Production Keys for a Type 2 Online Store.

Place your test or production key in the following location in the registry.

[HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer\Services]
"TestParameter" = "key1;key2;...;keyN"

Note that the value of the TestParameter registry entry can specify multiple test or production keys. For example, suppose that Proseware has a test key of "1234" and Contoso has a test key of "2345". The following registry entry specifies that the test stores for Proseware and Contoso will appear in Windows Media Player.

[HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer\Services]
"TestParameter" = "1234;2345"

ActiveService Registry Entry

When the user activates an online store, Windows Media Player writes information in the registry that identifies the active online store. Windows Media Player places the information in the following location in the registry on the user's computer.

[HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer\Subscriptions]
"ActiveService"=serviceInfo

In the preceding registry syntax, serviceInfo is a placeholder for a string that contains descriptive information about the active online store.

Reference for Type 2 Online Stores