VB .NET DLL在Win7 64位上不起作用 [英] VB .NET DLL Is not working on Win7 64 bit

查看:224
本文介绍了VB .NET DLL在Win7 64位上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我有以下问题.

我正在开发一个程序来对RFID Midare卡进行编程,以将其用于酒店以打开房间的门.

有一个使用dcrf32.dll的DLL,似乎一切正常,但是现在我有一台新的PC,并且使用Windows 7 Ultimate 64位而不是之前的32位版本.

当运行程序时,在使用RFID阅读器的第一行出现错误->. BadImageFormatExeption未处理
将RFID阅读器连接到我的旧PC并打开相同的程序时,没有问题.

使用Win 7 64位时,我需要做些其他事情吗?

谢谢

最好的问候

Didier

Hello,

I have the following problem.

I am developping a program to program RFID Midare one cards this for use in a hotel to open the doors of the rooms.

There is a DLL used dcrf32.dll , everything seems to be working but now i have a new PC and there is Windows 7 Ultimate 64 bit instead of the 32 bit version before.

When running the program there is a error at the first line where the RFID reader is used --> BadImageFormatExeption was unhandled
When connecting the RFID reader to my old PC and open the same program there is no problem.

Is there something that i need to do extra when using Win 7 64 bit.

Thanks

Best regards

Didier

推荐答案

.DLL仅是32位的机会确实很好.问题出在您的项目中.您的项目可能针对的CPU类型为"AnyCPU",这意味着在32位计算机上,您的代码将为32位.在64位计算机上,您的代码将是64位.

由于无法在Windows上的同一进程中合并32位和64位代码,因此必须强制项目仅编译32位(x86).

转到项目-> projectName 属性->编译标签->前进编译选项.在目标CPU"下拉列表中,将其更改为x86.重新编译项目,一切顺利.
Chances are really good that .DLL is 32-bit only. The problem comes in your project. Your project is probably targeting a CPU Type of "AnyCPU", which means on a 32-bit machine, your code will be 32-bit. On a 64-bit machine, your code will be 64-bit.

Since you can''t combine 32- and 64-bit code in the same process on Windows, you must force your project to compile 32-bit (x86) only.

Go to Project -> projectName Properties -> Compile tab -> Advances Compile Options. In the Target CPU drop down, change that to x86. Recompile your project and your good to go.


您是否创建了程序集dcrf32.dll?如果不是,则该汇编似乎是用32位编译的,因此它将不支持64位.尝试获取该dcrf64.dll(如果存在).
Did you create the assembly dcrf32.dll? If not, it seems that that assembly is compiled in 32 bits so it will not support 64 bits. Try to get that dcrf64.dll if it exists.


这篇关于VB .NET DLL在Win7 64位上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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