Recently, when I was working on the pH project, I encountered a small problem. Our system is a secondary development based on people: we use their devices and need them to provide us with interfaces. When we get the interface, compilation on a 32-bit system won't go wrong, while compilation on my 64-bit system always prompts an error:
Call DLL to try to load programs with incorrect format. (Exception from hresult: 0x8007000b)
I first thought about finding a new DLL file on the Internet, that is, the DLL file in a 64-bit system, and then registering it. Fortunately, there are two folders, x86 and x64. X86 contains a DLL file, but x64 is empty. I was speechless, and then I went online to find DLL files and register them one by one. After a long time, I was not successful.
The problem is obvious, that is, the problem of compiling 32-bit DLL in my 64-bit development environment. Today I changed my mind: How to Make It compiled successfully. The problem is easily solved.
Open vs, select the solution for your project, right-click and select Properties (or Alt + enter), open the generate tab, and change the target platform to x86, the compiled DLL is a 32-bit DLL. At the same time, if your program contains code about pointers, an error is usually reported, causing you to fail to compile the program. You need to select "allow unsafe code option" on this tab ".
After solving the problem, I realized that the problem was so simple. At the same time, I felt that although vs had been used for a long time, the vsplatform could not be used.