Share via


Windows Media Player 11 SDK Starting the Downloads 

Windows Media Player SDK banner art

Previous Next

Starting the Downloads

The downloading starts when the user clicks Download. This button is named btnDownload in the code and the event handler function for the onClick event is named OnDownload.

OnDownload first creates a new empty DownloadCollection object and assigns it to a local variable.

oDLC = g_oManager.createDownloadCollection();

Next, the function starts each of the five items downloading and stores the returned DownloadItem object in an array.

g_DLI[0] = oDLC.startDownload(g_sFiles[0], g_sDLType);
g_DLI[1] = oDLC.startDownload(g_sFiles[1], g_sDLType);
g_DLI[2] = oDLC.startDownload(g_sFiles[2], g_sDLType);
g_DLI[3] = oDLC.startDownload(g_sFiles[3], g_sDLType);
g_DLI[4] = oDLC.startDownload(g_sFiles[4], g_sDLType);

The code then updates the user interface elements with the information about the download collection and its download items.

See Also

Previous Next