Share via


Windows Media Player 11 SDK IWMPContentPartnerCallback::DownloadTrack 

Windows Media Player SDK banner art

Previous Next

IWMPContentPartnerCallback::DownloadTrack

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.

The DownloadTrack method instructs Windows Media Player to download or not to download a particular media item.

Syntax

  HRESULT DownloadTrack(
  DWORD  cookie,
  BSTR  bstrTrackURL,
  DWORD  dwServiceTrackID,
  BSTR  bstrDownloadParams,
  HRESULT  hrDownload
);

Parameters

cookie

[in]  A cookie that identifies a download session. Windows Media Player previously supplied this cookie to the content partner plug-in by calling IWMPContentPartner::Download.

bstrTrackURL

[in]  The URL of the track to download.

dwServiceTrackID

[in]  The ID of the track in question.

bstrDownloadParams

[in]  Data that the online store wants to associate with the track in question. Windows Media Player does not interpret this data; it is meaningful only to the online store. Windows Media player passes this data back to the online store when it calls IWMPContentPartner::DownloadTrackComplete.

hrDownload

[in]  An HRESULT that specifies whether to download the track. Any success code specifies that the Player should download the track. Any failure code specifies that the Player should not download the track.

Return Values

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK The method succeeded.

Remarks

For an explanation of how the Player and the plug-in work together to download a set of tracks, see Downloading Media Content.

This method must be called only after a license has been predelivered for the file. The file will be placed in the user's Music folder and automatically added to the library when downloading is complete.

Requirements

Version: Windows Media Player 11

Header: contentpartner.h

See Also

Previous Next