BadImageFormatException when loading 32 bit DLL, target is x86

From what I understand, an assembly specifically built for x86 and running in a 64-bit operating system can only load libraries built for x86 or a BadImageFormatException will be thrown. In a 64-bit OS, an assembly built for Any CPU or x64 will throw the same exception when trying to load an x86 library. So, … Read more

File getting copied to SysWOW64 instead of System32

You’ve run afoul of file system redirection. Because %windir%\System32 is reserved exclusively for 64-bit applications, on 64-bit versions of Windows, 32-bit applications that attempt to access the %windir%\System32 directory are automatically and transparent redirected to the 32-bit %windir%\SysWOW64 directory. First, make sure that your program actually does belong in the 64-bit system folder. Windows does … Read more

How to determine whether a given Linux is 32 bit or 64 bit?

Try uname -m. Which is short of uname –machine and it outputs: x86_64 ==> 64-bit kernel i686 ==> 32-bit kernel Otherwise, not for the Linux kernel, but for the CPU, you type: cat /proc/cpuinfo or: grep flags /proc/cpuinfo Under “flags” parameter, you will see various values: see “What do the flags in /proc/cpuinfo mean?” Among … Read more

Range of values in C Int and Long 32 – 64 bits

In C and C++ you have these least requirements (i.e actual implementations can have larger magnitudes) signed char: -2^07+1 to +2^07-1 short: -2^15+1 to +2^15-1 int: -2^15+1 to +2^15-1 long: -2^31+1 to +2^31-1 long long: -2^63+1 to +2^63-1 Now, on particular implementations, you have a variety of bit ranges. The wikipedia article describes this nicely.

tech