From acecb72006bee20682c31ad9e02c8cab50436042 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 15 Aug 2018 06:32:45 +0000 Subject: [PATCH] powrprof: Added PowerEnumerate stub. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45603 Signed-off-by: Alistair Leslie-Hughes Signed-off-by: Alexandre Julliard --- dlls/powrprof/powrprof.c | 8 ++++++++ dlls/powrprof/powrprof.spec | 1 + include/powrprof.h | 31 +++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/dlls/powrprof/powrprof.c b/dlls/powrprof/powrprof.c index 685b66356fc..1597d96f585 100644 --- a/dlls/powrprof/powrprof.c +++ b/dlls/powrprof/powrprof.c @@ -321,6 +321,14 @@ POWER_PLATFORM_ROLE WINAPI PowerDeterminePlatformRole(void) return PlatformRoleDesktop; } +DWORD WINAPI PowerEnumerate(HKEY key, const GUID *scheme, const GUID *subgroup, POWER_DATA_ACCESSOR flags, + ULONG index, UCHAR *buffer, DWORD *buffer_size) +{ + FIXME("(%p,%s,%s,%d,%d,%p,%p) stub!\n", key, debugstr_guid(scheme), debugstr_guid(subgroup), + flags, index, buffer, buffer_size); + return ERROR_CALL_NOT_IMPLEMENTED; +} + BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { switch(fdwReason) { diff --git a/dlls/powrprof/powrprof.spec b/dlls/powrprof/powrprof.spec index c90fafc353d..a9e337a0e46 100644 --- a/dlls/powrprof/powrprof.spec +++ b/dlls/powrprof/powrprof.spec @@ -11,6 +11,7 @@ @ stdcall IsPwrShutdownAllowed () @ stdcall IsPwrSuspendAllowed () @ stdcall PowerDeterminePlatformRole () +@ stdcall PowerEnumerate(long ptr ptr long long ptr ptr) @ stdcall PowerGetActiveScheme (ptr ptr) @ stdcall PowerSetActiveScheme (ptr ptr) @ stdcall PowerReadDCValue (ptr ptr ptr ptr ptr ptr ptr) diff --git a/include/powrprof.h b/include/powrprof.h index 239044ea10c..318188e465e 100644 --- a/include/powrprof.h +++ b/include/powrprof.h @@ -109,6 +109,36 @@ typedef struct _POWER_POLICY { } POWER_POLICY, *PPOWER_POLICY; +typedef enum _POWER_DATA_ACCESSOR { + ACCESS_AC_POWER_SETTING_INDEX, + ACCESS_DC_POWER_SETTING_INDEX, + ACCESS_FRIENDLY_NAME, + ACCESS_DESCRIPTION, + ACCESS_POSSIBLE_POWER_SETTING, + ACCESS_POSSIBLE_POWER_SETTING_FRIENDLY_NAME, + ACCESS_POSSIBLE_POWER_SETTING_DESCRIPTION, + ACCESS_DEFAULT_AC_POWER_SETTING, + ACCESS_DEFAULT_DC_POWER_SETTING, + ACCESS_POSSIBLE_VALUE_MIN, + ACCESS_POSSIBLE_VALUE_MAX, + ACCESS_POSSIBLE_VALUE_INCREMENT, + ACCESS_POSSIBLE_VALUE_UNITS, + ACCESS_ICON_RESOURCE, + ACCESS_DEFAULT_SECURITY_DESCRIPTOR, + ACCESS_ATTRIBUTES, + ACCESS_SCHEME, + ACCESS_SUBGROUP, + ACCESS_INDIVIDUAL_SETTING, + ACCESS_ACTIVE_SCHEME, + ACCESS_CREATE_SCHEME, + ACCESS_AC_POWER_SETTING_MAX, + ACCESS_DC_POWER_SETTING_MAX, + ACCESS_AC_POWER_SETTING_MIN, + ACCESS_DC_POWER_SETTING_MIN, + ACCESS_PROFILE, + ACCESS_OVERLAY_SCHEME, + ACCESS_ACTIVE_OVERLAY_SCHEME, +} POWER_DATA_ACCESSOR, *PPOWER_DATA_ACCESSOR; #ifdef __cplusplus extern "C" { @@ -128,6 +158,7 @@ BOOLEAN WINAPI IsAdminOverrideActive(PADMINISTRATOR_POWER_POLICY); BOOLEAN WINAPI IsPwrHibernateAllowed(VOID); BOOLEAN WINAPI IsPwrShutdownAllowed(VOID); BOOLEAN WINAPI IsPwrSuspendAllowed(VOID); +DWORD WINAPI PowerEnumerate(HKEY, const GUID *, const GUID *, POWER_DATA_ACCESSOR, ULONG, UCHAR *, DWORD *); BOOLEAN WINAPI ReadGlobalPwrPolicy(PGLOBAL_POWER_POLICY); BOOLEAN WINAPI ReadProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY); BOOLEAN WINAPI ReadPwrScheme(UINT, PPOWER_POLICY);