From 7461479cbba4f7c66ec41450a1bce712092a110e Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Thu, 4 Apr 2024 04:05:53 +0300 Subject: [PATCH] Added captions to MessageBoxes --- bridge.c | 16 +++++++++++++--- game.c | 9 ++++++--- service.c | 15 ++++++++++----- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/bridge.c b/bridge.c index 319cc72..685bc3d 100644 --- a/bridge.c +++ b/bridge.c @@ -461,8 +461,11 @@ NewConnection: print("Pipe already exists: %s\n", GetErrorMessage()); if (!RunningAsService) + { MessageBox(NULL, GetErrorMessage(), - NULL, MB_OK | MB_ICONSTOP); + "Pipe already exists", + MB_OK | MB_ICONSTOP); + } ExitProcess(1); } @@ -477,8 +480,11 @@ NewConnection: print("Failed to create pipe: %s\n", GetErrorMessage()); if (!RunningAsService) + { MessageBox(NULL, GetErrorMessage(), - NULL, MB_OK | MB_ICONSTOP); + "Failed to create pipe", + MB_OK | MB_ICONSTOP); + } ExitProcess(1); } @@ -537,7 +543,11 @@ NewConnection: { print("Failed to create threads: %s\n", GetErrorMessage()); if (!RunningAsService) - MessageBox(NULL, GetErrorMessage(), NULL, MB_OK | MB_ICONSTOP); + { + MessageBox(NULL, GetErrorMessage(), + "Failed to create threads", + MB_OK | MB_ICONSTOP); + } ExitProcess(1); } diff --git a/game.c b/game.c index 88dc11d..d171f32 100644 --- a/game.c +++ b/game.c @@ -55,7 +55,8 @@ void LaunchGame(int argc, char **argv) if (!GetBinaryType(argv[1], &dwBinaryType)) { MessageBox(NULL, GetErrorMessage(), - NULL, MB_OK | MB_ICONSTOP); + "GetBinaryType", + MB_OK | MB_ICONSTOP); ExitProcess(1); } print("Executable type: %d\n", dwBinaryType); @@ -104,7 +105,8 @@ void LaunchGame(int argc, char **argv) if (!CreateProcess(gamePath, gameArgs, NULL, NULL, FALSE, 0, NULL, NULL, &game_si, &game_pi)) { - MessageBox(NULL, GetErrorMessage(), NULL, MB_OK | MB_ICONSTOP); + MessageBox(NULL, GetErrorMessage(), + "CreateProcess", MB_OK | MB_ICONSTOP); ExitProcess(1); } LocalFree(gameArgs); @@ -136,7 +138,8 @@ void LaunchGame(int argc, char **argv) } else { - MessageBox(NULL, GetErrorMessage(), NULL, MB_OK | MB_ICONSTOP); + MessageBox(NULL, GetErrorMessage(), + "CreateToolhelp32Snapshot", MB_OK | MB_ICONSTOP); ExitProcess(0); } diff --git a/service.c b/service.c index ecedb75..9084ae6 100644 --- a/service.c +++ b/service.c @@ -113,7 +113,8 @@ void InstallService() if (schSCManager == NULL) { MessageBox(NULL, GetErrorMessage(), - NULL, MB_OK | MB_ICONSTOP); + "OpenSCManager", + MB_OK | MB_ICONSTOP); ExitProcess(1); } @@ -128,7 +129,8 @@ void InstallService() if (schService == NULL) { MessageBox(NULL, GetErrorMessage(), - NULL, MB_OK | MB_ICONSTOP); + "CreateService", + MB_OK | MB_ICONSTOP); ExitProcess(1); } else @@ -156,7 +158,8 @@ void RemoveService() if (schSCManager == NULL) { MessageBox(NULL, GetErrorMessage(), - NULL, MB_OK | MB_ICONSTOP); + "OpenSCManager", + MB_OK | MB_ICONSTOP); ExitProcess(1); } @@ -166,7 +169,8 @@ void RemoveService() if (schService == NULL) { MessageBox(NULL, GetErrorMessage(), - NULL, MB_OK | MB_ICONSTOP); + "OpenService", + MB_OK | MB_ICONSTOP); ExitProcess(1); } @@ -195,7 +199,8 @@ void RemoveService() if (!DeleteService(schService)) { MessageBox(NULL, GetErrorMessage(), - NULL, MB_OK | MB_ICONSTOP); + "DeleteService", + MB_OK | MB_ICONSTOP); ExitProcess(1); }