Home > Back-end >  About 64 of the writing of the DLL and call transfer problem
About 64 of the writing of the DLL and call transfer problem

Time:10-04

Platform: vs2010
Exactly the same, a piece of code to generate 32-bit DLL, 32-bit vc call, the value of normal
Generating code 64, 64 VC call by value error
DLL code:
Extern "C" __declspec (dllexport) DWORD64 _stdcall TestRead (DWORD64 dwInfo)
{
Return dwInfo;
}

Exe code:
DWORD64 a=TestRead x123456789a (0);

The same code, is a 32-bit compiler, is a 64 - bit compiled
32-bit compiler completely without any problem, a 64 - bit compiled by value is wrong, so strange
The linker is set to the target computer MachineX64 (/MACHINE: X64), there is no problem
  • Related