From a7f9d3126bb2e52b4d7eef1efe8eae46925c60fe Mon Sep 17 00:00:00 2001 From: Takumi Sueda Date: Tue, 19 Apr 2022 01:24:24 +0900 Subject: [PATCH] Remove unused functions and headers --- bootloader.cpp | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/bootloader.cpp b/bootloader.cpp index 6c24ca7..845a91f 100644 --- a/bootloader.cpp +++ b/bootloader.cpp @@ -1,48 +1,7 @@ // This file is in public domain. -#include -#include -#include #include -#define MainWindowClassName L"SelectorMainWindowClass" - -#define DataTypeAlertError 0x1000 -#define DataTypeAlertInformation 0x1001 -#define DataTypeAlertWarning 0x1002 - -static void showAlertWarning(LPCWSTR message, LPCWSTR title) -{ - - HWND selectorMainWindow = FindWindow(MainWindowClassName, NULL); - - if (!selectorMainWindow) - { - MessageBox(NULL, message, title, MB_ICONWARNING); - return; - } - - wchar_t data[2048]; - wcscpy(data, message); - data[wcslen(message)] = 0; - wcscpy(data + wcslen(message) + 1, title); - - size_t dataLen = wcslen(message) + wcslen(title) + 1; - - COPYDATASTRUCT info; - info.dwData = DataTypeAlertWarning; - info.cbData = dataLen * sizeof(wchar_t); - - HGLOBAL global = GlobalAlloc(GPTR, info.cbData); - memcpy((LPVOID)global, data, info.cbData); - - info.lpData = (LPVOID)global; - - SendMessage(selectorMainWindow, WM_COPYDATA, NULL, (LPARAM)&info); - - GlobalFree(global); -} - int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPTSTR lpCmd, int nShow) { HINSTANCE lib = LoadLibrary(L"BrainLILO");