- Check the Environment.Is64BitProcess instead of IntPtr.Size.

This is wrong, it either needs to be ```!Environment.Is64BitProcess``` or switch x86 and amd64.