Search code examples
c#pinvoke

Why is 'IntPtr.size' 4 on Windows 64 bit?


I think I should get 8 when I use IntPtr.Size. However, I still get 4 on a 64-bit machine with Windows 7 x64. Why?


Solution

  • Check your file CPU architecture. Is it x86? It should be Any CPU or x64.