- SF# 3559325: Util Windows broken in non-Unicode

- port of rev. 1918 from 1.4.4 branch (fixed SF# 3519474)
- update VS 2010 Util projects with JSON
This commit is contained in:
Aleksandar Fabijanic
2012-08-19 01:42:38 +00:00
parent d8bbcc08a7
commit 47aadf0681
18 changed files with 344 additions and 309 deletions

View File

@@ -181,7 +181,7 @@ void ServerApplication::ServiceMain(DWORD argc, LPTSTR* argv)
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
_serviceStatusHandle = RegisterServiceCtrlHandlerW(L"", ServiceControlHandler);
#else
_serviceStatusHandle = RegisterServiceCtrlHandler("", ServiceControlHandler);
_serviceStatusHandle = RegisterServiceCtrlHandlerA("", ServiceControlHandler);
#endif
if (!_serviceStatusHandle)
throw SystemException("cannot register service control handler");
@@ -365,7 +365,7 @@ bool ServerApplication::isService()
svcDispatchTable[0].lpServiceProc = ServiceMain;
svcDispatchTable[1].lpServiceName = NULL;
svcDispatchTable[1].lpServiceProc = NULL;
return StartServiceCtrlDispatcher(svcDispatchTable) != 0;
return StartServiceCtrlDispatcherA(svcDispatchTable) != 0;
#endif
}