GetPhysicallyInstalledSystemMemory function kernel32

Win32Result<bool> GetPhysicallyInstalledSystemMemory(
  1. Pointer<Uint64> totalMemoryInKilobytes
)

Retrieves the amount of RAM that is physically installed on the computer.

To learn more, see learn.microsoft.com/windows/win32/api/sysinfoapi/nf-sysinfoapi-getphysicallyinstalledsystemmemory.

Implementation

Win32Result<bool> GetPhysicallyInstalledSystemMemory(
  Pointer<Uint64> totalMemoryInKilobytes,
) {
  resolveGetLastError();
  final result_ = _GetPhysicallyInstalledSystemMemory(totalMemoryInKilobytes);
  return .new(value: result_ != FALSE, error: GetLastError());
}