C# PInvoking user32.dll on a 64 bit system
The name user32.dll
is misleading. It's the 64 bit version of user32.dll
you're calling. The 64 bit version is located at %windir%\System32\user32.dll
.
A 32-bit version is included for compatibility with 32-bit applications. It's located at %windir%\SysWOW64\user32.dll
. You can inspect them using the dumpbin
utility:
System32\user32.dll:
FILE HEADER VALUES
8664 machine (x64)
SysWOW64\user32.dll:
FILE HEADER VALUES
14C machine (x86)