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.
c # wpf directx 3d
Daniel Enetoft
source share