I am getting the following errors when trying to compile it via Visual Studio 2019:
C:\battstatus>cl /W4 /wd4127 battstatus.cpp user32.lib powrprof.lib setupapi.lib
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30143 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
battstatus.cpp
battstatus.cpp(818): error C2039: 'Reserved1': is not a member of '_SYSTEM_POWER_STATUS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(7977): note: see declaration of '_SYSTEM_POWER_STATUS'
battstatus.cpp(836): error C2039: 'Reserved1': is not a member of '_SYSTEM_POWER_STATUS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(7977): note: see declaration of '_SYSTEM_POWER_STATUS'
battstatus.cpp(1246): warning C4456: declaration of 'ntstatus' hides previous local declaration
battstatus.cpp(1117): note: see declaration of 'ntstatus'
battstatus.cpp(1456): warning C4456: declaration of 'ntstatus' hides previous local declaration
battstatus.cpp(1117): note: see declaration of 'ntstatus'
battstatus.cpp(1602): error C2039: 'Reserved1': is not a member of '_SYSTEM_POWER_STATUS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(7977): note: see declaration of '_SYSTEM_POWER_STATUS'
battstatus.cpp(1602): error C2039: 'Reserved1': is not a member of '_SYSTEM_POWER_STATUS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(7977): note: see declaration of '_SYSTEM_POWER_STATUS'
battstatus.cpp(1604): error C2039: 'Reserved1': is not a member of '_SYSTEM_POWER_STATUS'
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(7977): note: see declaration of '_SYSTEM_POWER_STATUS'
I am getting the following errors when trying to compile it via Visual Studio 2019:
C:\battstatus>cl /W4 /wd4127 battstatus.cpp user32.lib powrprof.lib setupapi.lib Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30143 for x86 Copyright (C) Microsoft Corporation. All rights reserved.
battstatus.cpp battstatus.cpp(818): error C2039: 'Reserved1': is not a member of '_SYSTEM_POWER_STATUS' C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(7977): note: see declaration of '_SYSTEM_POWER_STATUS' battstatus.cpp(836): error C2039: 'Reserved1': is not a member of '_SYSTEM_POWER_STATUS' C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(7977): note: see declaration of '_SYSTEM_POWER_STATUS' battstatus.cpp(1246): warning C4456: declaration of 'ntstatus' hides previous local declaration battstatus.cpp(1117): note: see declaration of 'ntstatus' battstatus.cpp(1456): warning C4456: declaration of 'ntstatus' hides previous local declaration battstatus.cpp(1117): note: see declaration of 'ntstatus' battstatus.cpp(1602): error C2039: 'Reserved1': is not a member of '_SYSTEM_POWER_STATUS' C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(7977): note: see declaration of '_SYSTEM_POWER_STATUS' battstatus.cpp(1602): error C2039: 'Reserved1': is not a member of '_SYSTEM_POWER_STATUS' C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(7977): note: see declaration of '_SYSTEM_POWER_STATUS' battstatus.cpp(1604): error C2039: 'Reserved1': is not a member of '_SYSTEM_POWER_STATUS' C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(7977): note: see declaration of '_SYSTEM_POWER_STATUS'