如何将 DirectSound 加载到 64 位应用程序中

How to Load DirectSound into a 64bit Application

我在尝试将 DirectSound 加载到我的 64 位应用程序时收到 BadImageFormatException。经过研究,是因为DirectSound dll是32位的,而我的应用程序是64位的。我无法将我的 64 位应用程序更改为 32 位。我有哪些加载 DirectSound 库的选项?我已经研究过使用 COM IPC 对象,但不确定它是如何工作的。是否有可用的 64 位 dll?

Microsoft 不再支持托管 DirectX。甚至 XNA 也不会 运行 64 位。我过去曾为 DirectX 使用过一次 SlimDX,它对我来说效果非常好。这是您要考虑的一种选择。这是 SlimDX DirectSound 文档的 link:https://slimdx.org/docs/html/N_SlimDX_DirectSound.htm