This is obsolete on Vista. Try GetCurrentPowerPolicies() to get information on both XP and Vista.
static extern bool GetCurrentPowerPolicies(out GLOBAL_POWER_POLICY pGlobalPowerPolicy,
Declare Function GetCurrentPowerPolicies Lib "powrprof.dll" (TODO) As TODO
if (!GetCurrentPowerPolicies(out gpp, out pp))