10 #include "../../stdafx.h"
12 #include "../../3rdparty/fmt/format.h"
13 #include "../../survey.h"
18 #include "../../safeguards.h"
20 void SurveyOS(nlohmann::json &json)
23 os.dwOSVersionInfoSize =
sizeof(os);
26 json[
"os"] =
"Windows";
27 json[
"release"] = fmt::format(
"{}.{}.{} ({})", os.dwMajorVersion, os.dwMinorVersion, os.dwBuildNumber, os.szCSDVersion);
29 MEMORYSTATUSEX status;
30 status.dwLength =
sizeof(status);
31 GlobalMemoryStatusEx(&status);
34 json[
"hardware_concurrency"] = std::thread::hardware_concurrency();
std::string SurveyMemoryToText(uint64_t memory)
Change the bytes of memory into a textual version rounded up to the biggest unit.