I'm developing a .NET dll that it will be used by customer at VC environment. This dll used three DirectX 9.0c managed librarys: Microsoft.DirectX.dll, Microsoft.DirectX.Direct3D.dll(or Microsoft.DirectX.DirectShow.dll), Microsoft.AudioVideoPlayback.dll.
There is a problem in debuging mode. In C# env it said "LoaderLock was detected...",and in C++ env it said "User breakpoint called from code at 0x...", but it can run well in compiled version.
I searched some information in google, and they give me three choices to fix it:
- Go back to using VS2003 and .Net 1.1
- Use MDX 2.0. Note that MDX 2.0 will never actually ship as it is being transformed into the XNA framework.
- Disable the loader lock MDA. Debug/Exceptions (ctrl-D, E), Open the Managed Debugging Assistants tree node and uncheck Loader Lock. This setting is per solution so it will only affect this solution.
affected:All .Net 1.1 Managed DirectX assemblies when used with Visual Studio 2005 and .Net 2.0.
But for the 1st and 3rd choices, they can avoid the error alarm in C# env, but it still trigger a breakpoint in VC env.
The 2nd choice looks like can fix this problem. I find in xna framework, it only implement Microsoft.DirectX.dll' functions, and I can use a 3rd part managed wrapper DirectShow.Net instead of Microsoft.AudioVideoPlayback.dll, but I can't find any library to instead of "Microsoft.DirectX.Direct3D.dll(or Microsoft.DirectX.DirectShow.dll)". If I used .Net 1.1 managed direct3d.dll in my project, this problems will always be there.
How can I use Direct3D.dll or DirectShow.dll in .Net 2.0 framework !