我将一段运行良好的MDX代码带到Windows 2008R2 (所有DX驱动程序都已安装),并收到以下相当奇怪的错误。你知道这意味着什么吗?
System.BadImageFormatException: Could not load file or assembly 'Microsoft.DirectX.Direct3D.dll' or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
File name: 'Microsoft.DirectX.Direct3D.dll'
at Nesteruk.MdxConsole.Console..ctor(Boolean fullScreen, Int32 charWidth, Int32 charHeight, Int32 windowWidth, Int32 windowHeight)
at Nesteruk.MdxConsole.Console..ctor(Viewport viewport) in c:\Users\Dmitri.EUPHORIA\Projects\Open-Source\MdxConsole\MdxConsole\Console.cs:line 67
at Nesteruk.MdxConsole.Console.NewConsole(Int32 width, Int32 height) in c:\Users\Dmitri.EUPHORIA\Projects\Open-Source\MdxConsole\MdxConsole\Console.cs:line 471
at MdxConsoleDemo.Program.Everything() in c:\Users\Dmitri.EUPHORIA\Projects\Open-Source\MdxConsole\MdxConsoleDemo\Program.cs:line 51
at MdxConsoleDemo.Program.Main() in c:\Users\Dmitri.EUPHORIA\Projects\Open-Source\MdxConsole\MdxConsoleDemo\Program.cs:line 30发布于 2010-06-05 02:59:10
您的操作系统是64位的吗?如果是,请在项目属性-> Build选项卡中将平台目标设置为x86。MDX仅为32位,尝试将其加载到64位进程会导致BadImageFormatException。
发布于 2010-06-05 02:58:50
没有更多的信息..。
1)定位Microsoft.DirectX.Direct3D.dll
2)尝试使用Reflector打开它
3)它是托管程序集(加载)还是不加载(不加载)?
https://stackoverflow.com/questions/2976914
复制相似问题