mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 00:07:59 +02:00
committed 1.3 release
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Application.cpp
|
||||
//
|
||||
// $Id: //poco/Main/Util/src/Application.cpp#27 $
|
||||
// $Id: //poco/Main/Util/src/Application.cpp#28 $
|
||||
//
|
||||
// Library: Util
|
||||
// Package: Application
|
||||
@@ -410,7 +410,7 @@ void Application::getApplicationPath(Poco::Path& appPath) const
|
||||
else throw SystemException("Cannot get application file name.");
|
||||
#else
|
||||
char path[1024];
|
||||
int n = GetModuleFileName(0, path, sizeof(path));
|
||||
int n = GetModuleFileNameA(0, path, sizeof(path));
|
||||
if (n > 0)
|
||||
appPath = path;
|
||||
else
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// WinRegistryKey.cpp
|
||||
//
|
||||
// $Id: //poco/Main/Util/src/WinRegistryKey.cpp#12 $
|
||||
// $Id: //poco/Main/Util/src/WinRegistryKey.cpp#13 $
|
||||
//
|
||||
// Library: Util
|
||||
// Package: Windows
|
||||
@@ -186,9 +186,9 @@ std::string WinRegistryKey::getStringExpand(const std::string& name)
|
||||
RegQueryValueEx(_hKey, name.c_str(), NULL, NULL, (BYTE*) buffer, &size);
|
||||
buffer[size] = 0;
|
||||
char temp;
|
||||
DWORD expSize = ExpandEnvironmentStrings(buffer, &temp, 1);
|
||||
DWORD expSize = ExpandEnvironmentStringsA(buffer, &temp, 1);
|
||||
char* expBuffer = new char[expSize];
|
||||
ExpandEnvironmentStrings(buffer, expBuffer, expSize);
|
||||
ExpandEnvironmentStringsA(buffer, expBuffer, expSize);
|
||||
std::string result(expBuffer);
|
||||
delete [] buffer;
|
||||
delete [] expBuffer;
|
||||
|
Reference in New Issue
Block a user