the only real code at the moment is
#include "powrprof.h"
have also tried
#include <powrprof.h>
that's as far as I have got at the moment. I also read something about VC++ not liking C headers so I have tried
Code:
#ifdef __cplusplus
extern "C" {
#endif
#include "PowrProf.h"
#ifdef __cplusplus
}
#endif
The output from the compilation is below.
Thanks for any help on this, I just can't seem to get the powrprof.h file to compile I figured it must be something to do with the .lib file or am i wrong?
Green.cpp
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(19) : error C2146: syntax error : missing ';' before identifier 'Revision'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(19) : error C2501: '_GLOBAL_MACHINE_POWER_POLICY::ULONG' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(19) : error C2501: '_GLOBAL_MACHINE_POWER_POLICY::Revision' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(20) : error C2146: syntax error : missing ';' before identifier 'LidOpenWakeAc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(20) : error C2501: '_GLOBAL_MACHINE_POWER_POLICY::SYSTEM_POWER_STATE' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(20) : error C2501: '_GLOBAL_MACHINE_POWER_POLICY::LidOpenWakeAc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(21) : error C2146: syntax error : missing ';' before identifier 'LidOpenWakeDc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(21) : error C2501: '_GLOBAL_MACHINE_POWER_POLICY::SYSTEM_POWER_STATE' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(21) : error C2501: '_GLOBAL_MACHINE_POWER_POLICY::LidOpenWakeDc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(22) : error C2146: syntax error : missing ';' before identifier 'BroadcastCapacityResolution'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(22) : error C2501: '_GLOBAL_MACHINE_POWER_POLICY::ULONG' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(22) : error C2501: '_GLOBAL_MACHINE_POWER_POLICY::BroadcastCapacityResolution' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(26) : error C2146: syntax error : missing ';' before identifier 'Revision'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(26) : error C2501: '_GLOBAL_USER_POWER_POLICY::ULONG' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(26) : error C2501: '_GLOBAL_USER_POWER_POLICY::Revision' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(27) : error C2146: syntax error : missing ';' before identifier 'PowerButtonAc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(27) : error C2501: '_GLOBAL_USER_POWER_POLICY:

OWER_ACTION_POLICY' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(27) : error C2501: '_GLOBAL_USER_POWER_POLICY:

owerButtonAc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(28) : error C2146: syntax error : missing ';' before identifier 'PowerButtonDc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(28) : error C2501: '_GLOBAL_USER_POWER_POLICY:

OWER_ACTION_POLICY' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(28) : error C2501: '_GLOBAL_USER_POWER_POLICY:

owerButtonDc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(29) : error C2146: syntax error : missing ';' before identifier 'SleepButtonAc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(29) : error C2501: '_GLOBAL_USER_POWER_POLICY:

OWER_ACTION_POLICY' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(29) : error C2501: '_GLOBAL_USER_POWER_POLICY::SleepButtonAc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(30) : error C2146: syntax error : missing ';' before identifier 'SleepButtonDc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(30) : error C2501: '_GLOBAL_USER_POWER_POLICY:

OWER_ACTION_POLICY' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(30) : error C2501: '_GLOBAL_USER_POWER_POLICY::SleepButtonDc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(31) : error C2146: syntax error : missing ';' before identifier 'LidCloseAc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(31) : error C2501: '_GLOBAL_USER_POWER_POLICY:

OWER_ACTION_POLICY' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(31) : error C2501: '_GLOBAL_USER_POWER_POLICY::LidCloseAc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(32) : error C2146: syntax error : missing ';' before identifier 'LidCloseDc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(32) : error C2501: '_GLOBAL_USER_POWER_POLICY:

OWER_ACTION_POLICY' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(32) : error C2501: '_GLOBAL_USER_POWER_POLICY::LidCloseDc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(33) : error C2146: syntax error : missing ';' before identifier 'DischargePolicy'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(33) : error C2501: '_GLOBAL_USER_POWER_POLICY::SYSTEM_POWER_LEVEL' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(33) : error C2065: 'NUM_DISCHARGE_POLICIES' : undeclared identifier
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(33) : error C2501: '_GLOBAL_USER_POWER_POLICY:

