Skip to content

Commit a1bbcee

Browse files
committed
[MSCOREE] Show a user popup if .NET is missing (reactos#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: wine-mirror/wine@c99754e wine-mirror/wine@6b889fe wine-mirror/wine@5cd6db0 wine-mirror/wine@26c9bd9 Now, a mere `ERR("Wine Mono is not installed\n");` is emitted.
1 parent 9d3809f commit a1bbcee

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

dll/win32/mscoree/metahost.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,19 @@ static void CDECL do_nothing(void)
8282
{
8383
}
8484

85+
#ifdef __REACTOS__
86+
int WINAPIV ShellMessageBoxA(HINSTANCE hAppInst, HWND hWnd, LPCSTR lpcText, LPCSTR lpcTitle, UINT fuStyle, ...);
87+
#undef MESSAGE
88+
#define MESSAGE(msg) \
89+
do { \
90+
WINE_MESSAGE((msg)); \
91+
ShellMessageBoxA(NULL, NULL, (msg), "Wine Mono", MB_OK | MB_ICONSTOP); \
92+
} while(0)
93+
//
94+
// NOTE for wine-syncs: This warning is gradually removed in Wine commits:
95+
// c99754ef15a8, 6b889fe9188a, 5cd6db03495d, and 26c9bd9f15c3
96+
//
97+
#endif
8598
static void missing_runtime_message(const CLRRuntimeInfo *This)
8699
{
87100
if (This->major == 1)

0 commit comments

Comments
 (0)