471,605 Members | 1,369 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

How do you do asynchronous processing in C#

GS
Hello,

I'm trying to implement asynchronous call to COM interface below and having trouble understanding what C# code will allow me to update progress bar while call is running.
I have an object called MyDownloader which has a method of BeginDownload below, I need to periodically update main program about progress and when call is completed to return back to processing.
Any sample code?
HRESULT BeginDownload(
IUnknown* onProgressChanged,
IUnknown* onCompleted,
VARIANT state,
IDownloadJob** retval
);
Parameters
onProgressChanged
[in] An IDownloadProgressChangedCallback interface that is called periodically for download progress changes before completion.
onCompleted
[in] An IDownloadCompletedCallback interface (C++/COM) that is called when an asynchronous download operation is complete.
state
[in] The caller-specific state that AsyncState Property of IDownloadJob returns.
retval
[out] An IDownloadJob interface that contains the properties and methods that are available to a download operation that has started.
Feb 8 '06 #1
0 3192

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by ... | last post: by
1 post views Thread by hs | last post: by
9 posts views Thread by Michael Lindsey | last post: by
1 post views Thread by MSDN | last post: by
1 post views Thread by dba123 | last post: by
reply views Thread by Bishoy George | last post: by
4 posts views Thread by Engineerik | last post: by
4 posts views Thread by Morgan Cheng | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.