使用 MDX 时缺少 Direct3D.dll 依赖项

发布于 2024-09-05 02:04:00 字数 1060 浏览 9 评论 0原文

我已将一段完美工作的 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

I have taken a perfectly working MDX piece of code to Windows 2008R2 (all DX drivers installed) and am getting the following, rather bizarre, error. Any idea what this could mean?

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一江春梦 2024-09-12 02:04:00

您的操作系统是 64 位的吗?如果是,在Project Properties -> 设置Platform Target为x86构建选项卡。 MDX 仅是 32 位,尝试将其加载到 64 位进程中会导致 BadImageFormatException

Is your operating system 64-bit? If yes, set Platform Target to x86 in Project Properties -> Build tab. MDX is 32-bit only, trying to load it into 64-bit process causes BadImageFormatException.

思慕 2024-09-12 02:04:00

没有更多信息...

1) 找到 Microsoft.DirectX.Direct3D.dll
2)尝试用Reflector打开它
3)它是托管程序集(加载)还是不是托管程序集(不加载)?

without much more information...

1) Locate Microsoft.DirectX.Direct3D.dll
2) Try to open it with Reflector
3) Is it a managed assembly (it loads) or not (does not load)?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文