ischargePolicy' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(34) : error C2146: syntax error : missing ';' before identifier 'GlobalFlags'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(34) : error C2501: '_GLOBAL_USER_POWER_POLICY::ULONG' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(34) : error C2501: '_GLOBAL_USER_POWER_POLICY::GlobalFlags' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(52) : error C2146: syntax error : missing ';' before identifier 'Revision'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(52) : error C2501: '_MACHINE_POWER_POLICY::ULONG' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(52) : error C2501: '_MACHINE_POWER_POLICY::Revision' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(55) : error C2146: syntax error : missing ';' before identifier 'MinSleepAc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(55) : error C2501: '_MACHINE_POWER_POLICY::SYSTEM_POWER_STATE' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(55) : error C2501: '_MACHINE_POWER_POLICY::MinSleepAc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(56) : error C2146: syntax error : missing ';' before identifier 'MinSleepDc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(56) : error C2501: '_MACHINE_POWER_POLICY::SYSTEM_POWER_STATE' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(56) : error C2501: '_MACHINE_POWER_POLICY::MinSleepDc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(57) : error C2146: syntax error : missing ';' before identifier 'ReducedLatencySleepAc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(57) : error C2501: '_MACHINE_POWER_POLICY::SYSTEM_POWER_STATE' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(57) : error C2501: '_MACHINE_POWER_POLICY::ReducedLatencySleepAc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(58) : error C2146: syntax error : missing ';' before identifier 'ReducedLatencySleepDc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(58) : error C2501: '_MACHINE_POWER_POLICY::SYSTEM_POWER_STATE' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(58) : error C2501: '_MACHINE_POWER_POLICY::ReducedLatencySleepDc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(61) : error C2146: syntax error : missing ';' before identifier 'DozeTimeoutAc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(61) : error C2501: '_MACHINE_POWER_POLICY::ULONG' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(61) : error C2501: '_MACHINE_POWER_POLICY:

ozeTimeoutAc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(62) : error C2146: syntax error : missing ';' before identifier 'DozeTimeoutDc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(62) : error C2501: '_MACHINE_POWER_POLICY::ULONG' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(62) : error C2501: '_MACHINE_POWER_POLICY:

ozeTimeoutDc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(63) : error C2146: syntax error : missing ';' before identifier 'DozeS4TimeoutAc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(63) : error C2501: '_MACHINE_POWER_POLICY::ULONG' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(63) : error C2501: '_MACHINE_POWER_POLICY:

ozeS4TimeoutAc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(64) : error C2146: syntax error : missing ';' before identifier 'DozeS4TimeoutDc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(64) : error C2501: '_MACHINE_POWER_POLICY::ULONG' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(64) : error C2501: '_MACHINE_POWER_POLICY:

ozeS4TimeoutDc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(67) : error C2146: syntax error : missing ';' before identifier 'MinThrottleAc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(67) : error C2501: '_MACHINE_POWER_POLICY::UCHAR' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(67) : error C2501: '_MACHINE_POWER_POLICY::MinThrottleAc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(68) : error C2146: syntax error : missing ';' before identifier 'MinThrottleDc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(68) : error C2501: '_MACHINE_POWER_POLICY::UCHAR' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(68) : error C2501: '_MACHINE_POWER_POLICY::MinThrottleDc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(69) : error C2146: syntax error : missing ';' before identifier 'pad1'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(69) : error C2501: '_MACHINE_POWER_POLICY::UCHAR' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(69) : error C2501: '_MACHINE_POWER_POLICY:

ad1' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(70) : error C2146: syntax error : missing ';' before identifier 'OverThrottledAc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(70) : error C2501: '_MACHINE_POWER_POLICY:

OWER_ACTION_POLICY' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(70) : error C2501: '_MACHINE_POWER_POLICY::OverThrottledAc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(71) : error C2146: syntax error : missing ';' before identifier 'OverThrottledDc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(71) : error C2501: '_MACHINE_POWER_POLICY:

OWER_ACTION_POLICY' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(71) : error C2501: '_MACHINE_POWER_POLICY::OverThrottledDc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(76) : error C2146: syntax error : missing ';' before identifier 'Revision'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(76) : error C2501: '_MACHINE_PROCESSOR_POWER_POLICY::ULONG' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(76) : error C2501: '_MACHINE_PROCESSOR_POWER_POLICY::Revision' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(78) : error C2146: syntax error : missing ';' before identifier 'ProcessorPolicyAc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(78) : error C2501: '_MACHINE_PROCESSOR_POWER_POLICY:

ROCESSOR_POWER_POLICY' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(78) : error C2501: '_MACHINE_PROCESSOR_POWER_POLICY:

rocessorPolicyAc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(79) : error C2146: syntax error : missing ';' before identifier 'ProcessorPolicyDc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(79) : error C2501: '_MACHINE_PROCESSOR_POWER_POLICY:

ROCESSOR_POWER_POLICY' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(79) : error C2501: '_MACHINE_PROCESSOR_POWER_POLICY:

rocessorPolicyDc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(84) : error C2146: syntax error : missing ';' before identifier 'Revision'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(84) : error C2501: '_USER_POWER_POLICY::ULONG' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(84) : error C2501: '_USER_POWER_POLICY::Revision' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(88) : error C2146: syntax error : missing ';' before identifier 'IdleAc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(88) : error C2501: '_USER_POWER_POLICY:

OWER_ACTION_POLICY' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(88) : error C2501: '_USER_POWER_POLICY::IdleAc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(89) : error C2146: syntax error : missing ';' before identifier 'IdleDc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(89) : error C2501: '_USER_POWER_POLICY:

OWER_ACTION_POLICY' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(89) : error C2501: '_USER_POWER_POLICY::IdleDc' : missing storage-class or type specifiers
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(90) : error C2146: syntax error : missing ';' before identifier 'IdleTimeoutAc'
e:\Program Files\Vc7\PlatformSDK\Include\powrprof.h(90) : fatal error C1003: error count exceeds 100; stopping compilation