Registering Application Dependency (Windows Media Player SDK)

[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.]

Applications that use APIs provided by the Windows Media Player SDK or Windows Media Format SDK are dependent upon the runtime components of those technologies. You can register your application as being dependent on those components as part of your application setup.

When you register your application, you can choose one of two levels of dependency: blocking or dependent. When one or more application is registered with a blocking dependency on one of the runtime components, the component will be blocked from a rollback to a previous version. Dependent applications that are not registered as blocking do not block rollback. Instead, before the rollback is performed, the user is displayed a message stating that applications are dependent on the component.

To register your application, you must set a value in the registry that identifies your application. The registry value to set depends on the component on which your application is dependent. You can also set two additional values per dependency to provide extra information about your application.

The following registry values are used to register dependence on Windows Media Player SDK runtime:

  • HKEY_CLASSES_ROOT\Software\Microsoft\MediaPlayer\Setup\ REF_TYPE \App, "APP", "APP_STRING"
  • HKEY_CLASSES_ROOT\Software\Microsoft\MediaPlayer\Setup\ REF_TYPE \Descriptor, "APP", "REF_DESCRIPTOR"
  • HKEY_CLASSES_ROOT\Software\Microsoft\MediaPlayer\Setup\ REF_TYPE \Version, "APP", "WMP_VERSION"

The following registry values are used to register dependence on the Windows Media Format SDK runtime:

  • HKEY_CLASSES_ROOT\Software\Microsoft\WindowsMedia\Setup\ REF_TYPE \App, "APP", "APP_STRING"
  • HKEY_CLASSES_ROOT\Software\Microsoft\WindowsMedia\Setup\ REF_TYPE \Descriptor, "APP", "REF_DESCRIPTOR"
  • HKEY_CLASSES_ROOT\Software\Microsoft\WindowsMedia\Setup\ REF_TYPE \Version, "APP", "WMF_VERSION"

The following variables are used in the registry values listed above:

REF_TYPE

Replace with BlockingRefCounts for blocking dependency, or with DependentRefCounts for non-blocking dependency.

APP

Name or short descriptor of your application. This string will not be used in messages displayed for the user. This value is the identifier used in all three registry values associated with each of the runtime components.

APP_STRING

Descriptor of your application. This string may be used in messages displayed for the user.

REF_DESCRIPTOR

Description of how your application uses the component. This value can include a maximum of 256 characters.

WMP_VERSION

Version of Windows Media Player required by your application. If no version is specified, the default value is assumed to be 9.0.0.0.

WMF_VERSION

Version of the Windows Media Format SDK required by your application.

The following three example registry values demonstrate how to configure the values for your application:

  • HKEY_CLASSES_ROOT\Software\Microsoft\MediaPlayer\Setup\DependentRefCounts\App, "SouthridgeVideo", "Southridge Video Player"
  • HKEY_CLASSES_ROOT\Software\Microsoft\MediaPlayer\Setup\DependentRefCounts\Descriptor, "SouthridgeVideo", "Southridge Video Player uses the Windows Media Format SDK to play video files."
  • HKEY_CLASSES_ROOT\Software\Microsoft\MediaPlayer\Setup\DependentRefCounts\Version, "SouthridgeVideo", "9.0.0.2600"

Registry Settings