帮助使用microsoft driectx directsound [英] help using microsoft driectx directsound

查看:93
本文介绍了帮助使用microsoft driectx directsound的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我需要一些关于在Vb.net上使用microsoft driectx directsound的帮助。

我在W7 pro SP1上使用VS2010 EE。

我无法入门我只是得到错误按摩,例如System.Windows.Forms.dll中发生了'System.BadImageFormatException'类型的未处理异常。

我没有使用DLL来支持

请任何帮助都会很棒。

谢谢

RoboPike

Hi all,
I need some help on using microsoft driectx directsound with Vb.net.
I'm using VS2010 EE on W7 pro SP1.
I can't get started i just get error massages like "An unhandled exception of type 'System.BadImageFormatException' occurred in System.Windows.Forms.dll".
I'm not experanced in using DLLs
please any help would be great.
thanks
RoboPike

推荐答案

您收到此消息是因为您尝试在同一进程中混合使用32位和64位代码。



您可能编译你的应用程序以任何CPU为目标,这将使你的代码在32位Windows上为32位,在64位Windows上为64位。这个问题是在64位Windows上安装32位驱动程序时。您的应用程序默认以64位运行,但.DLL仅用于32位,因此导致您看到的错误。



进入解决方案资源管理器中的我的项目节点,然后单击编译选项卡。将目标CPU下拉列表更改为x86或x64,具体取决于您尝试使用的.DLL。尝试一个,如果它不起作用,如果你不知道你正在加载什么,请尝试另一个。
You're getting this message because you're trying to mix 32- and 64-bit code in the same process.

You probably compiled your application to target "Any CPU", which will run you're code as 32-bit on 32-bit Windows and 64-bit on 64-bit Windows. The problem with this is when you install 32-bit drivers on 64-bit Windows. Your app runs as 64-bit by default but the .DLL's you're trying to use as 32-bit only, thus causing the error that you're seeing.

Go into the "My Project" node in Solution Explorer and click on the Compile tab. Change the "Target CPU" dropdown to either "x86" or "x64" depending on the .DLL's you're trying to use. Try one, if it doesn't work, try the other if you don't know what you're loading.


这篇关于帮助使用microsoft driectx directsound的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