共用方式為


IFeedEnclosure::AsyncDownload Method

Starts an asynchronous download.

Syntax

HRESULT AsyncDownload(VOID);

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

Downloads the enclosure asynchronously.

Feeds are downloaded on a separate thread within the current process. If the script or application that hosts the Windows RSS Platform terminates before the download is complete, the download is halted. To avoid exiting too early, wait until the IFeedEvents::FeedDownloadCompleted or IFeedFolderEvents::FeedDownloadCompleted event is fired.

The enclosure is passed to Background Intelligent Transfer Service (BITS) for download, which continues to run even if the calling process ends. If the BITS download fails, a separate process is launched to download the enclosure using standard HTTP. There are no enclosure download events.

To cancel an asynchronous download, use IFeedEnclosure::CancelAsyncDownload.

See Also

IFeed::Download