"blisspikle" <er***@johndenley.netschrieb
I could do some other ways to get by the problem, I just thought
that waiting would eat up less processor time then doing loops. I
could do something with the Done Event firing and indexing a counter
to go on to the next stage?
That's the best approach IMO.
I am going to look into the Doevents,
because I have never used this and not sure what it does.
Naah, please not. :-)
If I add a few of these processor objects to a List(of T), how can I
watch for the event to fire? Am I going to have to use addhandler
for every object that I create?
Yes
Some people have mentioned using state machines? Is there any good
links for templates on how to do state machines to control a
program?
I haven't heard of it, but if anybody reads this...... ?
For the output below, does that mean the dll is coded in a
"unmanaged" language?
In first place it means that MessageBox.ShowCore calls unmanaged code. It
also includes a kind of message loop like with other windows. Therefore,
also the message from the Procssor component can be processed. Though I
don't know whether it comes from a managed or unmanaged component. Mixed
mode is also possible.
[Native to Managed Transition]
[Managed to Native Transition]
[Native to Managed Transition]
[Managed to Native Transition]
You can try to enable "unmanaged debugging" in the project properties,
configuration settings. Then you should get the full call stack revealing
the unmanaged code. As I don't have you Processor component, I did it with a
Winforms Timer, setting a breakpoint in it's Tick event, so the follwing
should be similar to yours:
user32.dll!_InternalCallWinProc@20()
user32.dll!_UserCallWinProc@24()
user32.dll!_DispatchMessageWorker@8()
user32.dll!_DispatchMessageW@4()
user32.dll!_DialogBox2@16()
user32.dll!_InternalDialogBox@24()
user32.dll!_SoftModalMessageBox@4()
user32.dll!_MessageBoxWorker@4()
user32.dll!_MessageBoxTimeoutW@24()
user32.dll!_MessageBoxExW@20()
user32.dll!_MessageBoxW@16()
system.windows.forms.dll!System.Windows.Forms.Mess ageBox.ShowCore
Armin