From a1bbcee5e87f0a35771f5ce691a8ab25ed4507de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Wed, 3 Sep 2025 18:24:20 +0200 Subject: [PATCH] [MSCOREE] Show a user popup if .NET is missing (#8374) Otherwise, you wouldn't see anything at all when opening a .NET app, and the only hint that a .NET runtime is needed would be to see the message in the debug log, provided a debugger is connected to ReactOS ... NOTE: `shell32!ShellMessageBoxA()` is used instead of `user32!MessageBoxA`, because it turns out mscoree isn't importing from user32 but from shell32 instead (as in Wine's), and I don't want to modify the list of imported modules. NOTE 2: This warning function has been gradually removed with Wine commits: https://github.com/wine-mirror/wine/commit/c99754ef15a8e5bc0fd9189fc81e4e4d9cc1f589 https://github.com/wine-mirror/wine/commit/6b889fe9188a97765bcbcc2cae5ca2480a73e7af https://github.com/wine-mirror/wine/commit/5cd6db03495d73e3db024472514a753a44a06772 https://github.com/wine-mirror/wine/commit/26c9bd9f15c364215be9731bb050454c14d90767 Now, a mere `ERR("Wine Mono is not installed\n");` is emitted. --- dll/win32/mscoree/metahost.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dll/win32/mscoree/metahost.c b/dll/win32/mscoree/metahost.c index 599fcc829bb..a405a121d2d 100644 --- a/dll/win32/mscoree/metahost.c +++ b/dll/win32/mscoree/metahost.c @@ -82,6 +82,19 @@ static void CDECL do_nothing(void) { } +#ifdef __REACTOS__ +int WINAPIV ShellMessageBoxA(HINSTANCE hAppInst, HWND hWnd, LPCSTR lpcText, LPCSTR lpcTitle, UINT fuStyle, ...); +#undef MESSAGE +#define MESSAGE(msg) \ +do { \ + WINE_MESSAGE((msg)); \ + ShellMessageBoxA(NULL, NULL, (msg), "Wine Mono", MB_OK | MB_ICONSTOP); \ +} while(0) +// +// NOTE for wine-syncs: This warning is gradually removed in Wine commits: +// c99754ef15a8, 6b889fe9188a, 5cd6db03495d, and 26c9bd9f15c3 +// +#endif static void missing_runtime_message(const CLRRuntimeInfo *This) { if (This->major == 1)