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

Klaus Espenlaub Klaus.Espenlaub at Sun.COM
Mon Jan 26 13:50:34 PST 2009

S. Brandt wrote:
> 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
> windows.

Sorry that we didn't reply earlier, but everyone was busy working 
towards the 2.1.2 release. We are interested in making the build work, 
and if fact any help with making the build on windows easier is 
appreciated. We're aware that on Windows building VirtualBox is quite 
painful - we just eliminated much of this pain by having a standardized 
build environment. However that just helps the VirtualBox team, but not 
the community trying to build VirtualBox.

> Situation from last message - unchanged in 2.1.2.

Just a data point from our side: We do build the current code 
successfuly. Of course this means the PUEL version, but that's just 
extra files. OSE uses the identical Makefile.kmk files, so it's likely 
some SDK version issue.

Which SDK do you use exactly? I'm no expert there, but the version field 
in the SDK directory we use everywhere is "200504", which looks like 
we're using some MSDN version. So maybe that one is a bit less strict 
when it comes to linking.

Will ask the Windows experts here to investigate.

> For fixing CallNtPowerInformation:
> 1. extend the WINPSDK.inc file to include powrprof.lib into SDK_WINPSDK_LIBS
> kbuild/WINPSDK.inc:
> ...
> 	$(PATH_SDK_WINPSDK_LIB)/powrprof.lib	
> 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
> src\VBox\Main\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.

Any particular error message or symptoms? The chance is high that we've 
seen it before.



More information about the vbox-dev mailing list