[vbox-dev] building 2.1.0 on win32 - fixes, and CallNtPowerInformation

S. Brandt sbrandt at gmx.de
Mon Jan 26 09:58:47 PST 2009

S. Brandt wrote:
> Hi!
> Again, I can't manage compiling on windows ... I did some small fixes on the
> way, yet, I'm still getting stuck somewhere ...
> It's CallNtPowerInformation / HostPowerServiceWin::WndProc.
Replying to myself, as noone seems to be intereseted in virtualbox-ose on

Situation from last message - unchanged in 2.1.2.

For fixing CallNtPowerInformation:

1. extend the WINPSDK.inc file to include powrprof.lib into SDK_WINPSDK_LIBS

2. the missing function is
?CallNtPowerInformation@@YGJW4POWER_INFORMATION_LEVEL@@PAXK1K at Z (C++ name
mangled!), while the method provided by the dll/lib is
[_imp]_CallNtPowerInformation at 20.
So, obviously, there is an 'extern "C"' missing in HostPowerWin.cpp

extern "C" {
#include <PowrProf.h>

Okay, seems to compile and link through ...
I can't get it to run, but I believe that is another problem ... I'll tell
more in a few days.

Have fun,

More information about the vbox-dev mailing list