In Windows Vista, Microsoft introduced new functions for power management in the Windows API.
These are usually开发者_开发问答 included by #include <PowrProf.h>
. The Problem is, that the Qt SDK 2010.05 uses MinGW with an outdated version of PowrProf.h. That’s why you cannot, for example, use the function PowerEnumerate.
Which would be the proper way to make the Qt SDK ‘speak’ the new functionality?
Thank You,
PaulI know it's not the easiest solution, but you could always download the Windows SDK and grab the latest header file from there. (I just checked v7.0a and it does indeed have 'powrprof.h'
.)
I haven't tried this, but you may be able to simply swap the new version of the header with the old version that ships with Mingw32. You will probably have to link with the new version of the library too ('powrprof.lib'
).
精彩评论