title: DirectX application on 64 bit windows
body: <p>I am developing a WPF application where the 3D part is handled by DirectX 9 (a lot of 3d that did not run fast enough using WPF). </p>
  
  <p>The problem is the application is released with "Any CPU" as configuration and when a user runs it on a 64 bit windows, the direcX part crashes (System.BadImageFormatException). Apparently the dlls included for the directX part is not usable on a 64 bit windows. </p>
  
  <p>This has happened with some other 3:rd part dlls that we use in our application but this we have solved by changing the dlls in runtime to the ones built for x64 if the user are running on a 64 bit windows machine. Do any of you know where I can find DirectX 9 dlls for x64? If they exist at all. </p>
  
  <p>The ones I need are:</p>
  
  <ul>
  <li>Microsoft.DirectX.Direct3D</li>
  <li>Microsoft.DirectX.Direct3DX</li>
  <li>Microsoft.DirectX</li>
  </ul>
  
  <p>If they do not exist, can the problem be solved in some other way? I cannot change the configuration to x86 because the application is released via ClickOnce and a change of configuration make ClickOnce stop working (the configuration is included in the ClickOnce key)</p>
  
  <hr>
  
  <p>Let me add that the I am using a Winforms part hosted by the WPF application and that the winforms part is using the DirectX dlls I am asking about. This was a much better and faster way of presenting a lot of 3D meshes in WPF than to use WPF:s 3D. Unfortunately this problem occurred instead.</p>