Windows Media Player 11 SDK Windows Media Player BITS Job ConventionĀ 

Windows Media Player SDK banner art

Previous Next

Windows Media Player BITS Job Convention

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.

Windows Media Player can automatically download and add digital media items to the library if you use Background Intelligent Transfer Service (BITS). To take advantage of this feature, you must add your job to the BITS transfer queue and call IBackgroundCopyJob::SetDescription, providing a description string that uses the correct format.





A randomly generated 32-bit value that Windows Media Player uses to identify the service.


The provider name. This value must match a valid online store key name.


The name of the primary artist for the album.


The title of the album.


The CD track number.


The title of the content.


The duration of the content.


The rating for the content.


When Windows Media Player 10 or later uses BITS to download content, it enumerates the jobs in the transfer queue and inspects the description string for each job. If the description string matches the expected convention, Windows Media Player downloads the content.

You must add only one digital media file for download to each BITS job.

Once you start a BITS job using this convention, you must let Windows Media Player complete the job. Windows Media Player will also remove the job from the BITS queue, move the downloaded file to the location where ripped music is saved, and add the downloaded file to the library.

The serviceId parameter must contain a non-zero 32-bit value. We recommend that you use the Platform SDK function CryptGenRandom to create this value.

The file name you specify using the localName parameter of IBackgroundCopyJob::AddFile must have a .wma, .wmv, .mp3, or .asf file name extension.

The remaining parameters are designed to contain metadata values related to the content. You can retrieve these values from your online store Web page by using DownloadItem.getItemInfo. You can retrieve the correct download collection by calling DownloadManager.getDownloadCollection and providing serviceId as the collectionId parameter.

Windows Media Player inspects the BITS queue periodically while the Player is running. To ensure that Windows Media Player checks the BITS queue for download jobs, you should create a value in the following registry subkey:


The value should be created as follows.

Name Type Description
RefreshDownload DWORD Specifies whether Windows Media Player should inspect the BITS queue for download jobs. If the value is zero, the Player will not inspect the BITS queue. The Player must inspect the queue if the value is non-zero.

You can use the following alternate syntax to add BITS jobs that Windows Media Player does not complete, but for which it simply shows status information:


When you use the preceding syntax, you must write code to complete the BITS download, organize the content on the user's computer, and add the content to the library, if desired.

For more information about BITS, see the MSDN Web site.


Version: Windows Media Player 10 or later.

Library: Use wmp.dll.

Platform: Windows XP.

See Also

Previous Next