Torge Matthies : powrprof: Add PowerUnregisterSuspendResumeNotification stub.

Alexandre Julliard julliard at winehq.org
Tue Mar 1 15:45:34 CST 2022


Module: wine
Branch: master
Commit: 2074e13a43ad07c635388fe3739225a2752b1754
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2074e13a43ad07c635388fe3739225a2752b1754

Author: Torge Matthies <openglfreak at googlemail.com>
Date:   Sun Feb 27 02:02:33 2022 +0100

powrprof: Add PowerUnregisterSuspendResumeNotification stub.

Allegedly needed by Final Fantasy VII Remake to not crash on exit.

Signed-off-by: Torge Matthies <openglfreak at googlemail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/powrprof/powrprof.c    | 7 +++++++
 dlls/powrprof/powrprof.spec | 1 +
 include/powrprof.h          | 1 +
 3 files changed, 9 insertions(+)

diff --git a/dlls/powrprof/powrprof.c b/dlls/powrprof/powrprof.c
index c4af8ab9ce1..dc6e8bdaa15 100644
--- a/dlls/powrprof/powrprof.c
+++ b/dlls/powrprof/powrprof.c
@@ -333,6 +333,13 @@ DWORD WINAPI PowerEnumerate(HKEY key, const GUID *scheme, const GUID *subgroup,
 DWORD WINAPI PowerRegisterSuspendResumeNotification(DWORD flags, HANDLE recipient, PHPOWERNOTIFY handle)
 {
     FIXME("(0x%08lx,%p,%p) stub!\n", flags, recipient, handle);
+    *handle = (HPOWERNOTIFY)0xdeadbeef;
+    return ERROR_SUCCESS;
+}
+
+DWORD WINAPI PowerUnregisterSuspendResumeNotification(HPOWERNOTIFY handle)
+{
+    FIXME("(%p) stub!\n", handle);
     return ERROR_SUCCESS;
 }
 
diff --git a/dlls/powrprof/powrprof.spec b/dlls/powrprof/powrprof.spec
index bf12e14a323..cbd2e47c1f2 100644
--- a/dlls/powrprof/powrprof.spec
+++ b/dlls/powrprof/powrprof.spec
@@ -18,6 +18,7 @@
 @ stdcall PowerReadDCValue (ptr ptr ptr ptr ptr ptr ptr)
 @ stdcall PowerReadFriendlyName (ptr ptr ptr ptr ptr ptr)
 @ stdcall PowerRegisterSuspendResumeNotification(long ptr ptr)
+@ stdcall PowerUnregisterSuspendResumeNotification(ptr)
 @ stdcall ReadGlobalPwrPolicy (ptr)
 @ stdcall ReadProcessorPwrScheme (long ptr)
 @ stdcall ReadPwrScheme (long ptr)
diff --git a/include/powrprof.h b/include/powrprof.h
index 546e259a39a..6959a9aeb13 100644
--- a/include/powrprof.h
+++ b/include/powrprof.h
@@ -161,6 +161,7 @@ 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);
+DWORD   WINAPI PowerUnregisterSuspendResumeNotification(HPOWERNOTIFY);
 BOOLEAN WINAPI ReadGlobalPwrPolicy(PGLOBAL_POWER_POLICY);
 BOOLEAN WINAPI ReadProcessorPwrScheme(UINT, PMACHINE_PROCESSOR_POWER_POLICY);
 BOOLEAN WINAPI ReadPwrScheme(UINT, PPOWER_POLICY);




More information about the wine-cvs mailing list