News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Question about variables defining

Started by Graveyard, December 03, 2023, 09:38:13 PM

Previous topic - Next topic

Graveyard

Hello , this question may be obvious for most of you but i really couldn't find any additional details .
So in the (ram info.exe) example the MEMORYSTATUS structure for the GolbalMemoryStatus function is defined like that what does that mean.
(memstat   MEMORYSTATUS <sizeof MEMORYSTATUS,?,?,?,?,?,?,?>)

jj2007

Check the MEMORYSTATUS docs. The first element of the structure is its size.

Vortex

#2
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;

QuotedwLength

The size of the MEMORYSTATUS data structure, in bytes. You do not need to set this member before calling the GlobalMemoryStatus function; the function sets it.

https://learn.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-memorystatus