U
Uchiha Jax
Hi,
Recently had an issue with the Audio object from
Microsoft.DirectX.AudioVideoPlayback. None of the events were firing from
the object during tests (NUnit or Console). Knowing I had it working
perfectly well in the application running on my tablet PC next to me, I
managed to narrow down the defining factor between the two applications and
found that it was a one line difference.
Application.Run().
I found I could "fix" my test by putting Application.Run at the end of the
thread that initializes the object. This is of course equivalent to loading
it into a Form and running the same thread in the LoadEvent of the form.
Having never encountered this problem before I had some questions that I
wondered if anyone could help me understand.
What exactly is the "standard application message loop" (from MS
documentation:
http://msdn.microsoft.com/library/d...ystemWindowsFormsApplicationClassRunTopic.asp)
and how does this differ to a standard thread event model?
Are there ways in which you can find out if an object requires the "standard
application message loop" other than trial and error?
Does anyone have any other information on this subject as I find it a
fascinating situation.
If anyone could drop some knowledge i'd appreciate it as I don't understand
this at all.
Kind Regards
Jax
Recently had an issue with the Audio object from
Microsoft.DirectX.AudioVideoPlayback. None of the events were firing from
the object during tests (NUnit or Console). Knowing I had it working
perfectly well in the application running on my tablet PC next to me, I
managed to narrow down the defining factor between the two applications and
found that it was a one line difference.
Application.Run().
I found I could "fix" my test by putting Application.Run at the end of the
thread that initializes the object. This is of course equivalent to loading
it into a Form and running the same thread in the LoadEvent of the form.
Having never encountered this problem before I had some questions that I
wondered if anyone could help me understand.
What exactly is the "standard application message loop" (from MS
documentation:
http://msdn.microsoft.com/library/d...ystemWindowsFormsApplicationClassRunTopic.asp)
and how does this differ to a standard thread event model?
Are there ways in which you can find out if an object requires the "standard
application message loop" other than trial and error?
Does anyone have any other information on this subject as I find it a
fascinating situation.
If anyone could drop some knowledge i'd appreciate it as I don't understand
this at all.
Kind Regards
Jax