   Trying to get accurate debug back: C# & VS2008
  Hi there. I've been having some trouble with a particular line, and I've read that it is possible to get more in depth messages from DirectX. So here's what I've done so far:*I've gone into DirectX's control panel, and upped the debug output level and set it to Debug mode.*I've set my Project settings so that it will debug unmanaged codeBut after changing that unmanaged part, my project now spews this error out when I run it:Quote:Managed Debugging Assistant 'LoaderLock' has detected a problem in 'C:\Documents and Settings\*********\My Documents\Visual Studio 2008\Projects\DirectXCSharp\bin\Debug\DirectXCSharp.exe'.Additional Information: DLL 'C:\WINDOWS\assembly\GAC\Microsoft.DirectX.Direct3D\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.Direct3D.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.So can anyone help here?   
  I have no idea why that's failing, but as a fallback you can always just use DebugView to see the native debug spew.   ;Quote:Original post by MJPI have no idea why that's failing, but as a fallback you can always just use DebugView to see the native debug spew.Hmm, that application does help, I guess. I kept getting errors sayingQuote:[2696] Direct3D9: (ERROR) :App specified D3DDEVTYPE_SW without first registering a software device. ValidateCreateDevice failed. Which I fixed by making the device Hardware-only. I guess I won't really know why I couldn't use the software version.   ;  The D3D runtime doesn't come with a software device implemented...the target machine has to have a plugin DLL loaded that implements the pipeline. You can use SW vertex processing if you want, but that's a different flag.   ;Quote:Managed Debugging Assistant 'LoaderLock' has detected a problem in 'C:\Documents and Settings\*********\My Documents\Visual Studio 2008\Projects\DirectXCSharp\bin\Debug\DirectXCSharp.exe'.Additional Information: DLL 'C:\WINDOWS\assembly\GAC\Microsoft.DirectX.Direct3D\1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.Direct3D.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.That's the typical LoaderLock error you get when using Managed DirectX (MDX) in VS2005 and later. I believe it was caused by some design mistake in the MDX runtime, but most people seem to agree it can safely be ignored. You can find more information over here on this page, specifically solution #3 will work just fine.