From c637b96f10e5452147751bb0e6d61cc574760f04 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 28 Feb 2015 23:15:29 +0100 Subject: Win32Main: use TCHAR where appropriate --- src/win32/Win32Main.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/win32/Win32Main.cxx b/src/win32/Win32Main.cxx index 8bef63f3c..a833e7362 100644 --- a/src/win32/Win32Main.cxx +++ b/src/win32/Win32Main.cxx @@ -30,15 +30,16 @@ #include #include +#include static int service_argc; static char **service_argv; -static char service_name[] = ""; +static TCHAR service_name[] = _T(""); static std::atomic_bool running; static SERVICE_STATUS_HANDLE service_handle; static void WINAPI -service_main(DWORD argc, CHAR *argv[]); +service_main(DWORD argc, LPTSTR argv[]); static constexpr SERVICE_TABLE_ENTRY service_registry[] = { {service_name, service_main}, @@ -78,7 +79,7 @@ service_dispatcher(gcc_unused DWORD control, gcc_unused DWORD event_type, } static void WINAPI -service_main(gcc_unused DWORD argc, gcc_unused CHAR *argv[]) +service_main(gcc_unused DWORD argc, gcc_unused LPTSTR argv[]) { service_handle = RegisterServiceCtrlHandlerEx(service_name, @@ -132,7 +133,7 @@ int win32_main(int argc, char *argv[]) if (error_code == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) { /* running as console app */ running.store(false); - SetConsoleTitle("Music Player Daemon"); + SetConsoleTitle(_T("Music Player Daemon")); SetConsoleCtrlHandler(console_handler, TRUE); return mpd_main(argc, argv); } -- cgit v1.2.3