From 9d77624d99551168b97fc89b9a41b0c13df6fa76 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 15 Oct 2021 18:31:44 +1100 Subject: [PATCH] powrprof: Add PowerRegisterSuspendResumeNotification stub. Signed-off-by: Alistair Leslie-Hughes Signed-off-by: Alexandre Julliard --- .../api-ms-win-power-base-l1-1-0.spec | 2 +- dlls/powrprof/powrprof.c | 6 ++++++ dlls/powrprof/powrprof.spec | 1 + include/powrprof.h | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/api-ms-win-power-base-l1-1-0/api-ms-win-power-base-l1-1-0.spec b/dlls/api-ms-win-power-base-l1-1-0/api-ms-win-power-base-l1-1-0.spec index e51426c4bd0..dd056946ac6 100644 --- a/dlls/api-ms-win-power-base-l1-1-0/api-ms-win-power-base-l1-1-0.spec +++ b/dlls/api-ms-win-power-base-l1-1-0/api-ms-win-power-base-l1-1-0.spec @@ -1,5 +1,5 @@ @ stdcall CallNtPowerInformation(long ptr long ptr long) powrprof.CallNtPowerInformation @ stdcall GetPwrCapabilities(ptr) powrprof.GetPwrCapabilities @ stdcall PowerDeterminePlatformRoleEx(long) powrprof.PowerDeterminePlatformRoleEx -@ stub PowerRegisterSuspendResumeNotification +@ stdcall PowerRegisterSuspendResumeNotification(long ptr ptr) powrprof.PowerRegisterSuspendResumeNotification @ stub PowerUnregisterSuspendResumeNotification diff --git a/dlls/powrprof/powrprof.c b/dlls/powrprof/powrprof.c index fc6f5706f87..0fd20b9f29b 100644 --- a/dlls/powrprof/powrprof.c +++ b/dlls/powrprof/powrprof.c @@ -330,6 +330,12 @@ DWORD WINAPI PowerEnumerate(HKEY key, const GUID *scheme, const GUID *subgroup, return ERROR_CALL_NOT_IMPLEMENTED; } +DWORD WINAPI PowerRegisterSuspendResumeNotification(DWORD flags, HANDLE recipient, PHPOWERNOTIFY handle) +{ + FIXME("(0x%08x,%p,%p) stub!\n", flags, recipient, handle); + return ERROR_SUCCESS; +} + BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { switch(fdwReason) { diff --git a/dlls/powrprof/powrprof.spec b/dlls/powrprof/powrprof.spec index 611e03de3b2..bf12e14a323 100644 --- a/dlls/powrprof/powrprof.spec +++ b/dlls/powrprof/powrprof.spec @@ -17,6 +17,7 @@ @ stdcall PowerSetActiveScheme (ptr ptr) @ stdcall PowerReadDCValue (ptr ptr ptr ptr ptr ptr ptr) @ stdcall PowerReadFriendlyName (ptr ptr ptr ptr ptr ptr) +@ stdcall PowerRegisterSuspendResumeNotification(long ptr ptr) @ stdcall ReadGlobalPwrPolicy (ptr) @ stdcall ReadProcessorPwrScheme (long ptr) @ stdcall ReadPwrScheme (long ptr) diff --git a/include/powrprof.h b/include/powrprof.h index 318188e465e..546e259a39a 100644 --- a/include/powrprof.h +++ b/include/powrprof.h @@ -145,6 +145,7 @@ extern "C" { #endif typedef BOOLEAN (CALLBACK* PWRSCHEMESENUMPROC)(UINT, DWORD, LPWSTR, DWORD, LPWSTR, PPOWER_POLICY, LPARAM); +typedef PVOID HPOWERNOTIFY, *PHPOWERNOTIFY; NTSTATUS WINAPI CallNtPowerInformation(POWER_INFORMATION_LEVEL, PVOID, ULONG, PVOID, ULONG); BOOLEAN WINAPI CanUserWritePwrScheme(VOID); @@ -159,6 +160,7 @@ 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 *); +DWORD WINAPI PowerRegisterSuspendResumeNotification(DWORD, HANDLE, PHPOWERNOTIFY); BOOLEAN WINAPI ReadGlobalPwrPolicy(PGLOBAL_POWER_POLICY); BOOLEAN WINAPI ReadProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY); BOOLEAN WINAPI ReadPwrScheme(UINT, PPOWER_POLICY);