The MEMORYSTATUS structure in kernel32.inc has a typo: dwiLength should be dwLength (without the extra 'i').
The same structure in kernel64.inc has the same typo, and also incorrectly defines the last six members as 32-bit only where they need to be 64-bit DQs.
I find it somewhat disturbing the MS named these as dw* and then defines the size as SIZE_T.
typedef struct _MEMORYSTATUS {
DWORD dwLength;
DWORD dwMemoryLoad;
SIZE_T dwTotalPhys;
SIZE_T dwAvailPhys;
SIZE_T dwTotalPageFile;
SIZE_T dwAvailPageFile;
SIZE_T dwTotalVirtual;
SIZE_T dwAvailVirtual;
} MEMORYSTATUS, *LPMEMORYSTATUS;