twall/jna — Issue #33: GetNativeSystemInfo issue on 64-bit-Windows
Author: pakko84
Created: 2011-10-24 16:25:05+00:00
State: open

I try to read the number logical processors of the system on a windows platform with the following code:

SYSTEM_INFO lpSystemInfo = new SYSTEM_INFO();
Kernel32.INSTANCE.GetNativeSystemInfo(lpSystemInfo);
return lpSystemInfo.dwNumberOfProcessors.longValue();

On a 64-bit (Windows 7) System this code always returns 65536. But the same code works on 32-bit-Windows7-System. What am i doing wrong? I´m using version 3.3.0 of the platform.jar and jna.jar.