Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

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.
 
Share this answer
 
Comments
Didier Cauberghe 2-Jun-12 3:09am    
Thx , this was the solution !
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.
 
Share this answer
 
Comments
Didier Cauberghe 1-Jun-12 14:39pm    
I have received only this DLL from the manufactorer of the RFID program device.
They have told me that it works also on win 7 64 bit.
When i use a demo programm that has been added to the rfid device seems to work on the win7 64 bit with the DCRF32.dll , when i rename the dll the demo programm doesnt work.
So i think that there must be a option that is not set .
Thanks
Didier

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900