mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 19:10:20 +01:00
- 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:
@@ -134,7 +134,7 @@ void WinService::registerService(const std::string& path, const std::string& dis
|
||||
upath.c_str(),
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
#else
|
||||
_svcHandle = CreateService(
|
||||
_svcHandle = CreateServiceA(
|
||||
_scmHandle,
|
||||
_name.c_str(),
|
||||
displayName.c_str(),
|
||||
@@ -296,7 +296,7 @@ bool WinService::tryOpen() const
|
||||
Poco::UnicodeConverter::toUTF16(_name, uname);
|
||||
_svcHandle = OpenServiceW(_scmHandle, uname.c_str(), SERVICE_ALL_ACCESS);
|
||||
#else
|
||||
_svcHandle = OpenService(_scmHandle, _name.c_str(), SERVICE_ALL_ACCESS);
|
||||
_svcHandle = OpenServiceA(_scmHandle, _name.c_str(), SERVICE_ALL_ACCESS);
|
||||
#endif
|
||||
}
|
||||
return _svcHandle != 0;
|
||||
@@ -325,7 +325,7 @@ POCO_LPQUERY_SERVICE_CONFIG WinService::config() const
|
||||
#if defined(POCO_WIN32_UTF8)
|
||||
while (!QueryServiceConfigW(_svcHandle, pSvcConfig, size, &bytesNeeded))
|
||||
#else
|
||||
while (!QueryServiceConfig(_svcHandle, pSvcConfig, size, &bytesNeeded))
|
||||
while (!QueryServiceConfigA(_svcHandle, pSvcConfig, size, &bytesNeeded))
|
||||
#endif
|
||||
{
|
||||
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
|
||||
|
||||
Reference in New Issue
Block a user