Sign in to follow this  
win32mfc

[.net] Managed DX9 App EXE Crashes, but not if compiled and run.. Any idea why?

Recommended Posts

Hiya, I've found some managed DX9 applications on the web and here on GameDev in the GD Showcase that crash on startup when I run them. For example, I found a Managed DX9 C# example program that creates a simple windowed or full-screen device and lets you switch between them. The tutorial is here: http://www.drunkenhyena.com/cgi-bin/view_article.pl?chapter=2;article=10;lang=cs The support code (common.zip) is here: http://www.drunkenhyena.com/cgi-bin/view_article.pl?chapter=1;article=1;lang=cpp I think the problem is with the version of DX9 DLL's that the program was created with, because if I run the EXE that's in the project zip file it CRASHES. BUT, if I open the project in VS.NET 2003, compile and run it, it WORKS FINE. Any idea why this happens? Thanks, // CHRIS

Share this post


Link to post
Share on other sites
Doing a hex-dump on the original and new/compiled EXE doesn't give any hint of a Microsoft.DirectX.Direct3D assembly reference. Clearly, though, it's being loaded.

The only hint I could see was in the original C# source .proj file that had the Direct3D REFERENCE section as:

Name = "Microsoft.DirectX.Direct3D"
AssemblyName = "Microsoft.DirectX.Direct3D"
HintPath = "..\..\..\WINDOWS\Microsoft.NET\Managed DirectX\v9.00.1126\Microsoft.DirectX.Direct3D.dll"
AssemblyFolderKey = "hklm\current managed directx 9.1"


On my machine, with the latest DirectX 9.0c [oct 2004] SDK, I have the folder C:\WINNT\Microsoft.NET\Managed DirectX\v9.02.3900 instead of what's listed in the hint path above.. clearly a different version.

My biggest worry is that if I write a program with Managed DirectX, what are the chances it will still work after the next release of DirectX? Apparently, it seems to be an issue already. This EXE that was built about 6 months ago no longer works; it needs to be recompiled [no changes to source]

Could this just be a side effect have having the DirectX SDK installed?

Any comments on any of this?

Thanks,
// CHRIS

Share this post


Link to post
Share on other sites

Strange that no one has any comments on this.. I'm sure I'm not
the only on that has experienced this. For example, in the GD Showcase, the "Generic Space Shooter 3000" application doesn't run for me- it takes an exception immediately. And if you look at the user comments, I am not the only one that it has happened to.

Is it because the application was created with a different version of Managed DirectX? Would you need to install the redistributables for the older Managed DirectX in order to get it to work? (using .NET's ability to have multiple versions of a DLL "side-by-side")

// CHRIS

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this