[PATCH 0/2] MR3170: twinapi.appcore: Add RegisterAppConstrainedChangeNotification() stub.
Needed for Age of Wonders 4. I came across a post saying this game crashes: https://www.reddit.com/r/Lutris/comments/136f9s2/age_of_wonders_4_unexpected... ``` wine: Call from 0000000174013E8E to unimplemented function twinapi.appcore.RegisterAppConstrainedChangeNotification, aborting wine: Unimplemented function twinapi.appcore.RegisterAppConstrainedChangeNotification called at address 0000000174013E8E (thread 0114), starting debugger... ``` The Proton version works fine so this seems to be either the GOG version or the other non-steam ones. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3170
From: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> Needed for Age of Wonders 4. --- dlls/twinapi.appcore/main.c | 9 +++++++++ dlls/twinapi.appcore/twinapi.appcore.spec | 2 +- include/appnotify.h | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/dlls/twinapi.appcore/main.c b/dlls/twinapi.appcore/main.c index 99e413f8946..bd8a949d494 100644 --- a/dlls/twinapi.appcore/main.c +++ b/dlls/twinapi.appcore/main.c @@ -21,6 +21,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(twinapi); +/*********************************************************************** + * RegisterAppConstrainedChangeNotification (twinapi.appcore.@) + */ +ULONG WINAPI RegisterAppConstrainedChangeNotification( PAPPCONSTRAIN_CHANGE_ROUTINE routine, void *context, PAPPCONSTRAIN_REGISTRATION *reg ) +{ + FIXME( "routine %p, context %p, reg %p - stub.\n", routine, context, reg ); + return ERROR_CALL_NOT_IMPLEMENTED; +} + /*********************************************************************** * RegisterAppStateChangeNotification (twinapi.appcore.@) */ diff --git a/dlls/twinapi.appcore/twinapi.appcore.spec b/dlls/twinapi.appcore/twinapi.appcore.spec index 0b2d8d2055e..c3a0c85f44f 100644 --- a/dlls/twinapi.appcore/twinapi.appcore.spec +++ b/dlls/twinapi.appcore/twinapi.appcore.spec @@ -121,7 +121,7 @@ @ stub PsmUnblockAppStateChangeCompletion @ stub PsmUnregisterAppStateChangeNotification @ stub PsmWaitForAppResume -@ stub RegisterAppConstrainedChangeNotification +@ stdcall RegisterAppConstrainedChangeNotification(ptr ptr ptr) @ stdcall RegisterAppStateChangeNotification(ptr ptr ptr) @ stub UnregisterAppConstrainedChangeNotification @ stdcall UnregisterAppStateChangeNotification(ptr) diff --git a/include/appnotify.h b/include/appnotify.h index 882b0342afb..03d6f1d1c63 100644 --- a/include/appnotify.h +++ b/include/appnotify.h @@ -36,11 +36,14 @@ extern "C" { #endif typedef void (__cdecl *PAPPSTATE_CHANGE_ROUTINE)(BOOLEAN quiesced, void *context); +typedef void (__cdecl *PAPPCONSTRAIN_CHANGE_ROUTINE)(BOOLEAN constrained, void *context); typedef struct _APPSTATE_REGISTRATION *PAPPSTATE_REGISTRATION; +typedef struct _APPCONSTRAIN_REGISTRATION *PAPPCONSTRAIN_REGISTRATION; APICONTRACT ULONG NTAPI RegisterAppStateChangeNotification(PAPPSTATE_CHANGE_ROUTINE,void *,PAPPSTATE_REGISTRATION *); APICONTRACT void NTAPI UnregisterAppStateChangeNotification(PAPPSTATE_REGISTRATION); +APICONTRACT ULONG NTAPI RegisterAppConstrainedChangeNotification(PAPPCONSTRAIN_CHANGE_ROUTINE,void *,PAPPCONSTRAIN_REGISTRATION *); #ifdef __cplusplus } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3170
From: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com> --- dlls/twinapi.appcore/main.c | 8 ++++++++ dlls/twinapi.appcore/twinapi.appcore.spec | 2 +- include/appnotify.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/twinapi.appcore/main.c b/dlls/twinapi.appcore/main.c index bd8a949d494..f05d1ae07a4 100644 --- a/dlls/twinapi.appcore/main.c +++ b/dlls/twinapi.appcore/main.c @@ -39,6 +39,14 @@ ULONG WINAPI RegisterAppStateChangeNotification( PAPPSTATE_CHANGE_ROUTINE routin return ERROR_CALL_NOT_IMPLEMENTED; } +/*********************************************************************** + * UnregisterAppConstrainedChangeNotification (twinapi.appcore.@) + */ +void WINAPI UnregisterAppConstrainedChangeNotification( PAPPSTATE_REGISTRATION reg ) +{ + FIXME( "reg %p - stub.\n", reg ); +} + /*********************************************************************** * UnregisterAppStateChangeNotification (twinapi.appcore.@) */ diff --git a/dlls/twinapi.appcore/twinapi.appcore.spec b/dlls/twinapi.appcore/twinapi.appcore.spec index c3a0c85f44f..cdc1f2683bd 100644 --- a/dlls/twinapi.appcore/twinapi.appcore.spec +++ b/dlls/twinapi.appcore/twinapi.appcore.spec @@ -123,5 +123,5 @@ @ stub PsmWaitForAppResume @ stdcall RegisterAppConstrainedChangeNotification(ptr ptr ptr) @ stdcall RegisterAppStateChangeNotification(ptr ptr ptr) -@ stub UnregisterAppConstrainedChangeNotification +@ stdcall UnregisterAppConstrainedChangeNotification(ptr) @ stdcall UnregisterAppStateChangeNotification(ptr) diff --git a/include/appnotify.h b/include/appnotify.h index 03d6f1d1c63..9b32bbba331 100644 --- a/include/appnotify.h +++ b/include/appnotify.h @@ -44,6 +44,7 @@ typedef struct _APPCONSTRAIN_REGISTRATION *PAPPCONSTRAIN_REGISTRATION; APICONTRACT ULONG NTAPI RegisterAppStateChangeNotification(PAPPSTATE_CHANGE_ROUTINE,void *,PAPPSTATE_REGISTRATION *); APICONTRACT void NTAPI UnregisterAppStateChangeNotification(PAPPSTATE_REGISTRATION); APICONTRACT ULONG NTAPI RegisterAppConstrainedChangeNotification(PAPPCONSTRAIN_CHANGE_ROUTINE,void *,PAPPCONSTRAIN_REGISTRATION *); +APICONTRACT void NTAPI UnregisterAppConstrainedChangeNotification(PAPPCONSTRAIN_REGISTRATION); #ifdef __cplusplus } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3170
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=134198 Your paranoid android. === debian11 (build log) === ../wine/dlls/twinapi.appcore/main.c:45:13: error: conflicting types for ���UnregisterAppConstrainedChangeNotification��� Task: The win32 Wine build failed === debian11b (build log) === ../wine/dlls/twinapi.appcore/main.c:45:13: error: conflicting types for ���UnregisterAppConstrainedChangeNotification��� Task: The wow64 Wine build failed
participants (3)
-
Marvin -
Mohamad Al-Jaf -
Mohamad Al-Jaf (@maljaf)