Search code examples
c#ipccom-interopdirectsound

How to Load DirectSound into a 64bit Application


I am getting a BadImageFormatException when trying to load DirectSound into my 64-bit application. After doing research, it is due to the fact that the DirectSound dll is 32-bit while my application is 64-bit. I cannot change my 64-bit application to 32-bit. What are my options to load the DirectSound library? I have already looked into using a COM IPC object, but was not really sure how that worked. Is there a 64bit dll that is available?


Solution

  • Microsoft doesn't support managed DirectX anymore. Even XNA won't run 64-bit. I've used SlimDX once in the past for DirectX, and it worked really well for me. That's one option for you to consider. Here's a link to the SlimDX DirectSound documentation: https://slimdx.org/docs/html/N_SlimDX_DirectSound.htm