
Signature
HTH
Stoitcho Goutsev (100)
>I like the concept and features of the BackgroundWorker. However, I
>observed
[quoted text clipped - 21 lines]
>
> Thanks,
The main thread does have a UI, however the main message pump is a Visual
Basic 6.0 implementation. Our system is a COM based plugin architecture and
we are using interop to develop .NET based components.
The invoking component is on the main thread and, hence, does have a UI,
however I was concerned that it wasn't a .NET message pump and the client
that invokes the BackgroundWorker is merely a .NET class with no UI
components.
Are you confident that the call would be marshalled back to the main UI in
this instance.
Also, I wasn't concerned about loading or distributing System.Windows.Forms,
I was more concerned about having to show a form or keep a form around when
it seemed like more code and capability than needed.
Thanks,

Signature
Brian R.
> Brian,
>
[quoted text clipped - 36 lines]
> >
> > Thanks,
Stoitcho Goutsev (100) - 15 Mar 2006 22:58 GMT
Brian,
I was looking at the code of the BackgroundWorker. There is nothing that
uses any windows forms control unlike the implementation of
System.Timers.Timer class where the sychronization is based on
ISychornizeInvoke interface (usualy controls).
BackgroundWorker uses the AsyncOperationManager class and works without
controls, but the thread has to have running pump. I believe that it still
uses windows messages but it post them directly to the thread not to any
window.
I tested it with message loop and no controls, but the message loop was
created using the Application class. I don't know if it works with UI
threads where the message loop is created in some other way. You should give
it a try. I can't set up such an environment easy enough in order to test
it.

Signature
Stoitcho Goutsev (100)
> The main thread does have a UI, however the main message pump is a Visual
> Basic 6.0 implementation. Our system is a COM based plugin architecture
[quoted text clipped - 70 lines]
>> >
>> > Thanks,