mirror of
https://github.com/EnderIce2/rpc-bridge.git
synced 2025-05-25 22:14:38 +00:00
Remove unnecessary code for starting the bridge service
This commit is contained in:
parent
8fbe00b555
commit
a640dd5af1
17
gui.c
17
gui.c
@ -47,20 +47,6 @@ VOID HandleStartButton(BOOL Silent)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsLinux)
|
|
||||||
{
|
|
||||||
hBridge = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)CreateBridge,
|
|
||||||
NULL, 0, NULL);
|
|
||||||
|
|
||||||
HWND item = GetDlgItem(hwnd, /* Start Button */ 1);
|
|
||||||
Button_SetText(item, "Stop");
|
|
||||||
item = GetDlgItem(hwnd, 4);
|
|
||||||
SetWindowText(item, "Bridge is running...");
|
|
||||||
IsAlreadyRunning = TRUE;
|
|
||||||
ShowWindow(hwnd, SW_MINIMIZE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
|
SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
|
||||||
if (hSCManager == NULL)
|
if (hSCManager == NULL)
|
||||||
{
|
{
|
||||||
@ -72,7 +58,7 @@ VOID HandleStartButton(BOOL Silent)
|
|||||||
SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG | SERVICE_START);
|
SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG | SERVICE_START);
|
||||||
if (schService == NULL)
|
if (schService == NULL)
|
||||||
{
|
{
|
||||||
// print("OpenService failed: %s\n", GetErrorMessage());
|
print("Service doesn't exist: %s\n", GetErrorMessage());
|
||||||
|
|
||||||
/* Service doesn't exist; running without any service */
|
/* Service doesn't exist; running without any service */
|
||||||
|
|
||||||
@ -115,6 +101,7 @@ VOID HandleStartButton(BOOL Silent)
|
|||||||
CloseServiceHandle(hSCManager);
|
CloseServiceHandle(hSCManager);
|
||||||
if (Silent == FALSE)
|
if (Silent == FALSE)
|
||||||
MessageBox(NULL, "Bridge service started successfully", "Info", MB_OK);
|
MessageBox(NULL, "Bridge service started successfully", "Info", MB_OK);
|
||||||
|
print("Bridge service started successfully\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID HandleInstallButton()
|
VOID HandleInstallButton()
|
||||||
|
4
main.c
4
main.c
@ -72,9 +72,7 @@ void DetectWine()
|
|||||||
{
|
{
|
||||||
int result = MessageBox(NULL, "This program is designed for Linux and macOS only!\nDo you want to proceed?",
|
int result = MessageBox(NULL, "This program is designed for Linux and macOS only!\nDo you want to proceed?",
|
||||||
NULL, MB_YESNO | MB_ICONQUESTION);
|
NULL, MB_YESNO | MB_ICONQUESTION);
|
||||||
if (result == IDYES)
|
if (result == IDNO)
|
||||||
return;
|
|
||||||
else if (result == IDNO)
|
|
||||||
ExitProcess(1);
|
ExitProcess(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user