mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-27 01:14:44 +01:00
submitted 1.2.0
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Environment_WIN32U.cpp
|
||||
//
|
||||
// $Id: //poco/1.1.0/Foundation/src/Environment_WIN32U.cpp#2 $
|
||||
// $Id: //poco/1.2/Foundation/src/Environment_WIN32U.cpp#1 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Core
|
||||
@@ -34,16 +34,16 @@
|
||||
//
|
||||
|
||||
|
||||
#include "Foundation/Environment_WIN32U.h"
|
||||
#include "Foundation/Exception.h"
|
||||
#include "Foundation/UnicodeConverter.h"
|
||||
#include "Foundation/Buffer.h"
|
||||
#include "Poco/Environment_WIN32U.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/UnicodeConverter.h"
|
||||
#include "Poco/Buffer.h"
|
||||
#include <sstream>
|
||||
#include <string.h>
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
Foundation_BEGIN
|
||||
namespace Poco {
|
||||
|
||||
|
||||
std::string EnvironmentImpl::getImpl(const std::string& name)
|
||||
@@ -110,7 +110,9 @@ std::string EnvironmentImpl::osVersionImpl()
|
||||
if (GetVersionEx(&vi) == 0) throw SystemException("Cannot get OS version information");
|
||||
std::ostringstream str;
|
||||
str << vi.dwMajorVersion << "." << vi.dwMinorVersion << " (Build " << (vi.dwBuildNumber & 0xFFFF);
|
||||
if (vi.szCSDVersion[0]) str << ": " << vi.szCSDVersion;
|
||||
std::string version;
|
||||
UnicodeConverter::toUTF8(vi.szCSDVersion, version);
|
||||
if (!version.empty()) str << ": " << version;
|
||||
str << ")";
|
||||
return str.str();
|
||||
}
|
||||
@@ -157,4 +159,4 @@ std::string EnvironmentImpl::nodeNameImpl()
|
||||
}
|
||||
|
||||
|
||||
Foundation_END
|
||||
} // namespace Poco
|
||||
|
||||
Reference in New Issue
Block a user