DirectX animation warning when running inside visual studio

Z

Z.K.

I was wondering if someone could tell me why I get this message and how
to prevent it. If I hit continue, it runs fine, but want to know what I
am doing wrong so I won't get this error in the future. also what is
the file Clock.vshost.exe; my application is Clock.exe.

Z.K.


'Clock.vshost.exe' (Managed): Loaded 'C:\Documents and
Settings\Super_Wizard\My Documents\Visual Studio
2005\Projects\Clock\bin\Release\Clock.exe', Symbols loaded.
Managed Debugging Assistant 'LoaderLock' has detected a problem in
'C:\Documents and Settings\sssssss\My Documents\Visual Studio
2005\Projects\Clock\bin\Release\Clock.vshost.exe'.
Additional Information: DLL
'C:\WINDOWS\assembly\GAC\Microsoft.DirectX\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.dll'
is attempting managed execution inside OS Loader lock. Do not attempt to
run managed code inside a DllMain or image initialization function since
doing so can cause the application to hang.








Here is the code:

private void EnableBtn_Click(object sender, EventArgs e)
{
//create the video object
Microsoft.DirectX.AudioVideoPlayback.Video video;

//load alarm avi file
video = new
microsoft.DirectX.AudioVideoPlayback.Video("C:\\Documents and
Settings\\Super_Wizard\\My Documents\\Visual Studio
2005\\Projects\\Clock\\bin\\Debug\\bell_t.avi");

//set the System.Windows.Forms.Control to play it in (e.g a
panel)
video.Owner = alarmAnimatePanel;

//Play the video (put this in a buttons click event)
video.Play();

}
 
Z

Z.K.

Peter said:
When you run in the debugger, VS actually hosts your real program in a
sort of wrapper .exe.

As far as the exception goes, if you Google for the exception and
DirectX, you'll see that others have had the same issue (including
myself). As far as I can tell, it's a benign error. Probably a bug in
the DirectX/managed wrapper but I haven't had it cause any trouble and
saw at least one person who heard from the actual DirectX team that it's
not a problem.

Note that the exception is actually a "Managed Debugging Assistant"
thing, so you'll only ever see it when you run the program in the
debugger. I just wound up turning the LoaderLock MDA off under the
Debug settings for Visual Studio. I figure that if I ever violate the
LoaderLock MDA rules in a situation when it matters, I'll know soon
enough because my program will deadlock. :)

Pete


That's good to know.

Thanks,

Z.K.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top