G
Guest
Hi,
In traditional win32 programming, if for example I have to parse a large
bunch of data where I only need some fragments out, I should create a class
with a hidden window wich post a message to the window's WndProc who on his
part fire an event with the data part. Of course othere alternatives are, but
that's not the question. It is just one solution for particular problems and
it is very simple.
The question is what are the alternatives for this in .NET ?
1. Using P/Invoke for use PostMessage, override WndProc of the form and do
in fact the same.
2. Using a thread to handle all
3. Make a class that does it in a thread, and make an event handler for
every needed data part, eventually use Control.BeginInvoke or Control.Invoke
to synchronize with main thread.
Other alternatives ?
In traditional win32 programming, if for example I have to parse a large
bunch of data where I only need some fragments out, I should create a class
with a hidden window wich post a message to the window's WndProc who on his
part fire an event with the data part. Of course othere alternatives are, but
that's not the question. It is just one solution for particular problems and
it is very simple.
The question is what are the alternatives for this in .NET ?
1. Using P/Invoke for use PostMessage, override WndProc of the form and do
in fact the same.
2. Using a thread to handle all
3. Make a class that does it in a thread, and make an event handler for
every needed data part, eventually use Control.BeginInvoke or Control.Invoke
to synchronize with main thread.
Other alternatives ?