DirectX application on 64-bit windows

I am developing a WPF application where the 3D part is processed by DirectX 9 (a lot of 3d that did not run fast enough using WPF).

The problem is that the application is released with โ€œAny CPUโ€ as a configuration, and when the user launches it in 64-bit windows, the direcX part crashes (System.BadImageFormatException). Apparently, the DLLs included for the directX part cannot be used in 64-bit windows.

This happened with some other 3rd-part DLL files that we use in our application, but we solved this by changing the dlls at runtime to those that were created for x64 if the user is running on a 64-bit Windows machine. Do any of you know where I can find the DirectX 9 dll for x64? If they exist at all.

I need:

  • Microsoft.DirectX.Direct3D
  • Microsoft.DirectX.Direct3DX
  • Microsoft.DirectX

If they do not exist, is it possible to solve the problem in another way? I canโ€™t change the configuration on x86 because the application will be released through ClickOnce, and changing the configuration will cause ClickOnce to stop working (the configuration is included in the ClickOnce key)


Let me add that I am using the Winforms part hosted in a WPF application and that the winforms part is using the DirectX DLL I'm asking about. It was a much better and faster way to introduce many 3D meshes in WPF than using WPF: s 3D. Unfortunately, this problem arose instead.

+6
c # wpf directx 3d
source share
2 answers

Required DLL for DirectX Managed. Unfortunately, Microsoft no longer supports Managed DirectX and its successor; XNA also does not support 64-bit.

SlimDX is an open source alternative for DirectX managed and supports the 64-bit version. Another option is to write DirectX code in unmanaged C ++.

+5
source share

You can configure a WPF application only on a 32-bit application. Submit your ClickOnce issue as another SO question. This is probably your best option.

Project Properties -> Build -> Platform Target -> x86

0
source share

All Articles