다음을 통해 공유


IWMPNetwork::get_downloadProgress method (wmp.h)

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

The get_downloadProgress method retrieves the percentage of the download completed.

Syntax

HRESULT get_downloadProgress(
  [out] long *plDownloadProgress
);

Parameters

[out] plDownloadProgress

Pointer to a long containing the download progress.

Return value

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

When the Windows Media Player control is connected to a digital media file that can be played and downloaded at the same time, the get_downloadProgress method retrieves the percentage of the total file that has been downloaded. This feature is currently supported only for digital media files downloaded from web servers. The following file formats can be downloaded and played simultaneously:

  • Advanced Systems Format (ASF)
  • Windows Media Audio (WMA)
  • Windows Media Video (WMV)
  • MP3
  • MPEG
  • WAV
In addition, some AVI files can be downloaded and played simultaneously.

Use the IWMPEvents::Buffering event to determine when buffering starts or stops.

Requirements

Requirement Value
Minimum supported client Windows Media Player 9 Series or later.
Target Platform Windows
Header wmp.h
DLL Wmp.dll

See also

IWMPEvents::Buffering

IWMPNetwork Interface