IWMReaderAdvanced2::GetDownloadProgress method

The GetDownloadProgress method retrieves the percentage and amount of data that has been downloaded, and the time remaining to completion.

Syntax

HRESULT GetDownloadProgress(
  DWORD *pdwPercent,
  QWORD *pqwBytesDownloaded,
  QWORD *pcnsDownload
);

Parameters

pdwPercent

Pointer to a DWORD containing the percentage of data that has been downloaded.

pqwBytesDownloaded

Pointer to a QWORD containing the number of bytes of data downloaded.

pcnsDownload

Pointer to variable specifying the time remaining, in 100-nanosecond units, for data to be downloaded.

Return value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

This method can be called to monitor progress while content is being downloaded from a Web server.

Content can be downloaded from a Web server when either the play mode is WMT_PLAY_MODE_AUDTOSELECT (in which case the reader automatically adjusts its play mode to DOWNLOAD) or the play mode is explicitly set to WMT_PLAY_MODE_DOWNLOAD.

If one of these two play modes is not current, and this method is called, all parameters return zero.

Before the first WMT_BUFFERING_START event, all the parameters return zero. Between WMT_BUFFERING_START and WMT_END_OF_STREAMING, the values for the percentage of downloading completed and number of bytes downloaded always increase. The value for the number of seconds of downloading remaining can go up or down depending on changing download rates. After WMT_END_OF_STREAMING has been sent, the percentage returns 100, bytes downloaded remains at the size of the download, and seconds remaining is zero.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only],Windows Media Format 7 SDK, or later versions of the SDK
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wmsdkidl.h (include Wmsdk.h)
Library Wmvcore.lib; WMStubDRM.lib (if you use DRM)

See also

IWMReaderAdvanced2 Interface

WMT_PLAY_MODE