Remove support for compiling without POCO_WIN32_UTF8 on Windows #630

This commit is contained in:
Alex Fabijanic 2017-10-16 22:40:23 -05:00
parent 071cdd1026
commit 8d5e0a2590
92 changed files with 376 additions and 3510 deletions

View File

@ -33,7 +33,7 @@
#include <sqlucode.h>
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#if defined(POCO_OS_FAMILY_WINDOWS)
#define POCO_ODBC_UNICODE
#define POCO_ODBC_UNICODE_WINDOWS
#elif defined(POCO_OS_FAMILY_UNIX) && defined(UNICODE)

View File

@ -348,14 +348,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\DirectoryIterator_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\DirectoryWatcher.cpp" />
<ClCompile Include="src\Environment.cpp" />
<ClCompile Include="src\Environment_UNIX.cpp">
@ -382,14 +374,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Environment_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Error.cpp" />
<ClCompile Include="src\ErrorHandler.cpp" />
<ClCompile Include="src\Event.cpp" />
@ -458,14 +442,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\File_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Format.cpp" />
<ClCompile Include="src\Formatter.cpp" />
<ClCompile Include="src\FormattingChannel.cpp" />
@ -551,14 +527,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\LogFile_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Logger.cpp" />
<ClCompile Include="src\LoggingFactory.cpp" />
<ClCompile Include="src\LoggingRegistry.cpp" />
@ -611,14 +579,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NamedEvent_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NamedMutex.cpp" />
<ClCompile Include="src\NamedMutex_UNIX.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
@ -644,14 +604,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NamedMutex_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NestedDiagnosticContext.cpp" />
<ClCompile Include="src\Notification.cpp" />
<ClCompile Include="src\NotificationCenter.cpp" />
@ -694,14 +646,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Path_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\PatternFormatter.cpp" />
<ClCompile Include="src\pcre_byte_order.c" />
<ClCompile Include="src\pcre_chartables.c" />
@ -777,14 +721,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Process_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\PurgeStrategy.cpp" />
<ClCompile Include="src\Random.cpp" />
<ClCompile Include="src\RandomStream.cpp" />
@ -863,14 +799,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\SharedLibrary_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\SharedMemory.cpp" />
<ClCompile Include="src\SharedMemory_DUMMY.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
@ -1069,7 +997,6 @@
<ClInclude Include="include\Poco\DirectoryIterator_UNIX.h" />
<ClInclude Include="include\Poco\DirectoryIterator_VMS.h" />
<ClInclude Include="include\Poco\DirectoryIterator_WIN32.h" />
<ClInclude Include="include\Poco\DirectoryIterator_WIN32U.h" />
<ClInclude Include="include\Poco\DirectoryWatcher.h" />
<ClInclude Include="include\Poco\DynamicAny.h" />
<ClInclude Include="include\Poco\DynamicAnyHolder.h" />
@ -1083,7 +1010,6 @@
<ClInclude Include="include\Poco\Environment_UNIX.h" />
<ClInclude Include="include\Poco\Environment_VMS.h" />
<ClInclude Include="include\Poco\Environment_WIN32.h" />
<ClInclude Include="include\Poco\Environment_WIN32U.h" />
<ClInclude Include="include\Poco\Error.h" />
<ClInclude Include="include\Poco\ErrorHandler.h" />
<ClInclude Include="include\Poco\Event.h" />
@ -1110,7 +1036,6 @@
<ClInclude Include="include\Poco\File_UNIX.h" />
<ClInclude Include="include\Poco\File_VMS.h" />
<ClInclude Include="include\Poco\File_WIN32.h" />
<ClInclude Include="include\Poco\File_WIN32U.h" />
<ClInclude Include="include\Poco\Format.h" />
<ClInclude Include="include\Poco\Formatter.h" />
<ClInclude Include="include\Poco\FormattingChannel.h" />
@ -1148,7 +1073,6 @@
<ClInclude Include="include\Poco\LogFile_STD.h" />
<ClInclude Include="include\Poco\LogFile_VMS.h" />
<ClInclude Include="include\Poco\LogFile_WIN32.h" />
<ClInclude Include="include\Poco\LogFile_WIN32U.h" />
<ClInclude Include="include\Poco\Logger.h" />
<ClInclude Include="include\Poco\LoggingFactory.h" />
<ClInclude Include="include\Poco\LoggingRegistry.h" />
@ -1170,12 +1094,10 @@
<ClInclude Include="include\Poco\NamedEvent_UNIX.h" />
<ClInclude Include="include\Poco\NamedEvent_VMS.h" />
<ClInclude Include="include\Poco\NamedEvent_WIN32.h" />
<ClInclude Include="include\Poco\NamedEvent_WIN32U.h" />
<ClInclude Include="include\Poco\NamedMutex.h" />
<ClInclude Include="include\Poco\NamedMutex_UNIX.h" />
<ClInclude Include="include\Poco\NamedMutex_VMS.h" />
<ClInclude Include="include\Poco\NamedMutex_WIN32.h" />
<ClInclude Include="include\Poco\NamedMutex_WIN32U.h" />
<ClInclude Include="include\Poco\NamedTuple.h" />
<ClInclude Include="include\Poco\NestedDiagnosticContext.h" />
<ClInclude Include="include\Poco\NObserver.h" />
@ -1197,7 +1119,6 @@
<ClInclude Include="include\Poco\Path_UNIX.h" />
<ClInclude Include="include\Poco\Path_VMS.h" />
<ClInclude Include="include\Poco\Path_WIN32.h" />
<ClInclude Include="include\Poco\Path_WIN32U.h" />
<ClInclude Include="include\Poco\PatternFormatter.h" />
<ClInclude Include="include\Poco\PBKDF2Engine.h" />
<ClInclude Include="include\Poco\Pipe.h" />
@ -1220,7 +1141,6 @@
<ClInclude Include="include\Poco\Process_UNIX.h" />
<ClInclude Include="include\Poco\Process_VMS.h" />
<ClInclude Include="include\Poco\Process_WIN32.h" />
<ClInclude Include="include\Poco\Process_WIN32U.h" />
<ClInclude Include="include\Poco\PurgeStrategy.h" />
<ClInclude Include="include\Poco\Random.h" />
<ClInclude Include="include\Poco\RandomStream.h" />
@ -1248,7 +1168,6 @@
<ClInclude Include="include\Poco\SharedLibrary_UNIX.h" />
<ClInclude Include="include\Poco\SharedLibrary_VMS.h" />
<ClInclude Include="include\Poco\SharedLibrary_WIN32.h" />
<ClInclude Include="include\Poco\SharedLibrary_WIN32U.h" />
<ClInclude Include="include\Poco\SharedMemory.h" />
<ClInclude Include="include\Poco\SharedMemory_DUMMY.h" />
<ClInclude Include="include\Poco\SharedMemory_POSIX.h" />

View File

@ -219,12 +219,6 @@
<ClCompile Include="src\Environment_VMS.cpp">
<Filter>Core\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Environment_WIN32.cpp">
<Filter>Core\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Environment_WIN32U.cpp">
<Filter>Core\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Error.cpp">
<Filter>Core\Source Files</Filter>
</ClCompile>
@ -501,12 +495,6 @@
<ClCompile Include="src\SharedLibrary_VMS.cpp">
<Filter>SharedLibrary\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SharedLibrary_WIN32.cpp">
<Filter>SharedLibrary\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SharedLibrary_WIN32U.cpp">
<Filter>SharedLibrary\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\RegularExpression.cpp">
<Filter>RegularExpression\Source Files</Filter>
</ClCompile>
@ -612,12 +600,6 @@
<ClCompile Include="src\LogFile_VMS.cpp">
<Filter>Logging\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\LogFile_WIN32.cpp">
<Filter>Logging\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\LogFile_WIN32U.cpp">
<Filter>Logging\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Logger.cpp">
<Filter>Logging\Source Files</Filter>
</ClCompile>
@ -690,12 +672,6 @@
<ClCompile Include="src\DirectoryIterator_VMS.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DirectoryIterator_WIN32.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DirectoryIterator_WIN32U.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DirectoryWatcher.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
@ -708,12 +684,6 @@
<ClCompile Include="src\File_VMS.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\File_WIN32.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\File_WIN32U.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Glob.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
@ -726,12 +696,6 @@
<ClCompile Include="src\Path_VMS.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Path_WIN32.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Path_WIN32U.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\TemporaryFile.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
@ -744,12 +708,6 @@
<ClCompile Include="src\NamedEvent_VMS.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedEvent_WIN32.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedEvent_WIN32U.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedMutex.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
@ -759,12 +717,6 @@
<ClCompile Include="src\NamedMutex_VMS.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedMutex_WIN32.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedMutex_WIN32U.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Pipe.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
@ -792,12 +744,6 @@
<ClCompile Include="src\Process_VMS.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Process_WIN32.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Process_WIN32U.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SharedMemory.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
@ -951,6 +897,33 @@
<ClCompile Include="src\Checksum64.cpp">
<Filter>Core\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Environment_WIN32.cpp">
<Filter>Core\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\File_WIN32.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Path_WIN32.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Process_WIN32.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SharedLibrary_WIN32.cpp">
<Filter>SharedLibrary\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DirectoryIterator_WIN32.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\LogFile_WIN32.cpp">
<Filter>Logging\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedMutex_WIN32.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedEvent_WIN32.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="include\Poco\Any.h">
@ -1004,12 +977,6 @@
<ClInclude Include="include\Poco\Environment_VMS.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Environment_WIN32.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Environment_WIN32U.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Error.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
@ -1397,12 +1364,6 @@
<ClInclude Include="include\Poco\SharedLibrary_VMS.h">
<Filter>SharedLibrary\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\SharedLibrary_WIN32.h">
<Filter>SharedLibrary\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\SharedLibrary_WIN32U.h">
<Filter>SharedLibrary\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\pcre.h">
<Filter>RegularExpression\PCRE Header Files</Filter>
</ClInclude>
@ -1457,12 +1418,6 @@
<ClInclude Include="include\Poco\LogFile_VMS.h">
<Filter>Logging\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\LogFile_WIN32.h">
<Filter>Logging\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\LogFile_WIN32U.h">
<Filter>Logging\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Logger.h">
<Filter>Logging\Header Files</Filter>
</ClInclude>
@ -1544,12 +1499,6 @@
<ClInclude Include="include\Poco\DirectoryIterator_VMS.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\DirectoryIterator_WIN32.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\DirectoryIterator_WIN32U.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\DirectoryWatcher.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
@ -1562,12 +1511,6 @@
<ClInclude Include="include\Poco\File_VMS.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\File_WIN32.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\File_WIN32U.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Glob.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
@ -1580,12 +1523,6 @@
<ClInclude Include="include\Poco\Path_VMS.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Path_WIN32.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Path_WIN32U.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\TemporaryFile.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
@ -1598,12 +1535,6 @@
<ClInclude Include="include\Poco\NamedEvent_VMS.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedEvent_WIN32.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedEvent_WIN32U.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedMutex.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
@ -1613,12 +1544,6 @@
<ClInclude Include="include\Poco\NamedMutex_VMS.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedMutex_WIN32.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedMutex_WIN32U.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Pipe.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
@ -1646,12 +1571,6 @@
<ClInclude Include="include\Poco\Process_VMS.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Process_WIN32.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Process_WIN32U.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\SharedMemory.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
@ -1949,6 +1868,33 @@
<ClInclude Include="include\Poco\ChecksumImpl.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Environment_WIN32.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\File_WIN32.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Path_WIN32.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Process_WIN32.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\SharedLibrary_WIN32.h">
<Filter>SharedLibrary\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\DirectoryIterator_WIN32.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\LogFile_WIN32.h">
<Filter>Logging\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedMutex_WIN32.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedEvent_WIN32.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="src\pocomsg.rc">

View File

@ -348,14 +348,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\DirectoryIterator_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\DirectoryWatcher.cpp" />
<ClCompile Include="src\Environment.cpp" />
<ClCompile Include="src\Environment_UNIX.cpp">
@ -382,14 +374,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Environment_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Error.cpp" />
<ClCompile Include="src\ErrorHandler.cpp" />
<ClCompile Include="src\Event.cpp" />
@ -458,14 +442,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\File_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Format.cpp" />
<ClCompile Include="src\Formatter.cpp" />
<ClCompile Include="src\FormattingChannel.cpp" />
@ -551,14 +527,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\LogFile_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Logger.cpp" />
<ClCompile Include="src\LoggingFactory.cpp" />
<ClCompile Include="src\LoggingRegistry.cpp" />
@ -611,14 +579,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NamedEvent_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NamedMutex.cpp" />
<ClCompile Include="src\NamedMutex_UNIX.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
@ -644,14 +604,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NamedMutex_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NestedDiagnosticContext.cpp" />
<ClCompile Include="src\Notification.cpp" />
<ClCompile Include="src\NotificationCenter.cpp" />
@ -694,14 +646,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Path_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\PatternFormatter.cpp" />
<ClCompile Include="src\pcre_byte_order.c" />
<ClCompile Include="src\pcre_chartables.c" />
@ -777,14 +721,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Process_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\PurgeStrategy.cpp" />
<ClCompile Include="src\Random.cpp" />
<ClCompile Include="src\RandomStream.cpp" />
@ -1069,7 +1005,6 @@
<ClInclude Include="include\Poco\DirectoryIterator_UNIX.h" />
<ClInclude Include="include\Poco\DirectoryIterator_VMS.h" />
<ClInclude Include="include\Poco\DirectoryIterator_WIN32.h" />
<ClInclude Include="include\Poco\DirectoryIterator_WIN32U.h" />
<ClInclude Include="include\Poco\DirectoryWatcher.h" />
<ClInclude Include="include\Poco\DynamicAny.h" />
<ClInclude Include="include\Poco\DynamicAnyHolder.h" />
@ -1083,7 +1018,6 @@
<ClInclude Include="include\Poco\Environment_UNIX.h" />
<ClInclude Include="include\Poco\Environment_VMS.h" />
<ClInclude Include="include\Poco\Environment_WIN32.h" />
<ClInclude Include="include\Poco\Environment_WIN32U.h" />
<ClInclude Include="include\Poco\Error.h" />
<ClInclude Include="include\Poco\ErrorHandler.h" />
<ClInclude Include="include\Poco\Event.h" />
@ -1110,7 +1044,6 @@
<ClInclude Include="include\Poco\File_UNIX.h" />
<ClInclude Include="include\Poco\File_VMS.h" />
<ClInclude Include="include\Poco\File_WIN32.h" />
<ClInclude Include="include\Poco\File_WIN32U.h" />
<ClInclude Include="include\Poco\Format.h" />
<ClInclude Include="include\Poco\Formatter.h" />
<ClInclude Include="include\Poco\FormattingChannel.h" />
@ -1148,7 +1081,6 @@
<ClInclude Include="include\Poco\LogFile_STD.h" />
<ClInclude Include="include\Poco\LogFile_VMS.h" />
<ClInclude Include="include\Poco\LogFile_WIN32.h" />
<ClInclude Include="include\Poco\LogFile_WIN32U.h" />
<ClInclude Include="include\Poco\Logger.h" />
<ClInclude Include="include\Poco\LoggingFactory.h" />
<ClInclude Include="include\Poco\LoggingRegistry.h" />
@ -1170,12 +1102,10 @@
<ClInclude Include="include\Poco\NamedEvent_UNIX.h" />
<ClInclude Include="include\Poco\NamedEvent_VMS.h" />
<ClInclude Include="include\Poco\NamedEvent_WIN32.h" />
<ClInclude Include="include\Poco\NamedEvent_WIN32U.h" />
<ClInclude Include="include\Poco\NamedMutex.h" />
<ClInclude Include="include\Poco\NamedMutex_UNIX.h" />
<ClInclude Include="include\Poco\NamedMutex_VMS.h" />
<ClInclude Include="include\Poco\NamedMutex_WIN32.h" />
<ClInclude Include="include\Poco\NamedMutex_WIN32U.h" />
<ClInclude Include="include\Poco\NamedTuple.h" />
<ClInclude Include="include\Poco\NestedDiagnosticContext.h" />
<ClInclude Include="include\Poco\NObserver.h" />
@ -1197,7 +1127,6 @@
<ClInclude Include="include\Poco\Path_UNIX.h" />
<ClInclude Include="include\Poco\Path_VMS.h" />
<ClInclude Include="include\Poco\Path_WIN32.h" />
<ClInclude Include="include\Poco\Path_WIN32U.h" />
<ClInclude Include="include\Poco\PatternFormatter.h" />
<ClInclude Include="include\Poco\PBKDF2Engine.h" />
<ClInclude Include="include\Poco\Pipe.h" />
@ -1220,7 +1149,6 @@
<ClInclude Include="include\Poco\Process_UNIX.h" />
<ClInclude Include="include\Poco\Process_VMS.h" />
<ClInclude Include="include\Poco\Process_WIN32.h" />
<ClInclude Include="include\Poco\Process_WIN32U.h" />
<ClInclude Include="include\Poco\PurgeStrategy.h" />
<ClInclude Include="include\Poco\Random.h" />
<ClInclude Include="include\Poco\RandomStream.h" />

View File

@ -222,9 +222,6 @@
<ClCompile Include="src\Environment_WIN32.cpp">
<Filter>Core\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Environment_WIN32U.cpp">
<Filter>Core\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Error.cpp">
<Filter>Core\Source Files</Filter>
</ClCompile>
@ -615,9 +612,6 @@
<ClCompile Include="src\LogFile_WIN32.cpp">
<Filter>Logging\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\LogFile_WIN32U.cpp">
<Filter>Logging\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Logger.cpp">
<Filter>Logging\Source Files</Filter>
</ClCompile>
@ -693,9 +687,6 @@
<ClCompile Include="src\DirectoryIterator_WIN32.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DirectoryIterator_WIN32U.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DirectoryWatcher.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
@ -711,9 +702,6 @@
<ClCompile Include="src\File_WIN32.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\File_WIN32U.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Glob.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
@ -729,9 +717,6 @@
<ClCompile Include="src\Path_WIN32.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Path_WIN32U.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\TemporaryFile.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
@ -747,9 +732,6 @@
<ClCompile Include="src\NamedEvent_WIN32.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedEvent_WIN32U.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedMutex.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
@ -762,9 +744,6 @@
<ClCompile Include="src\NamedMutex_WIN32.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedMutex_WIN32U.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Pipe.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
@ -795,9 +774,6 @@
<ClCompile Include="src\Process_WIN32.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Process_WIN32U.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SharedMemory.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
@ -1007,9 +983,6 @@
<ClInclude Include="include\Poco\Environment_WIN32.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Environment_WIN32U.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Error.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
@ -1460,9 +1433,6 @@
<ClInclude Include="include\Poco\LogFile_WIN32.h">
<Filter>Logging\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\LogFile_WIN32U.h">
<Filter>Logging\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Logger.h">
<Filter>Logging\Header Files</Filter>
</ClInclude>
@ -1547,9 +1517,6 @@
<ClInclude Include="include\Poco\DirectoryIterator_WIN32.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\DirectoryIterator_WIN32U.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\DirectoryWatcher.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
@ -1565,9 +1532,6 @@
<ClInclude Include="include\Poco\File_WIN32.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\File_WIN32U.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Glob.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
@ -1583,9 +1547,6 @@
<ClInclude Include="include\Poco\Path_WIN32.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Path_WIN32U.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\TemporaryFile.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
@ -1601,9 +1562,6 @@
<ClInclude Include="include\Poco\NamedEvent_WIN32.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedEvent_WIN32U.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedMutex.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
@ -1616,9 +1574,6 @@
<ClInclude Include="include\Poco\NamedMutex_WIN32.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedMutex_WIN32U.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Pipe.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
@ -1649,9 +1604,6 @@
<ClInclude Include="include\Poco\Process_WIN32.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Process_WIN32U.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\SharedMemory.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>

View File

@ -346,14 +346,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\DirectoryIterator_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\DirectoryWatcher.cpp" />
<ClCompile Include="src\Environment.cpp" />
<ClCompile Include="src\Environment_UNIX.cpp">
@ -380,14 +372,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Environment_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Error.cpp" />
<ClCompile Include="src\ErrorHandler.cpp" />
<ClCompile Include="src\Event.cpp" />
@ -456,14 +440,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\File_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Format.cpp" />
<ClCompile Include="src\Formatter.cpp" />
<ClCompile Include="src\FormattingChannel.cpp" />
@ -549,14 +525,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\LogFile_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Logger.cpp" />
<ClCompile Include="src\LoggingFactory.cpp" />
<ClCompile Include="src\LoggingRegistry.cpp" />
@ -609,14 +577,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NamedEvent_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NamedMutex.cpp" />
<ClCompile Include="src\NamedMutex_UNIX.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
@ -642,14 +602,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NamedMutex_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NestedDiagnosticContext.cpp" />
<ClCompile Include="src\Notification.cpp" />
<ClCompile Include="src\NotificationCenter.cpp" />
@ -692,14 +644,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Path_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\PatternFormatter.cpp" />
<ClCompile Include="src\pcre_byte_order.c" />
<ClCompile Include="src\pcre_chartables.c" />
@ -775,14 +719,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Process_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\PurgeStrategy.cpp" />
<ClCompile Include="src\Random.cpp" />
<ClCompile Include="src\RandomStream.cpp" />
@ -861,14 +797,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\SharedLibrary_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\SharedMemory.cpp" />
<ClCompile Include="src\SharedMemory_DUMMY.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
@ -1067,7 +995,6 @@
<ClInclude Include="include\Poco\DirectoryIterator_UNIX.h" />
<ClInclude Include="include\Poco\DirectoryIterator_VMS.h" />
<ClInclude Include="include\Poco\DirectoryIterator_WIN32.h" />
<ClInclude Include="include\Poco\DirectoryIterator_WIN32U.h" />
<ClInclude Include="include\Poco\DirectoryWatcher.h" />
<ClInclude Include="include\Poco\DynamicAny.h" />
<ClInclude Include="include\Poco\DynamicAnyHolder.h" />
@ -1081,7 +1008,6 @@
<ClInclude Include="include\Poco\Environment_UNIX.h" />
<ClInclude Include="include\Poco\Environment_VMS.h" />
<ClInclude Include="include\Poco\Environment_WIN32.h" />
<ClInclude Include="include\Poco\Environment_WIN32U.h" />
<ClInclude Include="include\Poco\Error.h" />
<ClInclude Include="include\Poco\ErrorHandler.h" />
<ClInclude Include="include\Poco\Event.h" />
@ -1108,7 +1034,6 @@
<ClInclude Include="include\Poco\File_UNIX.h" />
<ClInclude Include="include\Poco\File_VMS.h" />
<ClInclude Include="include\Poco\File_WIN32.h" />
<ClInclude Include="include\Poco\File_WIN32U.h" />
<ClInclude Include="include\Poco\Format.h" />
<ClInclude Include="include\Poco\Formatter.h" />
<ClInclude Include="include\Poco\FormattingChannel.h" />
@ -1146,7 +1071,6 @@
<ClInclude Include="include\Poco\LogFile_STD.h" />
<ClInclude Include="include\Poco\LogFile_VMS.h" />
<ClInclude Include="include\Poco\LogFile_WIN32.h" />
<ClInclude Include="include\Poco\LogFile_WIN32U.h" />
<ClInclude Include="include\Poco\Logger.h" />
<ClInclude Include="include\Poco\LoggingFactory.h" />
<ClInclude Include="include\Poco\LoggingRegistry.h" />
@ -1168,12 +1092,10 @@
<ClInclude Include="include\Poco\NamedEvent_UNIX.h" />
<ClInclude Include="include\Poco\NamedEvent_VMS.h" />
<ClInclude Include="include\Poco\NamedEvent_WIN32.h" />
<ClInclude Include="include\Poco\NamedEvent_WIN32U.h" />
<ClInclude Include="include\Poco\NamedMutex.h" />
<ClInclude Include="include\Poco\NamedMutex_UNIX.h" />
<ClInclude Include="include\Poco\NamedMutex_VMS.h" />
<ClInclude Include="include\Poco\NamedMutex_WIN32.h" />
<ClInclude Include="include\Poco\NamedMutex_WIN32U.h" />
<ClInclude Include="include\Poco\NamedTuple.h" />
<ClInclude Include="include\Poco\NestedDiagnosticContext.h" />
<ClInclude Include="include\Poco\NObserver.h" />
@ -1195,7 +1117,6 @@
<ClInclude Include="include\Poco\Path_UNIX.h" />
<ClInclude Include="include\Poco\Path_VMS.h" />
<ClInclude Include="include\Poco\Path_WIN32.h" />
<ClInclude Include="include\Poco\Path_WIN32U.h" />
<ClInclude Include="include\Poco\PatternFormatter.h" />
<ClInclude Include="include\Poco\PBKDF2Engine.h" />
<ClInclude Include="include\Poco\Pipe.h" />
@ -1218,7 +1139,6 @@
<ClInclude Include="include\Poco\Process_UNIX.h" />
<ClInclude Include="include\Poco\Process_VMS.h" />
<ClInclude Include="include\Poco\Process_WIN32.h" />
<ClInclude Include="include\Poco\Process_WIN32U.h" />
<ClInclude Include="include\Poco\PurgeStrategy.h" />
<ClInclude Include="include\Poco\Random.h" />
<ClInclude Include="include\Poco\RandomStream.h" />
@ -1246,7 +1166,6 @@
<ClInclude Include="include\Poco\SharedLibrary_UNIX.h" />
<ClInclude Include="include\Poco\SharedLibrary_VMS.h" />
<ClInclude Include="include\Poco\SharedLibrary_WIN32.h" />
<ClInclude Include="include\Poco\SharedLibrary_WIN32U.h" />
<ClInclude Include="include\Poco\SharedMemory.h" />
<ClInclude Include="include\Poco\SharedMemory_DUMMY.h" />
<ClInclude Include="include\Poco\SharedMemory_POSIX.h" />

View File

@ -222,9 +222,6 @@
<ClCompile Include="src\Environment_WIN32.cpp">
<Filter>Core\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Environment_WIN32U.cpp">
<Filter>Core\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Error.cpp">
<Filter>Core\Source Files</Filter>
</ClCompile>
@ -504,9 +501,6 @@
<ClCompile Include="src\SharedLibrary_WIN32.cpp">
<Filter>SharedLibrary\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SharedLibrary_WIN32U.cpp">
<Filter>SharedLibrary\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\RegularExpression.cpp">
<Filter>RegularExpression\Source Files</Filter>
</ClCompile>
@ -615,9 +609,6 @@
<ClCompile Include="src\LogFile_WIN32.cpp">
<Filter>Logging\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\LogFile_WIN32U.cpp">
<Filter>Logging\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Logger.cpp">
<Filter>Logging\Source Files</Filter>
</ClCompile>
@ -693,9 +684,6 @@
<ClCompile Include="src\DirectoryIterator_WIN32.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DirectoryIterator_WIN32U.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DirectoryWatcher.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
@ -711,9 +699,6 @@
<ClCompile Include="src\File_WIN32.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\File_WIN32U.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Glob.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
@ -729,9 +714,6 @@
<ClCompile Include="src\Path_WIN32.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Path_WIN32U.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\TemporaryFile.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
@ -747,9 +729,6 @@
<ClCompile Include="src\NamedEvent_WIN32.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedEvent_WIN32U.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedMutex.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
@ -762,9 +741,6 @@
<ClCompile Include="src\NamedMutex_WIN32.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedMutex_WIN32U.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Pipe.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
@ -795,9 +771,6 @@
<ClCompile Include="src\Process_WIN32.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Process_WIN32U.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SharedMemory.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
@ -1007,9 +980,6 @@
<ClInclude Include="include\Poco\Environment_WIN32.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Environment_WIN32U.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Error.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
@ -1400,9 +1370,6 @@
<ClInclude Include="include\Poco\SharedLibrary_WIN32.h">
<Filter>SharedLibrary\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\SharedLibrary_WIN32U.h">
<Filter>SharedLibrary\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\pcre.h">
<Filter>RegularExpression\PCRE Header Files</Filter>
</ClInclude>
@ -1460,9 +1427,6 @@
<ClInclude Include="include\Poco\LogFile_WIN32.h">
<Filter>Logging\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\LogFile_WIN32U.h">
<Filter>Logging\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Logger.h">
<Filter>Logging\Header Files</Filter>
</ClInclude>
@ -1547,9 +1511,6 @@
<ClInclude Include="include\Poco\DirectoryIterator_WIN32.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\DirectoryIterator_WIN32U.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\DirectoryWatcher.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
@ -1565,9 +1526,6 @@
<ClInclude Include="include\Poco\File_WIN32.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\File_WIN32U.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Glob.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
@ -1583,9 +1541,6 @@
<ClInclude Include="include\Poco\Path_WIN32.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Path_WIN32U.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\TemporaryFile.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
@ -1601,9 +1556,6 @@
<ClInclude Include="include\Poco\NamedEvent_WIN32.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedEvent_WIN32U.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedMutex.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
@ -1616,9 +1568,6 @@
<ClInclude Include="include\Poco\NamedMutex_WIN32.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedMutex_WIN32U.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Pipe.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
@ -1649,9 +1598,6 @@
<ClInclude Include="include\Poco\Process_WIN32.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Process_WIN32U.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\SharedMemory.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>

View File

@ -346,14 +346,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\DirectoryIterator_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\DirectoryWatcher.cpp" />
<ClCompile Include="src\Environment.cpp" />
<ClCompile Include="src\Environment_UNIX.cpp">
@ -380,14 +372,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Environment_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Error.cpp" />
<ClCompile Include="src\ErrorHandler.cpp" />
<ClCompile Include="src\Event.cpp" />
@ -456,14 +440,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\File_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Format.cpp" />
<ClCompile Include="src\Formatter.cpp" />
<ClCompile Include="src\FormattingChannel.cpp" />
@ -549,14 +525,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\LogFile_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Logger.cpp" />
<ClCompile Include="src\LoggingFactory.cpp" />
<ClCompile Include="src\LoggingRegistry.cpp" />
@ -609,14 +577,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NamedEvent_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NamedMutex.cpp" />
<ClCompile Include="src\NamedMutex_UNIX.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
@ -642,14 +602,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NamedMutex_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\NestedDiagnosticContext.cpp" />
<ClCompile Include="src\Notification.cpp" />
<ClCompile Include="src\NotificationCenter.cpp" />
@ -692,14 +644,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Path_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\PatternFormatter.cpp" />
<ClCompile Include="src\pcre_byte_order.c" />
<ClCompile Include="src\pcre_chartables.c" />
@ -775,14 +719,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\Process_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\PurgeStrategy.cpp" />
<ClCompile Include="src\Random.cpp" />
<ClCompile Include="src\RandomStream.cpp" />
@ -861,14 +797,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\SharedLibrary_WIN32U.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="src\SharedMemory.cpp" />
<ClCompile Include="src\SharedMemory_DUMMY.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
@ -1067,7 +995,6 @@
<ClInclude Include="include\Poco\DirectoryIterator_UNIX.h" />
<ClInclude Include="include\Poco\DirectoryIterator_VMS.h" />
<ClInclude Include="include\Poco\DirectoryIterator_WIN32.h" />
<ClInclude Include="include\Poco\DirectoryIterator_WIN32U.h" />
<ClInclude Include="include\Poco\DirectoryWatcher.h" />
<ClInclude Include="include\Poco\DynamicAny.h" />
<ClInclude Include="include\Poco\DynamicAnyHolder.h" />
@ -1081,7 +1008,6 @@
<ClInclude Include="include\Poco\Environment_UNIX.h" />
<ClInclude Include="include\Poco\Environment_VMS.h" />
<ClInclude Include="include\Poco\Environment_WIN32.h" />
<ClInclude Include="include\Poco\Environment_WIN32U.h" />
<ClInclude Include="include\Poco\Error.h" />
<ClInclude Include="include\Poco\ErrorHandler.h" />
<ClInclude Include="include\Poco\Event.h" />
@ -1108,7 +1034,6 @@
<ClInclude Include="include\Poco\File_UNIX.h" />
<ClInclude Include="include\Poco\File_VMS.h" />
<ClInclude Include="include\Poco\File_WIN32.h" />
<ClInclude Include="include\Poco\File_WIN32U.h" />
<ClInclude Include="include\Poco\Format.h" />
<ClInclude Include="include\Poco\Formatter.h" />
<ClInclude Include="include\Poco\FormattingChannel.h" />
@ -1146,7 +1071,6 @@
<ClInclude Include="include\Poco\LogFile_STD.h" />
<ClInclude Include="include\Poco\LogFile_VMS.h" />
<ClInclude Include="include\Poco\LogFile_WIN32.h" />
<ClInclude Include="include\Poco\LogFile_WIN32U.h" />
<ClInclude Include="include\Poco\Logger.h" />
<ClInclude Include="include\Poco\LoggingFactory.h" />
<ClInclude Include="include\Poco\LoggingRegistry.h" />
@ -1168,12 +1092,10 @@
<ClInclude Include="include\Poco\NamedEvent_UNIX.h" />
<ClInclude Include="include\Poco\NamedEvent_VMS.h" />
<ClInclude Include="include\Poco\NamedEvent_WIN32.h" />
<ClInclude Include="include\Poco\NamedEvent_WIN32U.h" />
<ClInclude Include="include\Poco\NamedMutex.h" />
<ClInclude Include="include\Poco\NamedMutex_UNIX.h" />
<ClInclude Include="include\Poco\NamedMutex_VMS.h" />
<ClInclude Include="include\Poco\NamedMutex_WIN32.h" />
<ClInclude Include="include\Poco\NamedMutex_WIN32U.h" />
<ClInclude Include="include\Poco\NamedTuple.h" />
<ClInclude Include="include\Poco\NestedDiagnosticContext.h" />
<ClInclude Include="include\Poco\NObserver.h" />
@ -1195,7 +1117,6 @@
<ClInclude Include="include\Poco\Path_UNIX.h" />
<ClInclude Include="include\Poco\Path_VMS.h" />
<ClInclude Include="include\Poco\Path_WIN32.h" />
<ClInclude Include="include\Poco\Path_WIN32U.h" />
<ClInclude Include="include\Poco\PatternFormatter.h" />
<ClInclude Include="include\Poco\PBKDF2Engine.h" />
<ClInclude Include="include\Poco\Pipe.h" />
@ -1218,7 +1139,6 @@
<ClInclude Include="include\Poco\Process_UNIX.h" />
<ClInclude Include="include\Poco\Process_VMS.h" />
<ClInclude Include="include\Poco\Process_WIN32.h" />
<ClInclude Include="include\Poco\Process_WIN32U.h" />
<ClInclude Include="include\Poco\PurgeStrategy.h" />
<ClInclude Include="include\Poco\Random.h" />
<ClInclude Include="include\Poco\RandomStream.h" />
@ -1246,7 +1166,6 @@
<ClInclude Include="include\Poco\SharedLibrary_UNIX.h" />
<ClInclude Include="include\Poco\SharedLibrary_VMS.h" />
<ClInclude Include="include\Poco\SharedLibrary_WIN32.h" />
<ClInclude Include="include\Poco\SharedLibrary_WIN32U.h" />
<ClInclude Include="include\Poco\SharedMemory.h" />
<ClInclude Include="include\Poco\SharedMemory_DUMMY.h" />
<ClInclude Include="include\Poco\SharedMemory_POSIX.h" />

View File

@ -222,9 +222,6 @@
<ClCompile Include="src\Environment_WIN32.cpp">
<Filter>Core\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Environment_WIN32U.cpp">
<Filter>Core\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Error.cpp">
<Filter>Core\Source Files</Filter>
</ClCompile>
@ -504,9 +501,6 @@
<ClCompile Include="src\SharedLibrary_WIN32.cpp">
<Filter>SharedLibrary\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SharedLibrary_WIN32U.cpp">
<Filter>SharedLibrary\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\RegularExpression.cpp">
<Filter>RegularExpression\Source Files</Filter>
</ClCompile>
@ -615,9 +609,6 @@
<ClCompile Include="src\LogFile_WIN32.cpp">
<Filter>Logging\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\LogFile_WIN32U.cpp">
<Filter>Logging\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Logger.cpp">
<Filter>Logging\Source Files</Filter>
</ClCompile>
@ -693,9 +684,6 @@
<ClCompile Include="src\DirectoryIterator_WIN32.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DirectoryIterator_WIN32U.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\DirectoryWatcher.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
@ -711,9 +699,6 @@
<ClCompile Include="src\File_WIN32.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\File_WIN32U.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Glob.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
@ -729,9 +714,6 @@
<ClCompile Include="src\Path_WIN32.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Path_WIN32U.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\TemporaryFile.cpp">
<Filter>Filesystem\Source Files</Filter>
</ClCompile>
@ -747,9 +729,6 @@
<ClCompile Include="src\NamedEvent_WIN32.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedEvent_WIN32U.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedMutex.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
@ -762,9 +741,6 @@
<ClCompile Include="src\NamedMutex_WIN32.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\NamedMutex_WIN32U.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Pipe.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
@ -795,9 +771,6 @@
<ClCompile Include="src\Process_WIN32.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\Process_WIN32U.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
<ClCompile Include="src\SharedMemory.cpp">
<Filter>Processes\Source Files</Filter>
</ClCompile>
@ -1007,9 +980,6 @@
<ClInclude Include="include\Poco\Environment_WIN32.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Environment_WIN32U.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Error.h">
<Filter>Core\Header Files</Filter>
</ClInclude>
@ -1400,9 +1370,6 @@
<ClInclude Include="include\Poco\SharedLibrary_WIN32.h">
<Filter>SharedLibrary\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\SharedLibrary_WIN32U.h">
<Filter>SharedLibrary\Header Files</Filter>
</ClInclude>
<ClInclude Include="src\pcre.h">
<Filter>RegularExpression\PCRE Header Files</Filter>
</ClInclude>
@ -1460,9 +1427,6 @@
<ClInclude Include="include\Poco\LogFile_WIN32.h">
<Filter>Logging\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\LogFile_WIN32U.h">
<Filter>Logging\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Logger.h">
<Filter>Logging\Header Files</Filter>
</ClInclude>
@ -1547,9 +1511,6 @@
<ClInclude Include="include\Poco\DirectoryIterator_WIN32.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\DirectoryIterator_WIN32U.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\DirectoryWatcher.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
@ -1565,9 +1526,6 @@
<ClInclude Include="include\Poco\File_WIN32.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\File_WIN32U.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Glob.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
@ -1583,9 +1541,6 @@
<ClInclude Include="include\Poco\Path_WIN32.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Path_WIN32U.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\TemporaryFile.h">
<Filter>Filesystem\Header Files</Filter>
</ClInclude>
@ -1601,9 +1556,6 @@
<ClInclude Include="include\Poco\NamedEvent_WIN32.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedEvent_WIN32U.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedMutex.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
@ -1616,9 +1568,6 @@
<ClInclude Include="include\Poco\NamedMutex_WIN32.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\NamedMutex_WIN32U.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Pipe.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
@ -1649,9 +1598,6 @@
<ClInclude Include="include\Poco\Process_WIN32.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\Process_WIN32U.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>
<ClInclude Include="include\Poco\SharedMemory.h">
<Filter>Processes\Header Files</Filter>
</ClInclude>

View File

@ -18,14 +18,6 @@
#define Foundation_Config_INCLUDED
// Define to enable Windows Unicode (UTF-8) support
// NOTE: As of POCO C++ Libraries release 1.6.0, compiling POCO
// without POCO_WIN32_UTF8 defined on Windows is deprecated.
#ifndef POCO_WIN32_UTF8
#define POCO_WIN32_UTF8
#endif
// NOTE: As of POCO C++ Libraries release 2.0.0, compiling POCO
// without c++11 support is deprecated.

View File

@ -7,7 +7,7 @@
//
// Definition of the DirectoryIteratorImpl class for WIN32.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
@ -38,9 +38,9 @@ public:
const std::string& next();
private:
HANDLE _fh;
WIN32_FIND_DATA _fd;
std::string _current;
HANDLE _fh;
WIN32_FIND_DATAW _fd;
std::string _current;
int _rc;
};

View File

@ -1,73 +0,0 @@
//
// DirectoryIterator_WIN32U.h
//
// Library: Foundation
// Package: Filesystem
// Module: DirectoryIterator
//
// Definition of the DirectoryIteratorImpl class for WIN32.
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_DirectoryIterator_WIN32U_INCLUDED
#define Foundation_DirectoryIterator_WIN32U_INCLUDED
#include "Poco/Foundation.h"
#include "Poco/UnWindows.h"
namespace Poco {
class Foundation_API DirectoryIteratorImpl
{
public:
DirectoryIteratorImpl(const std::string& path);
~DirectoryIteratorImpl();
void duplicate();
void release();
const std::string& get() const;
const std::string& next();
private:
HANDLE _fh;
WIN32_FIND_DATAW _fd;
std::string _current;
int _rc;
};
//
// inlines
//
const std::string& DirectoryIteratorImpl::get() const
{
return _current;
}
inline void DirectoryIteratorImpl::duplicate()
{
++_rc;
}
inline void DirectoryIteratorImpl::release()
{
if (--_rc == 0)
delete this;
}
} // namespace Poco
#endif // Foundation_DirectoryIterator_WIN32U_INCLUDED

View File

@ -7,7 +7,7 @@
//
// Definition of the EnvironmentImpl class for WIN32.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
@ -32,7 +32,7 @@ public:
static std::string getImpl(const std::string& name);
static bool hasImpl(const std::string& name);
static void setImpl(const std::string& name, const std::string& value);
static std::string osNameImpl();
static std::string osNameImpl();
static std::string osDisplayNameImpl();
static std::string osVersionImpl();
static std::string osArchitectureImpl();

View File

@ -1,48 +0,0 @@
//
// Environment_WIN32U.h
//
// Library: Foundation
// Package: Core
// Module: Environment
//
// Definition of the EnvironmentImpl class for WIN32.
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_Environment_WIN32U_INCLUDED
#define Foundation_Environment_WIN32U_INCLUDED
#include "Poco/Foundation.h"
namespace Poco {
class Foundation_API EnvironmentImpl
{
public:
typedef UInt8 NodeId[6]; /// Ethernet address.
static std::string getImpl(const std::string& name);
static bool hasImpl(const std::string& name);
static void setImpl(const std::string& name, const std::string& value);
static std::string osNameImpl();
static std::string osDisplayNameImpl();
static std::string osVersionImpl();
static std::string osArchitectureImpl();
static std::string nodeNameImpl();
static void nodeIdImpl(NodeId& id);
static unsigned processorCountImpl();
};
} // namespace Poco
#endif // Foundation_Environment_WIN32U_INCLUDED

View File

@ -85,11 +85,7 @@ protected:
static int getType(const Message& msg);
static int getCategory(const Message& msg);
void setUpRegistry() const;
#if defined(POCO_WIN32_UTF8)
static std::wstring findLibrary(const wchar_t* name);
#else
static std::string findLibrary(const char* name);
#endif
private:
std::string _name;

View File

@ -23,14 +23,12 @@
#include <vector>
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#if defined(POCO_OS_FAMILY_WINDOWS)
#if defined(_WIN32_WCE)
#include "File_WINCE.h"
#else
#include "Poco/File_WIN32U.h"
#endif
#elif defined(POCO_OS_FAMILY_WINDOWS)
#include "Poco/File_WIN32.h"
#endif
#elif defined(POCO_VXWORKS)
#include "Poco/File_VX.h"
#elif defined(POCO_OS_FAMILY_UNIX)
@ -53,13 +51,12 @@ class Foundation_API File: private FileImpl
/// platform-specific limitations regarding maximum length
/// of the entire path and its components apply.
///
/// On Windows, if compiled with UTF-8 support (POCO_WIN32_UTF8)
/// the implementation tries to work around the rather low
/// 260 characters MAX_PATH limit by adding the "\\?\" prefix if
/// On Windows, the implementation tries to work around the rather
/// low 260 characters MAX_PATH limit by adding the "\\?\" prefix if
/// a path is absolute and exceeds MAX_PATH characters in length.
/// Note that various limitations regarding usage of the "\\?\"
/// Note that various limitations regarding usage of the "\\?\"
/// prefix apply in that case, e.g. the path must
/// not contain relative components ("." and "..") and must not
/// not contain relative components ("." and "..") and must not
/// use the forward slash ("/") as directory separator.
{
public:

View File

@ -43,9 +43,6 @@ class Foundation_API FileIOS: public virtual std::ios
/// was specified.
/// Use an InputLineEndingConverter or OutputLineEndingConverter
/// if you require CR-LF translation.
///
/// On Windows platforms, if POCO_WIN32_UTF8 is #define'd,
/// UTF-8 encoded Unicode paths are correctly handled.
{
public:
FileIOS(std::ios::openmode defaultMode);
@ -85,9 +82,6 @@ class Foundation_API FileInputStream: public FileIOS, public std::istream
/// file is always opened as if the std::ios::binary flag
/// was specified.
/// Use an InputLineEndingConverter if you require CR-LF translation.
///
/// On Windows platforms, if POCO_WIN32_UTF8 is #define'd,
/// UTF-8 encoded Unicode paths are correctly handled.
{
public:
FileInputStream();
@ -116,9 +110,6 @@ class Foundation_API FileOutputStream: public FileIOS, public std::ostream
/// file is always opened as if the std::ios::binary flag
/// was specified.
/// Use an OutputLineEndingConverter if you require CR-LF translation.
///
/// On Windows platforms, if POCO_WIN32_UTF8 is #define'd,
/// UTF-8 encoded Unicode paths are correctly handled.
{
public:
FileOutputStream();
@ -153,9 +144,6 @@ class Foundation_API FileStream: public FileIOS, public std::iostream
/// A seek (seekg() or seekp()) operation will always set the
/// read position and the write position simultaneously to the
/// same value.
///
/// On Windows platforms, if POCO_WIN32_UTF8 is #define'd,
/// UTF-8 encoded Unicode paths are correctly handled.
{
public:
FileStream();

View File

@ -5,9 +5,9 @@
// Package: Filesystem
// Module: File
//
// Definition of the FileImpl class for WIN32.
// Definition of the Unicode FileImpl class for WIN32.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
@ -50,8 +50,8 @@ protected:
void setLastModifiedImpl(const Timestamp& ts);
FileSizeImpl getSizeImpl() const;
void setSizeImpl(FileSizeImpl size);
void setWriteableImpl(bool flag = true);
void setExecutableImpl(bool flag = true);
void setWriteableImpl(bool flag = true);
void setExecutableImpl(bool flag = true);
void copyToImpl(const std::string& path) const;
void renameToImpl(const std::string& path);
void removeImpl();
@ -61,13 +61,17 @@ protected:
FileSizeImpl usableSpaceImpl() const;
FileSizeImpl freeSpaceImpl() const;
static void handleLastErrorImpl(const std::string& path);
static void convertPath(const std::string& utf8Path, std::wstring& utf16Path);
private:
std::string _path;
std::string _path;
std::wstring _upath;
friend class FileHandle;
friend class DirectoryIteratorImpl;
friend class WindowsDirectoryWatcherStrategy;
friend class FileStreamBuf;
friend class LogFileImpl;
};

View File

@ -1,90 +0,0 @@
//
// File_WIN32U.h
//
// Library: Foundation
// Package: Filesystem
// Module: File
//
// Definition of the Unicode FileImpl class for WIN32.
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_File_WIN32U_INCLUDED
#define Foundation_File_WIN32U_INCLUDED
#include "Poco/Foundation.h"
#include "Poco/Timestamp.h"
namespace Poco {
class Foundation_API FileImpl
{
protected:
typedef UInt64 FileSizeImpl;
FileImpl();
FileImpl(const std::string& path);
virtual ~FileImpl();
void swapImpl(FileImpl& file);
void setPathImpl(const std::string& path);
const std::string& getPathImpl() const;
bool existsImpl() const;
bool canReadImpl() const;
bool canWriteImpl() const;
bool canExecuteImpl() const;
bool isFileImpl() const;
bool isDirectoryImpl() const;
bool isLinkImpl() const;
bool isDeviceImpl() const;
bool isHiddenImpl() const;
Timestamp createdImpl() const;
Timestamp getLastModifiedImpl() const;
void setLastModifiedImpl(const Timestamp& ts);
FileSizeImpl getSizeImpl() const;
void setSizeImpl(FileSizeImpl size);
void setWriteableImpl(bool flag = true);
void setExecutableImpl(bool flag = true);
void copyToImpl(const std::string& path) const;
void renameToImpl(const std::string& path);
void removeImpl();
bool createFileImpl();
bool createDirectoryImpl();
FileSizeImpl totalSpaceImpl() const;
FileSizeImpl usableSpaceImpl() const;
FileSizeImpl freeSpaceImpl() const;
static void handleLastErrorImpl(const std::string& path);
static void convertPath(const std::string& utf8Path, std::wstring& utf16Path);
private:
std::string _path;
std::wstring _upath;
friend class FileHandle;
friend class DirectoryIteratorImpl;
friend class WindowsDirectoryWatcherStrategy;
friend class FileStreamBuf;
friend class LogFileImpl;
};
//
// inlines
//
inline const std::string& FileImpl::getPathImpl() const
{
return _path;
}
} // namespace Poco
#endif // Foundation_File_WIN32U_INCLUDED

View File

@ -1,5 +1,5 @@
//
// File_WIN32U.h
// File_WIN32.h
//
// Library: Foundation
// Package: Filesystem

View File

@ -113,20 +113,6 @@
#include "Poco/Alignment.h"
//
// Cleanup inconsistencies
//
#ifdef POCO_OS_FAMILY_WINDOWS
#if defined(POCO_WIN32_UTF8) && defined(POCO_NO_WSTRING)
#error POCO_WIN32_UTF8 and POCO_NO_WSTRING are mutually exclusive.
#endif
#else
#ifdef POCO_WIN32_UTF8
#undef POCO_WIN32_UTF8
#endif
#endif
//
// POCO_JOIN
//

View File

@ -21,9 +21,7 @@
#include "Poco/Foundation.h"
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#include "Poco/LogFile_WIN32U.h"
#elif defined(POCO_OS_FAMILY_WINDOWS)
#if defined(POCO_OS_FAMILY_WINDOWS)
#include "Poco/LogFile_WIN32.h"
#elif defined(POCO_OS_FAMILY_VMS)
#include "Poco/LogFile_VMS.h"

View File

@ -1,54 +0,0 @@
//
// LogFile_WIN32U.h
//
// Library: Foundation
// Package: Logging
// Module: LogFile
//
// Definition of the LogFileImpl class using the Windows file APIs.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_LogFile_WIN32U_INCLUDED
#define Foundation_LogFile_WIN32U_INCLUDED
#include "Poco/Foundation.h"
#include "Poco/Timestamp.h"
#include "Poco/UnWindows.h"
namespace Poco {
class Foundation_API LogFileImpl
/// The implementation of LogFile for Windows.
/// The native filesystem APIs are used for
/// total control over locking behavior.
{
public:
LogFileImpl(const std::string& path);
~LogFileImpl();
void writeImpl(const std::string& text, bool flush);
UInt64 sizeImpl() const;
Timestamp creationDateImpl() const;
const std::string& pathImpl() const;
private:
void createFile();
std::string _path;
HANDLE _hFile;
Timestamp _creationDate;
};
} // namespace Poco
#endif // Foundation_LogFile_WIN32U_INCLUDED

View File

@ -21,9 +21,7 @@
#include "Poco/Foundation.h"
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#include "Poco/NamedEvent_WIN32U.h"
#elif defined(POCO_OS_FAMILY_WINDOWS)
#if defined(POCO_OS_FAMILY_WINDOWS)
#include "Poco/NamedEvent_WIN32.h"
#elif defined(POCO_ANDROID)
#include "Poco/NamedEvent_Android.h"

View File

@ -34,7 +34,8 @@ protected:
void waitImpl();
private:
std::string _name;
std::string _name;
std::wstring _uname;
HANDLE _event;
};

View File

@ -1,46 +0,0 @@
//
// NamedEvent_WIN32U.h
//
// Library: Foundation
// Package: Processes
// Module: NamedEvent
//
// Definition of the NamedEventImpl class for Windows.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_NamedEvent_WIN32U_INCLUDED
#define Foundation_NamedEvent_WIN32U_INCLUDED
#include "Poco/Foundation.h"
#include "Poco/UnWindows.h"
namespace Poco {
class Foundation_API NamedEventImpl
{
protected:
NamedEventImpl(const std::string& name);
~NamedEventImpl();
void setImpl();
void waitImpl();
private:
std::string _name;
std::wstring _uname;
HANDLE _event;
};
} // namespace Poco
#endif // Foundation_NamedEvent_WIN32U_INCLUDED

View File

@ -22,9 +22,7 @@
#include "Poco/ScopedLock.h"
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#include "Poco/NamedMutex_WIN32U.h"
#elif defined(POCO_OS_FAMILY_WINDOWS)
#if defined(POCO_OS_FAMILY_WINDOWS)
#include "Poco/NamedMutex_WIN32.h"
#elif defined(POCO_ANDROID)
#include "Poco/NamedMutex_Android.h"

View File

@ -35,8 +35,9 @@ protected:
void unlockImpl();
private:
std::string _name;
HANDLE _mutex;
std::string _name;
std::wstring _uname;
HANDLE _mutex;
};

View File

@ -1,47 +0,0 @@
//
// NamedMutex_WIN32U.h
//
// Library: Foundation
// Package: Processes
// Module: NamedMutex
//
// Definition of the NamedMutexImpl class for Windows.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_NamedMutex_WIN32U_INCLUDED
#define Foundation_NamedMutex_WIN32U_INCLUDED
#include "Poco/Foundation.h"
#include "Poco/UnWindows.h"
namespace Poco {
class Foundation_API NamedMutexImpl
{
protected:
NamedMutexImpl(const std::string& name);
~NamedMutexImpl();
void lockImpl();
bool tryLockImpl();
void unlockImpl();
private:
std::string _name;
std::wstring _uname;
HANDLE _mutex;
};
} // namespace Poco
#endif // Foundation_NamedMutex_WIN32U_INCLUDED

View File

@ -349,8 +349,7 @@ public:
/// Otherwise false is returned and the path argument remains unchanged.
static std::string transcode(const std::string& path);
/// On Windows, if POCO has been compiled with Windows UTF-8 support
/// (POCO_WIN32_UTF8), this function converts a string (usually containing a path)
/// On Windows, this function converts a string (usually containing a path)
/// encoded in UTF-8 into a string encoded in the current Windows code page.
///
/// This function should be used for every string passed as a file name to

View File

@ -7,7 +7,7 @@
//
// Definition of the PathImpl class for WIN32.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
@ -39,6 +39,11 @@ public:
static std::string systemImpl();
static std::string expandImpl(const std::string& path);
static void listRootsImpl(std::vector<std::string>& roots);
enum
{
MAX_PATH_LEN = 32767
};
};

View File

@ -1,53 +0,0 @@
//
// Path_WIN32U.h
//
// Library: Foundation
// Package: Filesystem
// Module: Path
//
// Definition of the PathImpl class for WIN32.
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_Path_WIN32U_INCLUDED
#define Foundation_Path_WIN32U_INCLUDED
#include "Poco/Foundation.h"
#include <vector>
namespace Poco {
class Foundation_API PathImpl
{
public:
static std::string currentImpl();
static std::string homeImpl();
static std::string configHomeImpl();
static std::string dataHomeImpl();
static std::string cacheHomeImpl();
static std::string tempImpl();
static std::string configImpl();
static std::string nullImpl();
static std::string systemImpl();
static std::string expandImpl(const std::string& path);
static void listRootsImpl(std::vector<std::string>& roots);
enum
{
MAX_PATH_LEN = 32767
};
};
} // namespace Poco
#endif // Foundation_Path_WIN32U_INCLUDED

View File

@ -64,17 +64,6 @@
#endif
// Unicode Support
#if defined(UNICODE) && !defined(POCO_WIN32_UTF8)
#define POCO_WIN32_UTF8
#endif
#if !defined(POCO_WIN32_UTF8)
#pragma message("Compiling POCO on Windows without #define POCO_WIN32_UTF8 is deprecated.")
#endif
// Turn off some annoying warnings
#if defined(_MSC_VER)
#pragma warning(disable:4018) // signed/unsigned comparison

View File

@ -21,14 +21,12 @@
#include "Poco/Foundation.h"
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#if defined(POCO_OS_FAMILY_WINDOWS)
#if defined(_WIN32_WCE)
#include "Process_WINCE.h"
#else
#include "Poco/Process_WIN32U.h"
#endif
#elif defined(POCO_OS_FAMILY_WINDOWS)
#include "Poco/Process_WIN32.h"
#endif
#elif defined(POCO_VXWORKS)
#include "Poco/Process_VX.h"
#elif defined(POCO_OS_FAMILY_UNIX)

View File

@ -45,7 +45,7 @@ public:
private:
HANDLE _hProcess;
UInt32 _pid;
ProcessHandleImpl(const ProcessHandleImpl&);
ProcessHandleImpl& operator = (const ProcessHandleImpl&);
};

View File

@ -1,83 +0,0 @@
//
// Process_WIN32U.h
//
// Library: Foundation
// Package: Processes
// Module: Process
//
// Definition of the ProcessImpl class for WIN32.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_Process_WIN32U_INCLUDED
#define Foundation_Process_WIN32U_INCLUDED
#include "Poco/Foundation.h"
#include "Poco/RefCountedObject.h"
#include <vector>
#include <map>
#include "Poco/UnWindows.h"
namespace Poco {
class Pipe;
class Foundation_API ProcessHandleImpl: public RefCountedObject
{
public:
ProcessHandleImpl(HANDLE _hProcess, UInt32 pid);
~ProcessHandleImpl();
UInt32 id() const;
HANDLE process() const;
int wait() const;
void closeHandle();
private:
HANDLE _hProcess;
UInt32 _pid;
ProcessHandleImpl(const ProcessHandleImpl&);
ProcessHandleImpl& operator = (const ProcessHandleImpl&);
};
class Foundation_API ProcessImpl
{
public:
typedef UInt32 PIDImpl;
typedef std::vector<std::string> ArgsImpl;
typedef std::map<std::string, std::string> EnvImpl;
static PIDImpl idImpl();
static void timesImpl(long& userTime, long& kernelTime);
static ProcessHandleImpl* launchImpl(
const std::string& command,
const ArgsImpl& args,
const std::string& initialDirectory,
Pipe* inPipe,
Pipe* outPipe,
Pipe* errPipe,
const EnvImpl& env);
static void killImpl(ProcessHandleImpl& handle);
static void killImpl(PIDImpl pid);
static bool isRunningImpl(const ProcessHandleImpl& handle);
static bool isRunningImpl(PIDImpl pid);
static void requestTerminationImpl(PIDImpl pid);
static std::string terminationEventName(PIDImpl pid);
};
} // namespace Poco
#endif // Foundation_Process_WIN32U_INCLUDED

View File

@ -27,8 +27,6 @@
#include "Poco/SharedLibrary_VX.h"
#elif defined(POCO_OS_FAMILY_UNIX)
#include "Poco/SharedLibrary_UNIX.h"
#elif defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#include "Poco/SharedLibrary_WIN32U.h"
#elif defined(POCO_OS_FAMILY_WINDOWS)
#include "Poco/SharedLibrary_WIN32.h"
#elif defined(POCO_OS_FAMILY_VMS)

View File

@ -1,51 +0,0 @@
//
// SharedLibrary_WIN32U.h
//
// Library: Foundation
// Package: SharedLibrary
// Module: SharedLibrary
//
// Definition of the SharedLibraryImpl class for Win32.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_SharedLibrary_WIN32U_INCLUDED
#define Foundation_SharedLibrary_WIN32U_INCLUDED
#include "Poco/Foundation.h"
#include "Poco/Mutex.h"
namespace Poco {
class Foundation_API SharedLibraryImpl
{
protected:
SharedLibraryImpl();
~SharedLibraryImpl();
void loadImpl(const std::string& path, int flags);
void unloadImpl();
bool isLoadedImpl() const;
void* findSymbolImpl(const std::string& name);
const std::string& getPathImpl() const;
static std::string prefixImpl();
static std::string suffixImpl();
private:
std::string _path;
void* _handle;
static FastMutex _mutex;
};
} // namespace Poco
#endif // Foundation_SharedLibrary_WIN32U_INCLUDED

View File

@ -13,8 +13,7 @@
// an Unicode variant (e.g., GetUserNameA) and an ASCII variant (GetUserNameW).
// There is also a macro (GetUserName) that's either defined to be the Unicode
// name or the ASCII name, depending on whether the UNICODE macro is #define'd
// or not. POCO always calls the Unicode or ASCII functions directly (depending
// on whether POCO_WIN32_UTF8 is #define'd or not), so the macros are not ignored.
// or not. POCO always calls the Unicode or ASCII functions directly.
//
// These macro definitions are a frequent case of problems and naming conflicts,
// especially for C++ programmers. Say, you define a class with a member function named

View File

@ -19,6 +19,9 @@
#include "Poco/Foundation.h"
#if defined(POCO_OS_FAMILY_WINDOWS) && !defined(POCO_NO_WSTRING)
#include "Poco/UTFString.h"
@ -138,4 +141,7 @@ public:
} // namespace Poco
#endif // POCO_OS_FAMILY_WINDOWS && !POCO_NO_WSTRING
#endif // Foundation_UnicodeConverter_INCLUDED

View File

@ -33,8 +33,7 @@ class Foundation_API WindowsConsoleChannel: public Channel
/// Only the message's text is written, followed
/// by a newline.
///
/// If POCO has been compiled with POCO_WIN32_UTF8,
/// log messages are assumed to be UTF-8 encoded, and
/// Log messages are assumed to be UTF-8 encoded, and
/// are converted to UTF-16 prior to writing them to the
/// console. This is the main difference to the ConsoleChannel
/// class, which cannot handle UTF-8 encoded messages on Windows.
@ -67,8 +66,7 @@ class Foundation_API WindowsColorConsoleChannel: public Channel
/// Only the message's text is written, followed
/// by a newline.
///
/// If POCO has been compiled with POCO_WIN32_UTF8,
/// log messages are assumed to be UTF-8 encoded, and
/// Log messages are assumed to be UTF-8 encoded, and
/// are converted to UTF-16 prior to writing them to the
/// console. This is the main difference to the ConsoleChannel
/// class, which cannot handle UTF-8 encoded messages on Windows.

View File

@ -25,7 +25,7 @@
#include <lib$routines.h>
#include <ssdef.h>
#endif
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if !defined(POCO_NO_WSTRING)
#include "Poco/UnicodeConverter.h"
#endif
@ -75,23 +75,20 @@ void Debugger::message(const std::string& msg)
std::fputs("\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n", stderr);
std::fputs(msg.c_str(), stderr);
std::fputs("\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n", stderr);
#if defined(POCO_OS_FAMILY_WINDOWS)
#if defined(POCO_OS_FAMILY_WINDOWS)
if (isAvailable())
{
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if !defined(POCO_NO_WSTRING)
std::wstring umsg;
UnicodeConverter::toUTF16(msg, umsg);
umsg += '\n';
OutputDebugStringW(umsg.c_str());
#else
OutputDebugStringA(msg.c_str());
OutputDebugStringA("\n");
#endif
#endif // POCO_NO_WSTRING
}
#elif defined(POCO_OS_FAMILY_UNIX)
#elif defined(POCO_OS_FAMILY_VMS)
#endif
#endif
#elif defined(POCO_OS_FAMILY_UNIX)
#elif defined(POCO_OS_FAMILY_VMS)
#endif // POCO_OS_FAMILY_*
#endif // _DEBUG
}

View File

@ -15,9 +15,7 @@
#include "Poco/DirectoryIterator.h"
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#include "DirectoryIterator_WIN32U.cpp"
#elif defined(POCO_OS_FAMILY_WINDOWS)
#if defined(POCO_OS_FAMILY_WINDOWS)
#include "DirectoryIterator_WIN32.cpp"
#elif defined(POCO_OS_FAMILY_UNIX)
#include "DirectoryIterator_UNIX.cpp"

View File

@ -5,7 +5,7 @@
// Package: Filesystem
// Module: DirectoryIterator
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
@ -13,8 +13,14 @@
#include "Poco/DirectoryIterator_WIN32.h"
#if defined(_WIN32_WCE)
#include "Poco/File_WINCE.h"
#else
#include "Poco/File_WIN32.h"
#endif
#include "Poco/Path.h"
#include "Poco/UnicodeConverter.h"
#include <cstring>
namespace Poco {
@ -26,8 +32,10 @@ DirectoryIteratorImpl::DirectoryIteratorImpl(const std::string& path): _fh(INVAL
p.makeDirectory();
std::string findPath = p.toString();
findPath.append("*");
std::wstring uFindPath;
FileImpl::convertPath(findPath, uFindPath);
_fh = FindFirstFile(findPath.c_str(), &_fd);
_fh = FindFirstFileW(uFindPath.c_str(), &_fd);
if (_fh == INVALID_HANDLE_VALUE)
{
if (GetLastError() != ERROR_NO_MORE_FILES)
@ -35,7 +43,7 @@ DirectoryIteratorImpl::DirectoryIteratorImpl(const std::string& path): _fh(INVAL
}
else
{
_current = _fd.cFileName;
UnicodeConverter::toUTF8(_fd.cFileName, _current);
if (_current == "." || _current == "..")
next();
}
@ -53,10 +61,11 @@ const std::string& DirectoryIteratorImpl::next()
{
do
{
if (FindNextFile(_fh, &_fd) != 0)
_current = _fd.cFileName;
else
_current.clear();
_current.clear();
if (FindNextFileW(_fh, &_fd) != 0)
{
UnicodeConverter::toUTF8(_fd.cFileName, _current);
}
}
while (_current == "." || _current == "..");
return _current;

View File

@ -1,75 +0,0 @@
//
// DirectoryIterator_WIN32U.cpp
//
// Library: Foundation
// Package: Filesystem
// Module: DirectoryIterator
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/DirectoryIterator_WIN32U.h"
#if defined(_WIN32_WCE)
#include "Poco/File_WINCE.h"
#else
#include "Poco/File_WIN32U.h"
#endif
#include "Poco/Path.h"
#include "Poco/UnicodeConverter.h"
#include <cstring>
namespace Poco {
DirectoryIteratorImpl::DirectoryIteratorImpl(const std::string& path): _fh(INVALID_HANDLE_VALUE), _rc(1)
{
Path p(path);
p.makeDirectory();
std::string findPath = p.toString();
findPath.append("*");
std::wstring uFindPath;
FileImpl::convertPath(findPath, uFindPath);
_fh = FindFirstFileW(uFindPath.c_str(), &_fd);
if (_fh == INVALID_HANDLE_VALUE)
{
if (GetLastError() != ERROR_NO_MORE_FILES)
File::handleLastError(path);
}
else
{
UnicodeConverter::toUTF8(_fd.cFileName, _current);
if (_current == "." || _current == "..")
next();
}
}
DirectoryIteratorImpl::~DirectoryIteratorImpl()
{
if (_fh != INVALID_HANDLE_VALUE)
FindClose(_fh);
}
const std::string& DirectoryIteratorImpl::next()
{
do
{
_current.clear();
if (FindNextFileW(_fh, &_fd) != 0)
{
UnicodeConverter::toUTF8(_fd.cFileName, _current);
}
}
while (_current == "." || _current == "..");
return _current;
}
} // namespace Poco

View File

@ -193,13 +193,9 @@ public:
filter |= FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_LAST_WRITE;
std::string path(owner().directory().path());
#if defined(POCO_WIN32_UTF8)
std::wstring upath;
FileImpl::convertPath(path.c_str(), upath);
HANDLE hChange = FindFirstChangeNotificationW(upath.c_str(), FALSE, filter);
#else
HANDLE hChange = FindFirstChangeNotificationA(path.c_str(), FALSE, filter);
#endif
if (hChange == INVALID_HANDLE_VALUE)
{

View File

@ -24,15 +24,13 @@
#include "Environment_VX.cpp"
#elif defined(POCO_OS_FAMILY_UNIX)
#include "Environment_UNIX.cpp"
#elif defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#elif defined(POCO_OS_FAMILY_WINDOWS)
#if defined(_WIN32_WCE)
#include "Environment_WINCE.cpp"
#else
#include "Environment_WIN32U.cpp"
#endif
#elif defined(POCO_OS_FAMILY_WINDOWS)
#include "Environment_WIN32.cpp"
#endif
#endif
namespace Poco {

View File

@ -5,7 +5,7 @@
// Package: Core
// Module: Environment
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
@ -14,10 +14,13 @@
#include "Poco/Environment_WIN32.h"
#include "Poco/Exception.h"
#include "Poco/UnicodeConverter.h"
#include "Poco/Buffer.h"
#include <sstream>
#include <cstring>
#include "Poco/UnWindows.h"
#include <winsock2.h>
#include <ws2ipdef.h>
#include <wincrypt.h>
#include <iphlpapi.h>
@ -27,26 +30,34 @@ namespace Poco {
std::string EnvironmentImpl::getImpl(const std::string& name)
{
DWORD len = GetEnvironmentVariableA(name.c_str(), 0, 0);
std::wstring uname;
UnicodeConverter::toUTF16(name, uname);
DWORD len = GetEnvironmentVariableW(uname.c_str(), 0, 0);
if (len == 0) throw NotFoundException(name);
char* buffer = new char[len];
GetEnvironmentVariableA(name.c_str(), buffer, len);
std::string result(buffer);
delete [] buffer;
Buffer<wchar_t> buffer(len);
GetEnvironmentVariableW(uname.c_str(), buffer.begin(), len);
std::string result;
UnicodeConverter::toUTF8(buffer.begin(), len - 1, result);
return result;
}
bool EnvironmentImpl::hasImpl(const std::string& name)
{
DWORD len = GetEnvironmentVariableA(name.c_str(), 0, 0);
std::wstring uname;
UnicodeConverter::toUTF16(name, uname);
DWORD len = GetEnvironmentVariableW(uname.c_str(), 0, 0);
return len > 0;
}
void EnvironmentImpl::setImpl(const std::string& name, const std::string& value)
{
if (SetEnvironmentVariableA(name.c_str(), value.c_str()) == 0)
std::wstring uname;
std::wstring uvalue;
UnicodeConverter::toUTF16(name, uname);
UnicodeConverter::toUTF16(value, uvalue);
if (SetEnvironmentVariableW(uname.c_str(), uvalue.c_str()) == 0)
{
std::string msg = "cannot set environment variable: ";
msg.append(name);
@ -121,12 +132,14 @@ std::string EnvironmentImpl::osDisplayNameImpl()
std::string EnvironmentImpl::osVersionImpl()
{
OSVERSIONINFO vi;
OSVERSIONINFOW vi;
vi.dwOSVersionInfoSize = sizeof(vi);
if (GetVersionEx(&vi) == 0) throw SystemException("Cannot get OS version information");
if (GetVersionExW(&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();
}
@ -164,10 +177,12 @@ std::string EnvironmentImpl::osArchitectureImpl()
std::string EnvironmentImpl::nodeNameImpl()
{
char name[MAX_COMPUTERNAME_LENGTH + 1];
DWORD size = sizeof(name);
if (GetComputerNameA(name, &size) == 0) throw SystemException("Cannot get computer name");
return std::string(name);
wchar_t name[MAX_COMPUTERNAME_LENGTH + 1];
DWORD size = MAX_COMPUTERNAME_LENGTH + 1;
if (GetComputerNameW(name, &size) == 0) throw SystemException("Cannot get computer name");
std::string result;
UnicodeConverter::toUTF8(name, result);
return result;
}

View File

@ -1,235 +0,0 @@
//
// Environment_WIN32U.cpp
//
// Library: Foundation
// Package: Core
// Module: Environment
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Environment_WIN32U.h"
#include "Poco/Exception.h"
#include "Poco/UnicodeConverter.h"
#include "Poco/Buffer.h"
#include <sstream>
#include <cstring>
#include "Poco/UnWindows.h"
#include <winsock2.h>
#include <ws2ipdef.h>
#include <wincrypt.h>
#include <iphlpapi.h>
namespace Poco {
std::string EnvironmentImpl::getImpl(const std::string& name)
{
std::wstring uname;
UnicodeConverter::toUTF16(name, uname);
DWORD len = GetEnvironmentVariableW(uname.c_str(), 0, 0);
if (len == 0) throw NotFoundException(name);
Buffer<wchar_t> buffer(len);
GetEnvironmentVariableW(uname.c_str(), buffer.begin(), len);
std::string result;
UnicodeConverter::toUTF8(buffer.begin(), len - 1, result);
return result;
}
bool EnvironmentImpl::hasImpl(const std::string& name)
{
std::wstring uname;
UnicodeConverter::toUTF16(name, uname);
DWORD len = GetEnvironmentVariableW(uname.c_str(), 0, 0);
return len > 0;
}
void EnvironmentImpl::setImpl(const std::string& name, const std::string& value)
{
std::wstring uname;
std::wstring uvalue;
UnicodeConverter::toUTF16(name, uname);
UnicodeConverter::toUTF16(value, uvalue);
if (SetEnvironmentVariableW(uname.c_str(), uvalue.c_str()) == 0)
{
std::string msg = "cannot set environment variable: ";
msg.append(name);
throw SystemException(msg);
}
}
std::string EnvironmentImpl::osNameImpl()
{
OSVERSIONINFO vi;
vi.dwOSVersionInfoSize = sizeof(vi);
if (GetVersionEx(&vi) == 0) throw SystemException("Cannot get OS version information");
switch (vi.dwPlatformId)
{
case VER_PLATFORM_WIN32s:
return "Windows 3.x";
case VER_PLATFORM_WIN32_WINDOWS:
return vi.dwMinorVersion == 0 ? "Windows 95" : "Windows 98";
case VER_PLATFORM_WIN32_NT:
return "Windows NT";
default:
return "Unknown";
}
}
std::string EnvironmentImpl::osDisplayNameImpl()
{
OSVERSIONINFOEX vi; // OSVERSIONINFOEX is supported starting at Windows 2000
vi.dwOSVersionInfoSize = sizeof(vi);
if (GetVersionEx((OSVERSIONINFO*) &vi) == 0) throw SystemException("Cannot get OS version information");
switch (vi.dwMajorVersion)
{
case 10:
switch (vi.dwMinorVersion)
{
case 0:
return vi.wProductType == VER_NT_WORKSTATION ? "Windows 10" : "Windows Server 2016";
}
case 6:
switch (vi.dwMinorVersion)
{
case 0:
return vi.wProductType == VER_NT_WORKSTATION ? "Windows Vista" : "Windows Server 2008";
case 1:
return vi.wProductType == VER_NT_WORKSTATION ? "Windows 7" : "Windows Server 2008 R2";
case 2:
return vi.wProductType == VER_NT_WORKSTATION ? "Windows 8" : "Windows Server 2012";
case 3:
return vi.wProductType == VER_NT_WORKSTATION ? "Windows 8.1" : "Windows Server 2012 R2";
default:
return "Unknown";
}
case 5:
switch (vi.dwMinorVersion)
{
case 0:
return "Windows 2000";
case 1:
return "Windows XP";
case 2:
return "Windows Server 2003/Windows Server 2003 R2";
default:
return "Unknown";
}
default:
return "Unknown";
}
}
std::string EnvironmentImpl::osVersionImpl()
{
OSVERSIONINFOW vi;
vi.dwOSVersionInfoSize = sizeof(vi);
if (GetVersionExW(&vi) == 0) throw SystemException("Cannot get OS version information");
std::ostringstream str;
str << vi.dwMajorVersion << "." << vi.dwMinorVersion << " (Build " << (vi.dwBuildNumber & 0xFFFF);
std::string version;
UnicodeConverter::toUTF8(vi.szCSDVersion, version);
if (!version.empty()) str << ": " << version;
str << ")";
return str.str();
}
std::string EnvironmentImpl::osArchitectureImpl()
{
SYSTEM_INFO si;
GetSystemInfo(&si);
switch (si.wProcessorArchitecture)
{
case PROCESSOR_ARCHITECTURE_INTEL:
return "IA32";
case PROCESSOR_ARCHITECTURE_MIPS:
return "MIPS";
case PROCESSOR_ARCHITECTURE_ALPHA:
return "ALPHA";
case PROCESSOR_ARCHITECTURE_PPC:
return "PPC";
case PROCESSOR_ARCHITECTURE_IA64:
return "IA64";
#ifdef PROCESSOR_ARCHITECTURE_IA32_ON_WIN64
case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64:
return "IA64/32";
#endif
#ifdef PROCESSOR_ARCHITECTURE_AMD64
case PROCESSOR_ARCHITECTURE_AMD64:
return "AMD64";
#endif
default:
return "Unknown";
}
}
std::string EnvironmentImpl::nodeNameImpl()
{
wchar_t name[MAX_COMPUTERNAME_LENGTH + 1];
DWORD size = MAX_COMPUTERNAME_LENGTH + 1;
if (GetComputerNameW(name, &size) == 0) throw SystemException("Cannot get computer name");
std::string result;
UnicodeConverter::toUTF8(name, result);
return result;
}
void EnvironmentImpl::nodeIdImpl(NodeId& id)
{
std::memset(&id, 0, sizeof(id));
PIP_ADAPTER_INFO pAdapterInfo;
PIP_ADAPTER_INFO pAdapter = 0;
ULONG len = sizeof(IP_ADAPTER_INFO);
pAdapterInfo = reinterpret_cast<IP_ADAPTER_INFO*>(new char[len]);
// Make an initial call to GetAdaptersInfo to get
// the necessary size into len
DWORD rc = GetAdaptersInfo(pAdapterInfo, &len);
if (rc == ERROR_BUFFER_OVERFLOW)
{
delete [] reinterpret_cast<char*>(pAdapterInfo);
pAdapterInfo = reinterpret_cast<IP_ADAPTER_INFO*>(new char[len]);
}
else if (rc != ERROR_SUCCESS)
{
return;
}
if (GetAdaptersInfo(pAdapterInfo, &len) == NO_ERROR)
{
pAdapter = pAdapterInfo;
bool found = false;
while (pAdapter && !found)
{
if (pAdapter->Type == MIB_IF_TYPE_ETHERNET && pAdapter->AddressLength == sizeof(id))
{
found = true;
std::memcpy(&id, pAdapter->Address, pAdapter->AddressLength);
}
pAdapter = pAdapter->Next;
}
}
delete [] reinterpret_cast<char*>(pAdapterInfo);
}
unsigned EnvironmentImpl::processorCountImpl()
{
SYSTEM_INFO si;
GetSystemInfo(&si);
return si.dwNumberOfProcessors;
}
} // namespace Poco

View File

@ -39,14 +39,10 @@ namespace Poco {
{
std::string errMsg;
DWORD dwFlg = FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS;
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if !defined(POCO_NO_WSTRING)
LPWSTR lpMsgBuf = 0;
if (FormatMessageW(dwFlg, 0, errorCode, 0, (LPWSTR) & lpMsgBuf, 0, NULL))
UnicodeConverter::toUTF8(lpMsgBuf, errMsg);
#else
LPTSTR lpMsgBuf = 0;
if (FormatMessageA(dwFlg, 0, errorCode, 0, (LPTSTR) & lpMsgBuf, 0, NULL))
errMsg = lpMsgBuf;
#endif
LocalFree(lpMsgBuf);
return errMsg;

View File

@ -16,7 +16,7 @@
#include "Poco/Message.h"
#include "Poco/String.h"
#include "pocomsg.h"
#if defined(POCO_WIN32_UTF8)
#if !defined(POCO_NO_WSTRING)
#include "Poco/UnicodeConverter.h"
#endif
@ -35,7 +35,6 @@ EventLogChannel::EventLogChannel():
_h(0)
{
const DWORD maxPathLen = MAX_PATH + 1;
#if defined(POCO_WIN32_UTF8)
wchar_t name[maxPathLen];
int n = GetModuleFileNameW(NULL, name, maxPathLen);
if (n > 0)
@ -46,17 +45,6 @@ EventLogChannel::EventLogChannel():
std::wstring uname(end);
UnicodeConverter::toUTF8(uname, _name);
}
#else
char name[maxPathLen];
int n = GetModuleFileNameA(NULL, name, maxPathLen);
if (n > 0)
{
char* end = name + n - 1;
while (end > name && *end != '\\') --end;
if (*end == '\\') ++end;
_name = end;
}
#endif
}
@ -93,15 +81,11 @@ EventLogChannel::~EventLogChannel()
void EventLogChannel::open()
{
setUpRegistry();
#if defined(POCO_WIN32_UTF8)
std::wstring uhost;
UnicodeConverter::toUTF16(_host, uhost);
std::wstring uname;
UnicodeConverter::toUTF16(_name, uname);
_h = RegisterEventSourceW(uhost.empty() ? NULL : uhost.c_str(), uname.c_str());
#else
_h = RegisterEventSource(_host.empty() ? NULL : _host.c_str(), _name.c_str());
#endif
if (!_h) throw SystemException("cannot register event source");
}
@ -116,15 +100,10 @@ void EventLogChannel::close()
void EventLogChannel::log(const Message& msg)
{
if (!_h) open();
#if defined(POCO_WIN32_UTF8)
std::wstring utext;
UnicodeConverter::toUTF16(msg.getText(), utext);
const wchar_t* pMsg = utext.c_str();
ReportEventW(_h, getType(msg), getCategory(msg), POCO_MSG_LOG, NULL, 1, 0, &pMsg, NULL);
#else
const char* pMsg = msg.getText().c_str();
ReportEvent(_h, getType(msg), getCategory(msg), POCO_MSG_LOG, NULL, 1, 0, &pMsg, NULL);
#endif
}
@ -209,18 +188,13 @@ void EventLogChannel::setUpRegistry() const
key.append(_name);
HKEY hKey;
DWORD disp;
#if defined(POCO_WIN32_UTF8)
std::wstring ukey;
UnicodeConverter::toUTF16(key, ukey);
DWORD rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, ukey.c_str(), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &disp);
#else
DWORD rc = RegCreateKeyEx(HKEY_LOCAL_MACHINE, key.c_str(), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &disp);
#endif
if (rc != ERROR_SUCCESS) return;
if (disp == REG_CREATED_NEW_KEY)
{
#if defined(POCO_WIN32_UTF8)
std::wstring path;
#if defined(POCO_DLL)
#if defined(_DEBUG)
@ -240,50 +214,21 @@ void EventLogChannel::setUpRegistry() const
if (path.empty())
path = findLibrary(L"PocoMsg.dll");
#else
std::string path;
#if defined(POCO_DLL)
#if defined(_DEBUG)
#if defined(_WIN64)
path = findLibrary("PocoFoundation64d.dll");
#else
path = findLibrary("PocoFoundationd.dll");
#endif
#else
#if defined(_WIN64)
path = findLibrary("PocoFoundation64.dll");
#else
path = findLibrary("PocoFoundation.dll");
#endif
#endif
#endif
if (path.empty())
path = findLibrary("PocoMsg.dll");
#endif
if (!path.empty())
{
DWORD count = 8;
DWORD types = 7;
#if defined(POCO_WIN32_UTF8)
RegSetValueExW(hKey, L"CategoryMessageFile", 0, REG_SZ, (const BYTE*) path.c_str(), static_cast<DWORD>(sizeof(wchar_t)*(path.size() + 1)));
RegSetValueExW(hKey, L"EventMessageFile", 0, REG_SZ, (const BYTE*) path.c_str(), static_cast<DWORD>(sizeof(wchar_t)*(path.size() + 1)));
RegSetValueExW(hKey, L"CategoryCount", 0, REG_DWORD, (const BYTE*) &count, static_cast<DWORD>(sizeof(count)));
RegSetValueExW(hKey, L"TypesSupported", 0, REG_DWORD, (const BYTE*) &types, static_cast<DWORD>(sizeof(types)));
#else
RegSetValueEx(hKey, "CategoryMessageFile", 0, REG_SZ, (const BYTE*) path.c_str(), static_cast<DWORD>(path.size() + 1));
RegSetValueEx(hKey, "EventMessageFile", 0, REG_SZ, (const BYTE*) path.c_str(), static_cast<DWORD>(path.size() + 1));
RegSetValueEx(hKey, "CategoryCount", 0, REG_DWORD, (const BYTE*) &count, static_cast<DWORD>(sizeof(count)));
RegSetValueEx(hKey, "TypesSupported", 0, REG_DWORD, (const BYTE*) &types, static_cast<DWORD>(sizeof(types)));
#endif
}
}
RegCloseKey(hKey);
}
#if defined(POCO_WIN32_UTF8)
std::wstring EventLogChannel::findLibrary(const wchar_t* name)
{
std::wstring path;
@ -298,22 +243,6 @@ std::wstring EventLogChannel::findLibrary(const wchar_t* name)
}
return path;
}
#else
std::string EventLogChannel::findLibrary(const char* name)
{
std::string path;
HMODULE dll = LoadLibraryA(name);
if (dll)
{
const DWORD maxPathLen = MAX_PATH + 1;
char name[maxPathLen];
int n = GetModuleFileNameA(dll, name, maxPathLen);
if (n > 0) path = name;
FreeLibrary(dll);
}
return path;
}
#endif
} // namespace Poco

View File

@ -17,14 +17,12 @@
#include "Poco/DirectoryIterator.h"
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#if defined(POCO_OS_FAMILY_WINDOWS)
#if defined(_WIN32_WCE)
#include "File_WINCE.cpp"
#else
#include "File_WIN32U.cpp"
#endif
#elif defined(POCO_OS_FAMILY_WINDOWS)
#include "File_WIN32.cpp"
#endif
#elif defined(POCO_VXWORKS)
#include "File_VX.cpp"
#elif defined(POCO_OS_FAMILY_UNIX)

View File

@ -15,7 +15,7 @@
#include "Poco/FileStream.h"
#include "Poco/File.h"
#include "Poco/Exception.h"
#if defined (POCO_WIN32_UTF8)
#if !defined(POCO_NO_WSTRING)
#include "Poco/UnicodeConverter.h"
#endif
@ -63,14 +63,10 @@ void FileStreamBuf::open(const std::string& path, std::ios::openmode mode)
creationDisp = OPEN_ALWAYS;
DWORD flags = FILE_ATTRIBUTE_NORMAL;
#if defined (POCO_WIN32_UTF8)
std::wstring utf16Path;
FileImpl::convertPath(path, utf16Path);
_handle = CreateFileW(utf16Path.c_str(), access, shareMode, NULL, creationDisp, flags, NULL);
#else
_handle = CreateFileA(path.c_str(), access, shareMode, NULL, creationDisp, flags, NULL);
#endif
if (_handle == INVALID_HANDLE_VALUE)
File::handleLastError(_path);

View File

@ -5,7 +5,7 @@
// Package: Filesystem
// Module: File
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
@ -15,6 +15,7 @@
#include "Poco/File_WIN32.h"
#include "Poco/Exception.h"
#include "Poco/String.h"
#include "Poco/UnicodeConverter.h"
#include "Poco/UnWindows.h"
@ -24,9 +25,9 @@ namespace Poco {
class FileHandle
{
public:
FileHandle(const std::string& path, DWORD access, DWORD share, DWORD disp)
FileHandle(const std::string& path, const std::wstring& upath, DWORD access, DWORD share, DWORD disp)
{
_h = CreateFileA(path.c_str(), access, share, 0, disp, 0, 0);
_h = CreateFileW(upath.c_str(), access, share, 0, disp, 0, 0);
if (_h == INVALID_HANDLE_VALUE)
{
FileImpl::handleLastErrorImpl(path);
@ -60,6 +61,7 @@ FileImpl::FileImpl(const std::string& path): _path(path)
{
_path.resize(n - 1);
}
convertPath(_path, _upath);
}
@ -71,6 +73,7 @@ FileImpl::~FileImpl()
void FileImpl::swapImpl(FileImpl& file)
{
std::swap(_path, file._path);
std::swap(_upath, file._upath);
}
@ -82,6 +85,7 @@ void FileImpl::setPathImpl(const std::string& path)
{
_path.resize(n - 1);
}
convertPath(_path, _upath);
}
@ -89,7 +93,7 @@ bool FileImpl::existsImpl() const
{
poco_assert (!_path.empty());
DWORD attr = GetFileAttributes(_path.c_str());
DWORD attr = GetFileAttributesW(_upath.c_str());
if (attr == INVALID_FILE_ATTRIBUTES)
{
switch (GetLastError())
@ -111,7 +115,7 @@ bool FileImpl::canReadImpl() const
{
poco_assert (!_path.empty());
DWORD attr = GetFileAttributes(_path.c_str());
DWORD attr = GetFileAttributesW(_upath.c_str());
if (attr == INVALID_FILE_ATTRIBUTES)
{
switch (GetLastError())
@ -130,7 +134,7 @@ bool FileImpl::canWriteImpl() const
{
poco_assert (!_path.empty());
DWORD attr = GetFileAttributes(_path.c_str());
DWORD attr = GetFileAttributesW(_upath.c_str());
if (attr == INVALID_FILE_ATTRIBUTES)
handleLastErrorImpl(_path);
return (attr & FILE_ATTRIBUTE_READONLY) == 0;
@ -154,7 +158,7 @@ bool FileImpl::isDirectoryImpl() const
{
poco_assert (!_path.empty());
DWORD attr = GetFileAttributes(_path.c_str());
DWORD attr = GetFileAttributesW(_upath.c_str());
if (attr == INVALID_FILE_ATTRIBUTES)
handleLastErrorImpl(_path);
return (attr & FILE_ATTRIBUTE_DIRECTORY) != 0;
@ -187,7 +191,7 @@ bool FileImpl::isHiddenImpl() const
{
poco_assert (!_path.empty());
DWORD attr = GetFileAttributes(_path.c_str());
DWORD attr = GetFileAttributesW(_upath.c_str());
if (attr == INVALID_FILE_ATTRIBUTES)
handleLastErrorImpl(_path);
return (attr & FILE_ATTRIBUTE_HIDDEN) != 0;
@ -199,7 +203,7 @@ Timestamp FileImpl::createdImpl() const
poco_assert (!_path.empty());
WIN32_FILE_ATTRIBUTE_DATA fad;
if (GetFileAttributesEx(_path.c_str(), GetFileExInfoStandard, &fad) == 0)
if (GetFileAttributesExW(_upath.c_str(), GetFileExInfoStandard, &fad) == 0)
handleLastErrorImpl(_path);
return Timestamp::fromFileTimeNP(fad.ftCreationTime.dwLowDateTime, fad.ftCreationTime.dwHighDateTime);
}
@ -210,7 +214,7 @@ Timestamp FileImpl::getLastModifiedImpl() const
poco_assert (!_path.empty());
WIN32_FILE_ATTRIBUTE_DATA fad;
if (GetFileAttributesEx(_path.c_str(), GetFileExInfoStandard, &fad) == 0)
if (GetFileAttributesExW(_upath.c_str(), GetFileExInfoStandard, &fad) == 0)
handleLastErrorImpl(_path);
return Timestamp::fromFileTimeNP(fad.ftLastWriteTime.dwLowDateTime, fad.ftLastWriteTime.dwHighDateTime);
}
@ -226,7 +230,7 @@ void FileImpl::setLastModifiedImpl(const Timestamp& ts)
FILETIME ft;
ft.dwLowDateTime = low;
ft.dwHighDateTime = high;
FileHandle fh(_path, FILE_WRITE_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING);
FileHandle fh(_path, _upath, FILE_WRITE_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING);
if (SetFileTime(fh.get(), 0, &ft, &ft) == 0)
handleLastErrorImpl(_path);
}
@ -237,7 +241,7 @@ FileImpl::FileSizeImpl FileImpl::getSizeImpl() const
poco_assert (!_path.empty());
WIN32_FILE_ATTRIBUTE_DATA fad;
if (GetFileAttributesEx(_path.c_str(), GetFileExInfoStandard, &fad) == 0)
if (GetFileAttributesExW(_upath.c_str(), GetFileExInfoStandard, &fad) == 0)
handleLastErrorImpl(_path);
LARGE_INTEGER li;
li.LowPart = fad.nFileSizeLow;
@ -250,7 +254,7 @@ void FileImpl::setSizeImpl(FileSizeImpl size)
{
poco_assert (!_path.empty());
FileHandle fh(_path, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING);
FileHandle fh(_path, _upath, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING);
LARGE_INTEGER li;
li.QuadPart = size;
if (SetFilePointer(fh.get(), li.LowPart, &li.HighPart, FILE_BEGIN) == INVALID_SET_FILE_POINTER)
@ -264,14 +268,14 @@ void FileImpl::setWriteableImpl(bool flag)
{
poco_assert (!_path.empty());
DWORD attr = GetFileAttributes(_path.c_str());
DWORD attr = GetFileAttributesW(_upath.c_str());
if (attr == -1)
handleLastErrorImpl(_path);
if (flag)
attr &= ~FILE_ATTRIBUTE_READONLY;
else
attr |= FILE_ATTRIBUTE_READONLY;
if (SetFileAttributes(_path.c_str(), attr) == 0)
if (SetFileAttributesW(_upath.c_str(), attr) == 0)
handleLastErrorImpl(_path);
}
@ -286,7 +290,9 @@ void FileImpl::copyToImpl(const std::string& path) const
{
poco_assert (!_path.empty());
if (CopyFileA(_path.c_str(), path.c_str(), FALSE) == 0)
std::wstring upath;
convertPath(path, upath);
if (CopyFileW(_upath.c_str(), upath.c_str(), FALSE) == 0)
handleLastErrorImpl(_path);
}
@ -295,7 +301,9 @@ void FileImpl::renameToImpl(const std::string& path)
{
poco_assert (!_path.empty());
if (MoveFileExA(_path.c_str(), path.c_str(), MOVEFILE_REPLACE_EXISTING) == 0)
std::wstring upath;
convertPath(path, upath);
if (MoveFileExW(_upath.c_str(), upath.c_str(), MOVEFILE_REPLACE_EXISTING) == 0)
handleLastErrorImpl(_path);
}
@ -306,12 +314,12 @@ void FileImpl::removeImpl()
if (isDirectoryImpl())
{
if (RemoveDirectoryA(_path.c_str()) == 0)
if (RemoveDirectoryW(_upath.c_str()) == 0)
handleLastErrorImpl(_path);
}
else
{
if (DeleteFileA(_path.c_str()) == 0)
if (DeleteFileW(_upath.c_str()) == 0)
handleLastErrorImpl(_path);
}
}
@ -321,7 +329,7 @@ bool FileImpl::createFileImpl()
{
poco_assert (!_path.empty());
HANDLE hFile = CreateFileA(_path.c_str(), GENERIC_WRITE, 0, 0, CREATE_NEW, 0, 0);
HANDLE hFile = CreateFileW(_upath.c_str(), GENERIC_WRITE, 0, 0, CREATE_NEW, 0, 0);
if (hFile != INVALID_HANDLE_VALUE)
{
CloseHandle(hFile);
@ -341,7 +349,7 @@ bool FileImpl::createDirectoryImpl()
if (existsImpl() && isDirectoryImpl())
return false;
if (CreateDirectoryA(_path.c_str(), 0) == 0)
if (CreateDirectoryW(_upath.c_str(), 0) == 0)
handleLastErrorImpl(_path);
return true;
}
@ -352,7 +360,7 @@ FileImpl::FileSizeImpl FileImpl::totalSpaceImpl() const
poco_assert(!_path.empty());
ULARGE_INTEGER space;
if (!GetDiskFreeSpaceEx(_path.c_str(), NULL, &space, NULL))
if (!GetDiskFreeSpaceExW(_upath.c_str(), NULL, &space, NULL))
handleLastErrorImpl(_path);
return space.QuadPart;
}
@ -363,7 +371,7 @@ FileImpl::FileSizeImpl FileImpl::usableSpaceImpl() const
poco_assert(!_path.empty());
ULARGE_INTEGER space;
if (!GetDiskFreeSpaceEx(_path.c_str(), &space, NULL, NULL))
if (!GetDiskFreeSpaceExW(_upath.c_str(), &space, NULL, NULL))
handleLastErrorImpl(_path);
return space.QuadPart;
}
@ -374,7 +382,7 @@ FileImpl::FileSizeImpl FileImpl::freeSpaceImpl() const
poco_assert(!_path.empty());
ULARGE_INTEGER space;
if (!GetDiskFreeSpaceEx(_path.c_str(), NULL, NULL, &space))
if (!GetDiskFreeSpaceExW(_upath.c_str(), NULL, NULL, &space))
handleLastErrorImpl(_path);
return space.QuadPart;
}
@ -429,4 +437,22 @@ void FileImpl::handleLastErrorImpl(const std::string& path)
}
void FileImpl::convertPath(const std::string& utf8Path, std::wstring& utf16Path)
{
UnicodeConverter::toUTF16(utf8Path, utf16Path);
if (utf16Path.size() >= MAX_PATH - 12) // Note: CreateDirectory has a limit of MAX_PATH - 12 (room for 8.3 file name)
{
if (utf16Path[0] == '\\' || utf16Path[1] == ':')
{
if (utf16Path.compare(0, 4, L"\\\\?\\", 4) != 0)
{
if (utf16Path[1] == '\\')
utf16Path.insert(0, L"\\\\?\\UNC\\", 8);
else
utf16Path.insert(0, L"\\\\?\\", 4);
}
}
}
}
} // namespace Poco

View File

@ -1,458 +0,0 @@
//
// File_WIN32U.cpp
//
// Library: Foundation
// Package: Filesystem
// Module: File
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/File_WIN32U.h"
#include "Poco/Exception.h"
#include "Poco/String.h"
#include "Poco/UnicodeConverter.h"
#include "Poco/UnWindows.h"
namespace Poco {
class FileHandle
{
public:
FileHandle(const std::string& path, const std::wstring& upath, DWORD access, DWORD share, DWORD disp)
{
_h = CreateFileW(upath.c_str(), access, share, 0, disp, 0, 0);
if (_h == INVALID_HANDLE_VALUE)
{
FileImpl::handleLastErrorImpl(path);
}
}
~FileHandle()
{
if (_h != INVALID_HANDLE_VALUE) CloseHandle(_h);
}
HANDLE get() const
{
return _h;
}
private:
HANDLE _h;
};
FileImpl::FileImpl()
{
}
FileImpl::FileImpl(const std::string& path): _path(path)
{
std::string::size_type n = _path.size();
if (n > 1 && (_path[n - 1] == '\\' || _path[n - 1] == '/') && !((n == 3 && _path[1]==':')))
{
_path.resize(n - 1);
}
convertPath(_path, _upath);
}
FileImpl::~FileImpl()
{
}
void FileImpl::swapImpl(FileImpl& file)
{
std::swap(_path, file._path);
std::swap(_upath, file._upath);
}
void FileImpl::setPathImpl(const std::string& path)
{
_path = path;
std::string::size_type n = _path.size();
if (n > 1 && (_path[n - 1] == '\\' || _path[n - 1] == '/') && !((n == 3 && _path[1]==':')))
{
_path.resize(n - 1);
}
convertPath(_path, _upath);
}
bool FileImpl::existsImpl() const
{
poco_assert (!_path.empty());
DWORD attr = GetFileAttributesW(_upath.c_str());
if (attr == INVALID_FILE_ATTRIBUTES)
{
switch (GetLastError())
{
case ERROR_FILE_NOT_FOUND:
case ERROR_PATH_NOT_FOUND:
case ERROR_NOT_READY:
case ERROR_INVALID_DRIVE:
return false;
default:
handleLastErrorImpl(_path);
}
}
return true;
}
bool FileImpl::canReadImpl() const
{
poco_assert (!_path.empty());
DWORD attr = GetFileAttributesW(_upath.c_str());
if (attr == INVALID_FILE_ATTRIBUTES)
{
switch (GetLastError())
{
case ERROR_ACCESS_DENIED:
return false;
default:
handleLastErrorImpl(_path);
}
}
return true;
}
bool FileImpl::canWriteImpl() const
{
poco_assert (!_path.empty());
DWORD attr = GetFileAttributesW(_upath.c_str());
if (attr == INVALID_FILE_ATTRIBUTES)
handleLastErrorImpl(_path);
return (attr & FILE_ATTRIBUTE_READONLY) == 0;
}
bool FileImpl::canExecuteImpl() const
{
Path p(_path);
return icompare(p.getExtension(), "exe") == 0;
}
bool FileImpl::isFileImpl() const
{
return !isDirectoryImpl() && !isDeviceImpl();
}
bool FileImpl::isDirectoryImpl() const
{
poco_assert (!_path.empty());
DWORD attr = GetFileAttributesW(_upath.c_str());
if (attr == INVALID_FILE_ATTRIBUTES)
handleLastErrorImpl(_path);
return (attr & FILE_ATTRIBUTE_DIRECTORY) != 0;
}
bool FileImpl::isLinkImpl() const
{
return false;
}
bool FileImpl::isDeviceImpl() const
{
return
_path.compare(0, 4, "\\\\.\\") == 0 ||
icompare(_path, "CON") == 0 ||
icompare(_path, "PRN") == 0 ||
icompare(_path, "AUX") == 0 ||
icompare(_path, "NUL") == 0 ||
( (icompare(_path, 0, 3, "LPT") == 0 || icompare(_path, 0, 3, "COM") == 0) &&
_path.size() == 4 &&
_path[3] > 0x30 &&
isdigit(_path[3])
);
}
bool FileImpl::isHiddenImpl() const
{
poco_assert (!_path.empty());
DWORD attr = GetFileAttributesW(_upath.c_str());
if (attr == INVALID_FILE_ATTRIBUTES)
handleLastErrorImpl(_path);
return (attr & FILE_ATTRIBUTE_HIDDEN) != 0;
}
Timestamp FileImpl::createdImpl() const
{
poco_assert (!_path.empty());
WIN32_FILE_ATTRIBUTE_DATA fad;
if (GetFileAttributesExW(_upath.c_str(), GetFileExInfoStandard, &fad) == 0)
handleLastErrorImpl(_path);
return Timestamp::fromFileTimeNP(fad.ftCreationTime.dwLowDateTime, fad.ftCreationTime.dwHighDateTime);
}
Timestamp FileImpl::getLastModifiedImpl() const
{
poco_assert (!_path.empty());
WIN32_FILE_ATTRIBUTE_DATA fad;
if (GetFileAttributesExW(_upath.c_str(), GetFileExInfoStandard, &fad) == 0)
handleLastErrorImpl(_path);
return Timestamp::fromFileTimeNP(fad.ftLastWriteTime.dwLowDateTime, fad.ftLastWriteTime.dwHighDateTime);
}
void FileImpl::setLastModifiedImpl(const Timestamp& ts)
{
poco_assert (!_path.empty());
UInt32 low;
UInt32 high;
ts.toFileTimeNP(low, high);
FILETIME ft;
ft.dwLowDateTime = low;
ft.dwHighDateTime = high;
FileHandle fh(_path, _upath, FILE_WRITE_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING);
if (SetFileTime(fh.get(), 0, &ft, &ft) == 0)
handleLastErrorImpl(_path);
}
FileImpl::FileSizeImpl FileImpl::getSizeImpl() const
{
poco_assert (!_path.empty());
WIN32_FILE_ATTRIBUTE_DATA fad;
if (GetFileAttributesExW(_upath.c_str(), GetFileExInfoStandard, &fad) == 0)
handleLastErrorImpl(_path);
LARGE_INTEGER li;
li.LowPart = fad.nFileSizeLow;
li.HighPart = fad.nFileSizeHigh;
return li.QuadPart;
}
void FileImpl::setSizeImpl(FileSizeImpl size)
{
poco_assert (!_path.empty());
FileHandle fh(_path, _upath, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, OPEN_EXISTING);
LARGE_INTEGER li;
li.QuadPart = size;
if (SetFilePointer(fh.get(), li.LowPart, &li.HighPart, FILE_BEGIN) == INVALID_SET_FILE_POINTER)
handleLastErrorImpl(_path);
if (SetEndOfFile(fh.get()) == 0)
handleLastErrorImpl(_path);
}
void FileImpl::setWriteableImpl(bool flag)
{
poco_assert (!_path.empty());
DWORD attr = GetFileAttributesW(_upath.c_str());
if (attr == -1)
handleLastErrorImpl(_path);
if (flag)
attr &= ~FILE_ATTRIBUTE_READONLY;
else
attr |= FILE_ATTRIBUTE_READONLY;
if (SetFileAttributesW(_upath.c_str(), attr) == 0)
handleLastErrorImpl(_path);
}
void FileImpl::setExecutableImpl(bool flag)
{
// not supported
}
void FileImpl::copyToImpl(const std::string& path) const
{
poco_assert (!_path.empty());
std::wstring upath;
convertPath(path, upath);
if (CopyFileW(_upath.c_str(), upath.c_str(), FALSE) == 0)
handleLastErrorImpl(_path);
}
void FileImpl::renameToImpl(const std::string& path)
{
poco_assert (!_path.empty());
std::wstring upath;
convertPath(path, upath);
if (MoveFileExW(_upath.c_str(), upath.c_str(), MOVEFILE_REPLACE_EXISTING) == 0)
handleLastErrorImpl(_path);
}
void FileImpl::removeImpl()
{
poco_assert (!_path.empty());
if (isDirectoryImpl())
{
if (RemoveDirectoryW(_upath.c_str()) == 0)
handleLastErrorImpl(_path);
}
else
{
if (DeleteFileW(_upath.c_str()) == 0)
handleLastErrorImpl(_path);
}
}
bool FileImpl::createFileImpl()
{
poco_assert (!_path.empty());
HANDLE hFile = CreateFileW(_upath.c_str(), GENERIC_WRITE, 0, 0, CREATE_NEW, 0, 0);
if (hFile != INVALID_HANDLE_VALUE)
{
CloseHandle(hFile);
return true;
}
else if (GetLastError() == ERROR_FILE_EXISTS)
return false;
else
handleLastErrorImpl(_path);
return false;
}
bool FileImpl::createDirectoryImpl()
{
poco_assert (!_path.empty());
if (existsImpl() && isDirectoryImpl())
return false;
if (CreateDirectoryW(_upath.c_str(), 0) == 0)
handleLastErrorImpl(_path);
return true;
}
FileImpl::FileSizeImpl FileImpl::totalSpaceImpl() const
{
poco_assert(!_path.empty());
ULARGE_INTEGER space;
if (!GetDiskFreeSpaceExW(_upath.c_str(), NULL, &space, NULL))
handleLastErrorImpl(_path);
return space.QuadPart;
}
FileImpl::FileSizeImpl FileImpl::usableSpaceImpl() const
{
poco_assert(!_path.empty());
ULARGE_INTEGER space;
if (!GetDiskFreeSpaceExW(_upath.c_str(), &space, NULL, NULL))
handleLastErrorImpl(_path);
return space.QuadPart;
}
FileImpl::FileSizeImpl FileImpl::freeSpaceImpl() const
{
poco_assert(!_path.empty());
ULARGE_INTEGER space;
if (!GetDiskFreeSpaceExW(_upath.c_str(), NULL, NULL, &space))
handleLastErrorImpl(_path);
return space.QuadPart;
}
void FileImpl::handleLastErrorImpl(const std::string& path)
{
DWORD err = GetLastError();
switch (err)
{
case ERROR_FILE_NOT_FOUND:
throw FileNotFoundException(path, err);
case ERROR_PATH_NOT_FOUND:
case ERROR_BAD_NETPATH:
case ERROR_CANT_RESOLVE_FILENAME:
case ERROR_INVALID_DRIVE:
throw PathNotFoundException(path, err);
case ERROR_ACCESS_DENIED:
throw FileAccessDeniedException(path, err);
case ERROR_ALREADY_EXISTS:
case ERROR_FILE_EXISTS:
throw FileExistsException(path, err);
case ERROR_INVALID_NAME:
case ERROR_DIRECTORY:
case ERROR_FILENAME_EXCED_RANGE:
case ERROR_BAD_PATHNAME:
throw PathSyntaxException(path, err);
case ERROR_FILE_READ_ONLY:
throw FileReadOnlyException(path, err);
case ERROR_CANNOT_MAKE:
throw CreateFileException(path, err);
case ERROR_DIR_NOT_EMPTY:
throw DirectoryNotEmptyException(path, err);
case ERROR_WRITE_FAULT:
throw WriteFileException(path, err);
case ERROR_READ_FAULT:
throw ReadFileException(path, err);
case ERROR_SHARING_VIOLATION:
throw FileException("sharing violation", path, err);
case ERROR_LOCK_VIOLATION:
throw FileException("lock violation", path, err);
case ERROR_HANDLE_EOF:
throw ReadFileException("EOF reached", path, err);
case ERROR_HANDLE_DISK_FULL:
case ERROR_DISK_FULL:
throw WriteFileException("disk is full", path, err);
case ERROR_NEGATIVE_SEEK:
throw FileException("negative seek", path, err);
default:
throw FileException(path, err);
}
}
void FileImpl::convertPath(const std::string& utf8Path, std::wstring& utf16Path)
{
UnicodeConverter::toUTF16(utf8Path, utf16Path);
if (utf16Path.size() >= MAX_PATH - 12) // Note: CreateDirectory has a limit of MAX_PATH - 12 (room for 8.3 file name)
{
if (utf16Path[0] == '\\' || utf16Path[1] == ':')
{
if (utf16Path.compare(0, 4, L"\\\\?\\", 4) != 0)
{
if (utf16Path[1] == '\\')
utf16Path.insert(0, L"\\\\?\\UNC\\", 8);
else
utf16Path.insert(0, L"\\\\?\\", 4);
}
}
}
}
} // namespace Poco

View File

@ -1,5 +1,5 @@
//
// File_WIN32U.cpp
// File_WIN32.cpp
//
// Library: Foundation
// Package: Filesystem

View File

@ -15,9 +15,7 @@
#include "Poco/LogFile.h"
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#include "LogFile_WIN32U.cpp"
#elif defined(POCO_OS_FAMILY_WINDOWS)
#if defined(POCO_OS_FAMILY_WINDOWS)
#include "LogFile_WIN32.cpp"
#elif defined(POCO_OS_FAMILY_VMS)
#include "LogFile_VMS.cpp"

View File

@ -15,6 +15,7 @@
#include "Poco/LogFile_WIN32.h"
#include "Poco/File.h"
#include "Poco/Exception.h"
#include "Poco/UnicodeConverter.h"
namespace Poco {
@ -86,7 +87,10 @@ const std::string& LogFileImpl::pathImpl() const
void LogFileImpl::createFile()
{
_hFile = CreateFileA(_path.c_str(), GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
std::wstring upath;
FileImpl::convertPath(_path, upath);
_hFile = CreateFileW(upath.c_str(), GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (_hFile == INVALID_HANDLE_VALUE) throw OpenFileException(_path);
SetFilePointer(_hFile, 0, 0, FILE_END);
// There seems to be a strange "optimization" in the Windows NTFS
@ -108,4 +112,5 @@ void LogFileImpl::createFile()
_creationDate = File(_path).created();
}
} // namespace Poco

View File

@ -1,116 +0,0 @@
//
// LogFile_WIN32U.cpp
//
// Library: Foundation
// Package: Logging
// Module: LogFile
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/LogFile_WIN32U.h"
#include "Poco/File.h"
#include "Poco/Exception.h"
#include "Poco/UnicodeConverter.h"
namespace Poco {
LogFileImpl::LogFileImpl(const std::string& path): _path(path), _hFile(INVALID_HANDLE_VALUE)
{
File file(path);
if (file.exists())
{
if (0 == sizeImpl())
_creationDate = file.getLastModified();
else
_creationDate = file.created();
}
}
LogFileImpl::~LogFileImpl()
{
CloseHandle(_hFile);
}
void LogFileImpl::writeImpl(const std::string& text, bool flush)
{
if (INVALID_HANDLE_VALUE == _hFile) createFile();
DWORD bytesWritten;
BOOL res = WriteFile(_hFile, text.data(), (DWORD) text.size(), &bytesWritten, NULL);
if (!res) throw WriteFileException(_path);
res = WriteFile(_hFile, "\r\n", 2, &bytesWritten, NULL);
if (!res) throw WriteFileException(_path);
if (flush)
{
res = FlushFileBuffers(_hFile);
if (!res) throw WriteFileException(_path);
}
}
UInt64 LogFileImpl::sizeImpl() const
{
if (INVALID_HANDLE_VALUE == _hFile)
{
File file(_path);
if (file.exists()) return file.getSize();
else return 0;
}
LARGE_INTEGER li;
li.HighPart = 0;
li.LowPart = SetFilePointer(_hFile, 0, &li.HighPart, FILE_CURRENT);
return li.QuadPart;
}
Timestamp LogFileImpl::creationDateImpl() const
{
return _creationDate;
}
const std::string& LogFileImpl::pathImpl() const
{
return _path;
}
void LogFileImpl::createFile()
{
std::wstring upath;
FileImpl::convertPath(_path, upath);
_hFile = CreateFileW(upath.c_str(), GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (_hFile == INVALID_HANDLE_VALUE) throw OpenFileException(_path);
SetFilePointer(_hFile, 0, 0, FILE_END);
// There seems to be a strange "optimization" in the Windows NTFS
// filesystem that causes it to reuse directory entries of deleted
// files. Example:
// 1. create a file named "test.dat"
// note the file's creation date
// 2. delete the file "test.dat"
// 3. wait a few seconds
// 4. create a file named "test.dat"
// the new file will have the same creation
// date as the old one.
// We work around this bug by taking the file's
// modification date as a reference when the
// file is empty.
if (sizeImpl() == 0)
_creationDate = File(_path).getLastModified();
else
_creationDate = File(_path).created();
}
} // namespace Poco

View File

@ -15,9 +15,7 @@
#include "Poco/NamedEvent.h"
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#include "NamedEvent_WIN32U.cpp"
#elif defined(POCO_OS_FAMILY_WINDOWS)
#if defined(POCO_OS_FAMILY_WINDOWS)
#include "NamedEvent_WIN32.cpp"
#elif defined(POCO_ANDROID)
#include "NamedEvent_Android.cpp"

View File

@ -16,6 +16,7 @@
#include "Poco/Error.h"
#include "Poco/Exception.h"
#include "Poco/Format.h"
#include "Poco/UnicodeConverter.h"
namespace Poco {
@ -24,10 +25,11 @@ namespace Poco {
NamedEventImpl::NamedEventImpl(const std::string& name):
_name(name)
{
_event = CreateEventA(NULL, FALSE, FALSE, _name.c_str());
UnicodeConverter::toUTF16(_name, _uname);
_event = CreateEventW(NULL, FALSE, FALSE, _uname.c_str());
if (!_event)
{
DWORD dwRetVal = GetLastError();
DWORD dwRetVal = GetLastError();
throw SystemException(format("cannot create named event %s [Error %d: %s]", _name, (int)dwRetVal, Error::getMessage(dwRetVal)));
}
}

View File

@ -1,63 +0,0 @@
//
// NamedEvent_WIN32.cpp
//
// Library: Foundation
// Package: Processes
// Module: NamedEvent
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/NamedEvent_WIN32U.h"
#include "Poco/Error.h"
#include "Poco/Exception.h"
#include "Poco/Format.h"
#include "Poco/UnicodeConverter.h"
namespace Poco {
NamedEventImpl::NamedEventImpl(const std::string& name):
_name(name)
{
UnicodeConverter::toUTF16(_name, _uname);
_event = CreateEventW(NULL, FALSE, FALSE, _uname.c_str());
if (!_event)
{
DWORD dwRetVal = GetLastError();
throw SystemException(format("cannot create named event %s [Error %d: %s]", _name, (int)dwRetVal, Error::getMessage(dwRetVal)));
}
}
NamedEventImpl::~NamedEventImpl()
{
CloseHandle(_event);
}
void NamedEventImpl::setImpl()
{
if (!SetEvent(_event))
throw SystemException("cannot signal named event", _name);
}
void NamedEventImpl::waitImpl()
{
switch (WaitForSingleObject(_event, INFINITE))
{
case WAIT_OBJECT_0:
return;
default:
throw SystemException("wait for named event failed", _name);
}
}
} // namespace Poco

View File

@ -15,9 +15,7 @@
#include "Poco/NamedMutex.h"
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#include "NamedMutex_WIN32U.cpp"
#elif defined(POCO_OS_FAMILY_WINDOWS)
#if defined(POCO_OS_FAMILY_WINDOWS)
#include "NamedMutex_WIN32.cpp"
#elif defined(POCO_ANDROID)
#include "NamedMutex_Android.cpp"

View File

@ -14,6 +14,7 @@
#include "Poco/NamedMutex_WIN32.h"
#include "Poco/Exception.h"
#include "Poco/UnicodeConverter.h"
namespace Poco {
@ -22,7 +23,8 @@ namespace Poco {
NamedMutexImpl::NamedMutexImpl(const std::string& name):
_name(name)
{
_mutex = CreateMutexA(NULL, FALSE, _name.c_str());
UnicodeConverter::toUTF16(_name, _uname);
_mutex = CreateMutexW(NULL, FALSE, _uname.c_str());
if (!_mutex)
throw SystemException("cannot create named mutex", _name);
}

View File

@ -1,75 +0,0 @@
//
// NamedMutex_WIN32.cpp
//
// Library: Foundation
// Package: Processes
// Module: NamedMutex
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/NamedMutex_WIN32U.h"
#include "Poco/Exception.h"
#include "Poco/UnicodeConverter.h"
namespace Poco {
NamedMutexImpl::NamedMutexImpl(const std::string& name):
_name(name)
{
UnicodeConverter::toUTF16(_name, _uname);
_mutex = CreateMutexW(NULL, FALSE, _uname.c_str());
if (!_mutex)
throw SystemException("cannot create named mutex", _name);
}
NamedMutexImpl::~NamedMutexImpl()
{
CloseHandle(_mutex);
}
void NamedMutexImpl::lockImpl()
{
switch (WaitForSingleObject(_mutex, INFINITE))
{
case WAIT_OBJECT_0:
return;
case WAIT_ABANDONED:
throw SystemException("cannot lock named mutex (abadoned)", _name);
default:
throw SystemException("cannot lock named mutex", _name);
}
}
bool NamedMutexImpl::tryLockImpl()
{
switch (WaitForSingleObject(_mutex, 0))
{
case WAIT_OBJECT_0:
return true;
case WAIT_TIMEOUT:
return false;
case WAIT_ABANDONED:
throw SystemException("cannot lock named mutex (abadoned)", _name);
default:
throw SystemException("cannot lock named mutex", _name);
}
}
void NamedMutexImpl::unlockImpl()
{
ReleaseMutex(_mutex);
}
} // namespace Poco

View File

@ -16,10 +16,8 @@
#include "Poco/File.h"
#include "Poco/Exception.h"
#include "Poco/StringTokenizer.h"
#if defined(_WIN32) && defined(POCO_WIN32_UTF8)
#include "Poco/UnicodeConverter.h"
#include "Poco/Buffer.h"
#endif
#include <algorithm>
@ -27,15 +25,13 @@
#include "Path_VMS.cpp"
#elif defined(POCO_OS_FAMILY_UNIX)
#include "Path_UNIX.cpp"
#elif defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#elif defined(POCO_OS_FAMILY_WINDOWS)
#if defined(_WIN32_WCE)
#include "Path_WINCE.cpp"
#else
#include "Path_WIN32U.cpp"
#endif
#elif defined(POCO_OS_FAMILY_WINDOWS)
#include "Path_WIN32.cpp"
#endif
#endif
namespace Poco {
@ -1072,7 +1068,7 @@ std::string Path::buildVMS() const
std::string Path::transcode(const std::string& path)
{
#if defined(_WIN32) && defined(POCO_WIN32_UTF8)
#if defined(_WIN32)
std::wstring uniPath;
UnicodeConverter::toUTF16(path, uniPath);
DWORD len = WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS, uniPath.c_str(), static_cast<int>(uniPath.length()), NULL, 0, NULL, NULL);

View File

@ -5,7 +5,7 @@
// Package: Filesystem
// Module: Path
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
@ -14,6 +14,9 @@
#include "Poco/Path_WIN32.h"
#include "Poco/Environment_WIN32.h"
#include "Poco/UnicodeConverter.h"
#include "Poco/Buffer.h"
#include "Poco/Exception.h"
#include "Poco/UnWindows.h"
@ -22,31 +25,38 @@ namespace Poco {
std::string PathImpl::currentImpl()
{
char buffer[MAX_PATH];
DWORD n = GetCurrentDirectoryA(sizeof(buffer), buffer);
if (n > 0 && n < sizeof(buffer))
std::string result;
DWORD len = GetCurrentDirectoryW(0, NULL);
if (len > 0)
{
std::string result(buffer, n);
if (result[n - 1] != '\\')
result.append("\\");
return result;
Buffer<wchar_t> buffer(len);
DWORD n = GetCurrentDirectoryW(len, buffer.begin());
if (n > 0 && n <= len)
{
UnicodeConverter::toUTF8(buffer.begin(), result);
if (result[result.size() - 1] != '\\')
result.append("\\");
return result;
}
}
else throw SystemException("Cannot get current directory");
throw SystemException("Cannot get current directory");
}
std::string PathImpl::systemImpl()
{
char buffer[MAX_PATH];
DWORD n = GetSystemDirectoryA(buffer, sizeof(buffer));
if (n > 0 && n < sizeof(buffer))
Buffer<wchar_t> buffer(MAX_PATH_LEN);
DWORD n = GetSystemDirectoryW(buffer.begin(), static_cast<DWORD>(buffer.size()));
if (n > 0)
{
std::string result(buffer, n);
if (result[n - 1] != '\\')
result.append("\\");
n = GetLongPathNameW(buffer.begin(), buffer.begin(), static_cast<DWORD>(buffer.size()));
if (n <= 0) throw SystemException("Cannot get system directory long path name");
std::string result;
UnicodeConverter::toUTF8(buffer.begin(), result);
if (result[result.size() - 1] != '\\') result.append("\\");
return result;
}
else throw SystemException("Cannot get system directory");
throw SystemException("Cannot get temporary directory path");
}
@ -78,7 +88,7 @@ std::string PathImpl::configHomeImpl()
{
std::string result;
// if APPDATA environment variable not exist, return home directory instead
// if APPDATA environment variable no exist, return home directory instead
try
{
result = EnvironmentImpl::getImpl("APPDATA");
@ -99,7 +109,7 @@ std::string PathImpl::dataHomeImpl()
{
std::string result;
// if LOCALAPPDATA environment variable not exist, return config home instead
// if LOCALAPPDATA environment variable no exist, return config home instead
try
{
result = EnvironmentImpl::getImpl("LOCALAPPDATA");
@ -124,18 +134,19 @@ std::string PathImpl::cacheHomeImpl()
std::string PathImpl::tempImpl()
{
char buffer[MAX_PATH];
DWORD n = GetTempPathA(sizeof(buffer), buffer);
if (n > 0 && n < sizeof(buffer))
Buffer<wchar_t> buffer(MAX_PATH_LEN);
DWORD n = GetTempPathW(static_cast<DWORD>(buffer.size()), buffer.begin());
if (n > 0)
{
n = GetLongPathNameA(buffer, buffer, static_cast<DWORD>(sizeof buffer));
n = GetLongPathNameW(buffer.begin(), buffer.begin(), static_cast<DWORD>(buffer.size()));
if (n <= 0) throw SystemException("Cannot get temporary directory long path name");
std::string result(buffer, n);
if (result[n - 1] != '\\')
std::string result;
UnicodeConverter::toUTF8(buffer.begin(), result);
if (result[result.size() - 1] != '\\')
result.append("\\");
return result;
}
else throw SystemException("Cannot get temporary directory");
throw SystemException("Cannot get temporary directory path");
}
@ -168,26 +179,35 @@ std::string PathImpl::nullImpl()
std::string PathImpl::expandImpl(const std::string& path)
{
char buffer[MAX_PATH];
DWORD n = ExpandEnvironmentStringsA(path.c_str(), buffer, sizeof(buffer));
if (n > 0 && n < sizeof(buffer))
return std::string(buffer, n - 1);
else
return path;
std::wstring upath;
UnicodeConverter::toUTF16(path, upath);
Buffer<wchar_t> buffer(MAX_PATH_LEN);
DWORD n = ExpandEnvironmentStringsW(upath.c_str(), buffer.begin(), static_cast<DWORD>(buffer.size()));
if (n > 0 && n < buffer.size() - 1)
{
buffer[n + 1] = 0;
std::string result;
UnicodeConverter::toUTF8(buffer.begin(), result);
return result;
}
else return path;
}
void PathImpl::listRootsImpl(std::vector<std::string>& roots)
{
roots.clear();
char buffer[128];
DWORD n = GetLogicalDriveStrings(sizeof(buffer) - 1, buffer);
char* it = buffer;
char* end = buffer + (n > sizeof(buffer) ? sizeof(buffer) : n);
const int bufferSize = 128;
wchar_t buffer[bufferSize];
DWORD n = GetLogicalDriveStringsW(bufferSize - 1, buffer);
wchar_t* it = buffer;
wchar_t* end = buffer + (n > bufferSize ? bufferSize : n);
while (it < end)
{
std::wstring udev;
while (it < end && *it) udev += *it++;
std::string dev;
while (it < end && *it) dev += *it++;
UnicodeConverter::toUTF8(udev, dev);
roots.push_back(dev);
++it;
}

View File

@ -1,217 +0,0 @@
//
// Path_WIN32U.cpp
//
// Library: Foundation
// Package: Filesystem
// Module: Path
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Path_WIN32U.h"
#include "Poco/Environment_WIN32.h"
#include "Poco/UnicodeConverter.h"
#include "Poco/Buffer.h"
#include "Poco/Exception.h"
#include "Poco/UnWindows.h"
namespace Poco {
std::string PathImpl::currentImpl()
{
std::string result;
DWORD len = GetCurrentDirectoryW(0, NULL);
if (len > 0)
{
Buffer<wchar_t> buffer(len);
DWORD n = GetCurrentDirectoryW(len, buffer.begin());
if (n > 0 && n <= len)
{
UnicodeConverter::toUTF8(buffer.begin(), result);
if (result[result.size() - 1] != '\\')
result.append("\\");
return result;
}
}
throw SystemException("Cannot get current directory");
}
std::string PathImpl::systemImpl()
{
Buffer<wchar_t> buffer(MAX_PATH_LEN);
DWORD n = GetSystemDirectoryW(buffer.begin(), static_cast<DWORD>(buffer.size()));
if (n > 0)
{
n = GetLongPathNameW(buffer.begin(), buffer.begin(), static_cast<DWORD>(buffer.size()));
if (n <= 0) throw SystemException("Cannot get system directory long path name");
std::string result;
UnicodeConverter::toUTF8(buffer.begin(), result);
if (result[result.size() - 1] != '\\') result.append("\\");
return result;
}
throw SystemException("Cannot get temporary directory path");
}
std::string PathImpl::homeImpl()
{
std::string result;
if (EnvironmentImpl::hasImpl("USERPROFILE"))
{
result = EnvironmentImpl::getImpl("USERPROFILE");
}
else if (EnvironmentImpl::hasImpl("HOMEDRIVE") && EnvironmentImpl::hasImpl("HOMEPATH"))
{
result = EnvironmentImpl::getImpl("HOMEDRIVE");
result.append(EnvironmentImpl::getImpl("HOMEPATH"));
}
else
{
result = systemImpl();
}
std::string::size_type n = result.size();
if (n > 0 && result[n - 1] != '\\')
result.append("\\");
return result;
}
std::string PathImpl::configHomeImpl()
{
std::string result;
// if APPDATA environment variable no exist, return home directory instead
try
{
result = EnvironmentImpl::getImpl("APPDATA");
}
catch (NotFoundException&)
{
result = homeImpl();
}
std::string::size_type n = result.size();
if (n > 0 && result[n - 1] != '\\')
result.append("\\");
return result;
}
std::string PathImpl::dataHomeImpl()
{
std::string result;
// if LOCALAPPDATA environment variable no exist, return config home instead
try
{
result = EnvironmentImpl::getImpl("LOCALAPPDATA");
}
catch (NotFoundException&)
{
result = configHomeImpl();
}
std::string::size_type n = result.size();
if (n > 0 && result[n - 1] != '\\')
result.append("\\");
return result;
}
std::string PathImpl::cacheHomeImpl()
{
return tempImpl();
}
std::string PathImpl::tempImpl()
{
Buffer<wchar_t> buffer(MAX_PATH_LEN);
DWORD n = GetTempPathW(static_cast<DWORD>(buffer.size()), buffer.begin());
if (n > 0)
{
n = GetLongPathNameW(buffer.begin(), buffer.begin(), static_cast<DWORD>(buffer.size()));
if (n <= 0) throw SystemException("Cannot get temporary directory long path name");
std::string result;
UnicodeConverter::toUTF8(buffer.begin(), result);
if (result[result.size() - 1] != '\\')
result.append("\\");
return result;
}
throw SystemException("Cannot get temporary directory path");
}
std::string PathImpl::configImpl()
{
std::string result;
// if PROGRAMDATA environment variable not exist, return system directory instead
try
{
result = EnvironmentImpl::getImpl("PROGRAMDATA");
}
catch (NotFoundException&)
{
result = systemImpl();
}
std::string::size_type n = result.size();
if (n > 0 && result[n - 1] != '\\')
result.append("\\");
return result;
}
std::string PathImpl::nullImpl()
{
return "NUL:";
}
std::string PathImpl::expandImpl(const std::string& path)
{
std::wstring upath;
UnicodeConverter::toUTF16(path, upath);
Buffer<wchar_t> buffer(MAX_PATH_LEN);
DWORD n = ExpandEnvironmentStringsW(upath.c_str(), buffer.begin(), static_cast<DWORD>(buffer.size()));
if (n > 0 && n < buffer.size() - 1)
{
buffer[n + 1] = 0;
std::string result;
UnicodeConverter::toUTF8(buffer.begin(), result);
return result;
}
else return path;
}
void PathImpl::listRootsImpl(std::vector<std::string>& roots)
{
roots.clear();
const int bufferSize = 128;
wchar_t buffer[bufferSize];
DWORD n = GetLogicalDriveStringsW(bufferSize - 1, buffer);
wchar_t* it = buffer;
wchar_t* end = buffer + (n > bufferSize ? bufferSize : n);
while (it < end)
{
std::wstring udev;
while (it < end && *it) udev += *it++;
std::string dev;
UnicodeConverter::toUTF8(udev, dev);
roots.push_back(dev);
++it;
}
}
} // namespace Poco

View File

@ -1,5 +1,5 @@
//
// Path_WIN32U.cpp
// Path_WIN32.cpp
//
// Library: Foundation
// Package: Filesystem

View File

@ -57,14 +57,12 @@ namespace
}
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#if defined(POCO_OS_FAMILY_WINDOWS)
#if defined(_WIN32_WCE)
#include "Process_WINCE.cpp"
#else
#include "Process_WIN32U.cpp"
#endif
#elif defined(POCO_OS_FAMILY_WINDOWS)
#include "Process_WIN32.cpp"
#endif
#elif defined(POCO_VXWORKS)
#include "Process_VX.cpp"
#elif defined(POCO_OS_FAMILY_UNIX)

View File

@ -16,7 +16,11 @@
#include "Poco/Exception.h"
#include "Poco/NumberFormatter.h"
#include "Poco/NamedEvent.h"
#include "Poco/UnicodeConverter.h"
#include "Poco/Pipe.h"
#include "Poco/File.h"
#include "Poco/Path.h"
#include "Poco/String.h"
namespace Poco {
@ -151,7 +155,7 @@ static std::string escapeArg(const std::string& arg)
}
quotedArg.push_back('"');
return quotedArg;
}
}
else
{
return arg;
@ -168,9 +172,25 @@ ProcessHandleImpl* ProcessImpl::launchImpl(const std::string& command, const Arg
commandLine.append(escapeArg(*it));
}
STARTUPINFOA startupInfo;
GetStartupInfoA(&startupInfo); // take defaults from current process
startupInfo.cb = sizeof(STARTUPINFOA);
std::wstring ucommandLine;
UnicodeConverter::toUTF16(commandLine, ucommandLine);
const wchar_t* applicationName = 0;
std::wstring uapplicationName;
if (command.size() > MAX_PATH)
{
Poco::Path p(command);
if (p.isAbsolute())
{
UnicodeConverter::toUTF16(command, uapplicationName);
if (p.getExtension().empty()) uapplicationName += L".EXE";
applicationName = uapplicationName.c_str();
}
}
STARTUPINFOW startupInfo;
GetStartupInfoW(&startupInfo); // take defaults from current process
startupInfo.cb = sizeof(STARTUPINFOW);
startupInfo.lpReserved = NULL;
startupInfo.lpDesktop = NULL;
startupInfo.lpTitle = NULL;
@ -185,12 +205,12 @@ ProcessHandleImpl* ProcessImpl::launchImpl(const std::string& command, const Arg
DuplicateHandle(hProc, inPipe->readHandle(), hProc, &startupInfo.hStdInput, 0, TRUE, DUPLICATE_SAME_ACCESS);
mustInheritHandles = true;
inPipe->close(Pipe::CLOSE_READ);
}
}
else if (GetStdHandle(STD_INPUT_HANDLE))
{
DuplicateHandle(hProc, GetStdHandle(STD_INPUT_HANDLE), hProc, &startupInfo.hStdInput, 0, TRUE, DUPLICATE_SAME_ACCESS);
mustInheritHandles = true;
}
}
else
{
startupInfo.hStdInput = 0;
@ -232,7 +252,9 @@ ProcessHandleImpl* ProcessImpl::launchImpl(const std::string& command, const Arg
startupInfo.dwFlags |= STARTF_USESTDHANDLES;
}
const char* workingDirectory = initialDirectory.empty() ? 0 : initialDirectory.c_str();
std::wstring uinitialDirectory;
UnicodeConverter::toUTF16(initialDirectory, uinitialDirectory);
const wchar_t* workingDirectory = uinitialDirectory.empty() ? 0 : uinitialDirectory.c_str();
const char* pEnv = 0;
std::vector<char> envChars;
@ -244,9 +266,9 @@ ProcessHandleImpl* ProcessImpl::launchImpl(const std::string& command, const Arg
PROCESS_INFORMATION processInfo;
DWORD creationFlags = GetConsoleWindow() ? 0 : CREATE_NO_WINDOW;
BOOL rc = CreateProcessA(
NULL,
const_cast<char*>(commandLine.c_str()),
BOOL rc = CreateProcessW(
applicationName,
const_cast<wchar_t*>(ucommandLine.c_str()),
NULL, // processAttributes
NULL, // threadAttributes
mustInheritHandles,

View File

@ -1,369 +0,0 @@
//
// Process_WIN32U.cpp
//
// Library: Foundation
// Package: Processes
// Module: Process
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Process_WIN32U.h"
#include "Poco/Exception.h"
#include "Poco/NumberFormatter.h"
#include "Poco/NamedEvent.h"
#include "Poco/UnicodeConverter.h"
#include "Poco/Pipe.h"
#include "Poco/File.h"
#include "Poco/Path.h"
#include "Poco/String.h"
namespace Poco {
//
// ProcessHandleImpl
//
ProcessHandleImpl::ProcessHandleImpl(HANDLE hProcess, UInt32 pid) :
_hProcess(hProcess),
_pid(pid)
{
}
ProcessHandleImpl::~ProcessHandleImpl()
{
closeHandle();
}
void ProcessHandleImpl::closeHandle()
{
if (_hProcess)
{
CloseHandle(_hProcess);
_hProcess = NULL;
}
}
UInt32 ProcessHandleImpl::id() const
{
return _pid;
}
HANDLE ProcessHandleImpl::process() const
{
return _hProcess;
}
int ProcessHandleImpl::wait() const
{
DWORD rc = WaitForSingleObject(_hProcess, INFINITE);
if (rc != WAIT_OBJECT_0)
throw SystemException("Wait failed for process", NumberFormatter::format(_pid));
DWORD exitCode;
if (GetExitCodeProcess(_hProcess, &exitCode) == 0)
throw SystemException("Cannot get exit code for process", NumberFormatter::format(_pid));
return exitCode;
}
//
// ProcessImpl
//
ProcessImpl::PIDImpl ProcessImpl::idImpl()
{
return GetCurrentProcessId();
}
void ProcessImpl::timesImpl(long& userTime, long& kernelTime)
{
FILETIME ftCreation;
FILETIME ftExit;
FILETIME ftKernel;
FILETIME ftUser;
if (GetProcessTimes(GetCurrentProcess(), &ftCreation, &ftExit, &ftKernel, &ftUser) != 0)
{
ULARGE_INTEGER time;
time.LowPart = ftKernel.dwLowDateTime;
time.HighPart = ftKernel.dwHighDateTime;
kernelTime = long(time.QuadPart / 10000000L);
time.LowPart = ftUser.dwLowDateTime;
time.HighPart = ftUser.dwHighDateTime;
userTime = long(time.QuadPart / 10000000L);
}
else
{
userTime = kernelTime = -1;
}
}
static bool argNeedsEscaping(const std::string& arg)
{
bool containsQuotableChar = std::string::npos != arg.find_first_of(" \t\n\v\"");
// Assume args that start and end with quotes are already quoted and do not require further quoting.
// There is probably code out there written before launch() escaped the arguments that does its own
// escaping of arguments. This ensures we do not interfere with those arguments.
bool isAlreadyQuoted = arg.size() > 1 && '\"' == arg[0] && '\"' == arg[arg.size() - 1];
return containsQuotableChar && !isAlreadyQuoted;
}
// Based on code from https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
static std::string escapeArg(const std::string& arg)
{
if (argNeedsEscaping(arg))
{
std::string quotedArg("\"");
for (std::string::const_iterator it = arg.begin(); ; ++it)
{
unsigned backslashCount = 0;
while (it != arg.end() && '\\' == *it)
{
++it;
++backslashCount;
}
if (it == arg.end())
{
quotedArg.append(2 * backslashCount, '\\');
break;
}
else if ('"' == *it)
{
quotedArg.append(2 * backslashCount + 1, '\\');
quotedArg.push_back('"');
}
else
{
quotedArg.append(backslashCount, '\\');
quotedArg.push_back(*it);
}
}
quotedArg.push_back('"');
return quotedArg;
}
else
{
return arg;
}
}
ProcessHandleImpl* ProcessImpl::launchImpl(const std::string& command, const ArgsImpl& args, const std::string& initialDirectory, Pipe* inPipe, Pipe* outPipe, Pipe* errPipe, const EnvImpl& env)
{
std::string commandLine = escapeArg(command);
for (ArgsImpl::const_iterator it = args.begin(); it != args.end(); ++it)
{
commandLine.append(" ");
commandLine.append(escapeArg(*it));
}
std::wstring ucommandLine;
UnicodeConverter::toUTF16(commandLine, ucommandLine);
const wchar_t* applicationName = 0;
std::wstring uapplicationName;
if (command.size() > MAX_PATH)
{
Poco::Path p(command);
if (p.isAbsolute())
{
UnicodeConverter::toUTF16(command, uapplicationName);
if (p.getExtension().empty()) uapplicationName += L".EXE";
applicationName = uapplicationName.c_str();
}
}
STARTUPINFOW startupInfo;
GetStartupInfoW(&startupInfo); // take defaults from current process
startupInfo.cb = sizeof(STARTUPINFOW);
startupInfo.lpReserved = NULL;
startupInfo.lpDesktop = NULL;
startupInfo.lpTitle = NULL;
startupInfo.dwFlags = STARTF_FORCEOFFFEEDBACK;
startupInfo.cbReserved2 = 0;
startupInfo.lpReserved2 = NULL;
HANDLE hProc = GetCurrentProcess();
bool mustInheritHandles = false;
if (inPipe)
{
DuplicateHandle(hProc, inPipe->readHandle(), hProc, &startupInfo.hStdInput, 0, TRUE, DUPLICATE_SAME_ACCESS);
mustInheritHandles = true;
inPipe->close(Pipe::CLOSE_READ);
}
else if (GetStdHandle(STD_INPUT_HANDLE))
{
DuplicateHandle(hProc, GetStdHandle(STD_INPUT_HANDLE), hProc, &startupInfo.hStdInput, 0, TRUE, DUPLICATE_SAME_ACCESS);
mustInheritHandles = true;
}
else
{
startupInfo.hStdInput = 0;
}
// outPipe may be the same as errPipe, so we duplicate first and close later.
if (outPipe)
{
DuplicateHandle(hProc, outPipe->writeHandle(), hProc, &startupInfo.hStdOutput, 0, TRUE, DUPLICATE_SAME_ACCESS);
mustInheritHandles = true;
}
else if (GetStdHandle(STD_OUTPUT_HANDLE))
{
DuplicateHandle(hProc, GetStdHandle(STD_OUTPUT_HANDLE), hProc, &startupInfo.hStdOutput, 0, TRUE, DUPLICATE_SAME_ACCESS);
mustInheritHandles = true;
}
else
{
startupInfo.hStdOutput = 0;
}
if (errPipe)
{
DuplicateHandle(hProc, errPipe->writeHandle(), hProc, &startupInfo.hStdError, 0, TRUE, DUPLICATE_SAME_ACCESS);
mustInheritHandles = true;
}
else if (GetStdHandle(STD_ERROR_HANDLE))
{
DuplicateHandle(hProc, GetStdHandle(STD_ERROR_HANDLE), hProc, &startupInfo.hStdError, 0, TRUE, DUPLICATE_SAME_ACCESS);
mustInheritHandles = true;
}
else
{
startupInfo.hStdError = 0;
}
if (outPipe) outPipe->close(Pipe::CLOSE_WRITE);
if (errPipe) errPipe->close(Pipe::CLOSE_WRITE);
if (mustInheritHandles)
{
startupInfo.dwFlags |= STARTF_USESTDHANDLES;
}
std::wstring uinitialDirectory;
UnicodeConverter::toUTF16(initialDirectory, uinitialDirectory);
const wchar_t* workingDirectory = uinitialDirectory.empty() ? 0 : uinitialDirectory.c_str();
const char* pEnv = 0;
std::vector<char> envChars;
if (!env.empty())
{
envChars = getEnvironmentVariablesBuffer(env);
pEnv = &envChars[0];
}
PROCESS_INFORMATION processInfo;
DWORD creationFlags = GetConsoleWindow() ? 0 : CREATE_NO_WINDOW;
BOOL rc = CreateProcessW(
applicationName,
const_cast<wchar_t*>(ucommandLine.c_str()),
NULL, // processAttributes
NULL, // threadAttributes
mustInheritHandles,
creationFlags,
(LPVOID)pEnv,
workingDirectory,
&startupInfo,
&processInfo
);
if (startupInfo.hStdInput) CloseHandle(startupInfo.hStdInput);
if (startupInfo.hStdOutput) CloseHandle(startupInfo.hStdOutput);
if (startupInfo.hStdError) CloseHandle(startupInfo.hStdError);
if (rc)
{
CloseHandle(processInfo.hThread);
return new ProcessHandleImpl(processInfo.hProcess, processInfo.dwProcessId);
}
else throw SystemException("Cannot launch process", command);
}
void ProcessImpl::killImpl(ProcessHandleImpl& handle)
{
if (handle.process())
{
if (TerminateProcess(handle.process(), 0) == 0)
{
handle.closeHandle();
throw SystemException("cannot kill process");
}
handle.closeHandle();
}
}
void ProcessImpl::killImpl(PIDImpl pid)
{
HANDLE hProc = OpenProcess(PROCESS_TERMINATE, FALSE, pid);
if (hProc)
{
if (TerminateProcess(hProc, 0) == 0)
{
CloseHandle(hProc);
throw SystemException("cannot kill process");
}
CloseHandle(hProc);
}
else
{
switch (GetLastError())
{
case ERROR_ACCESS_DENIED:
throw NoPermissionException("cannot kill process");
case ERROR_INVALID_PARAMETER:
throw NotFoundException("cannot kill process");
default:
throw SystemException("cannot kill process");
}
}
}
bool ProcessImpl::isRunningImpl(const ProcessHandleImpl& handle)
{
bool result = true;
DWORD exitCode;
BOOL rc = GetExitCodeProcess(handle.process(), &exitCode);
if (!rc || exitCode != STILL_ACTIVE) result = false;
return result;
}
bool ProcessImpl::isRunningImpl(PIDImpl pid)
{
HANDLE hProc = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
bool result = true;
DWORD exitCode;
BOOL rc = GetExitCodeProcess(hProc, &exitCode);
if (!rc || exitCode != STILL_ACTIVE) result = false;
return result;
}
void ProcessImpl::requestTerminationImpl(PIDImpl pid)
{
NamedEvent ev(terminationEventName(pid));
ev.set();
}
std::string ProcessImpl::terminationEventName(PIDImpl pid)
{
std::string evName("POCOTRM");
NumberFormatter::appendHex(evName, pid, 8);
return evName;
}
} // namespace Poco

View File

@ -22,8 +22,6 @@
#include "SharedLibrary_VX.cpp"
#elif defined(POCO_OS_FAMILY_UNIX)
#include "SharedLibrary_UNIX.cpp"
#elif defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#include "SharedLibrary_WIN32U.cpp"
#elif defined(POCO_OS_FAMILY_WINDOWS)
#include "SharedLibrary_WIN32.cpp"
#elif defined(POCO_OS_FAMILY_VMS)

View File

@ -13,6 +13,7 @@
#include "Poco/SharedLibrary_WIN32.h"
#include "Poco/UnicodeConverter.h"
#include "Poco/Path.h"
#include "Poco/UnWindows.h"
@ -40,9 +41,13 @@ void SharedLibraryImpl::loadImpl(const std::string& path, int /*flags*/)
if (_handle) throw LibraryAlreadyLoadedException(_path);
DWORD flags(0);
#if !defined(_WIN32_WCE)
Path p(path);
if (p.isAbsolute()) flags |= LOAD_WITH_ALTERED_SEARCH_PATH;
_handle = LoadLibraryExA(path.c_str(), 0, flags);
#endif
std::wstring upath;
UnicodeConverter::toUTF16(path, upath);
_handle = LoadLibraryExW(upath.c_str(), 0, flags);
if (!_handle) throw LibraryLoadException(path);
_path = path;
}
@ -73,7 +78,13 @@ void* SharedLibraryImpl::findSymbolImpl(const std::string& name)
if (_handle)
{
#if defined(_WIN32_WCE)
std::wstring uname;
UnicodeConverter::toUTF16(name, uname);
return (void*) GetProcAddressW((HMODULE) _handle, uname.c_str());
#else
return (void*) GetProcAddress((HMODULE) _handle, name.c_str());
#endif
}
else return 0;
}

View File

@ -1,115 +0,0 @@
//
// SharedLibrary_WIN32U.cpp
//
// Library: Foundation
// Package: SharedLibrary
// Module: SharedLibrary
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/SharedLibrary_WIN32U.h"
#include "Poco/UnicodeConverter.h"
#include "Poco/Path.h"
#include "Poco/UnWindows.h"
namespace Poco {
FastMutex SharedLibraryImpl::_mutex;
SharedLibraryImpl::SharedLibraryImpl()
{
_handle = 0;
}
SharedLibraryImpl::~SharedLibraryImpl()
{
}
void SharedLibraryImpl::loadImpl(const std::string& path, int /*flags*/)
{
FastMutex::ScopedLock lock(_mutex);
if (_handle) throw LibraryAlreadyLoadedException(_path);
DWORD flags(0);
#if !defined(_WIN32_WCE)
Path p(path);
if (p.isAbsolute()) flags |= LOAD_WITH_ALTERED_SEARCH_PATH;
#endif
std::wstring upath;
UnicodeConverter::toUTF16(path, upath);
_handle = LoadLibraryExW(upath.c_str(), 0, flags);
if (!_handle) throw LibraryLoadException(path);
_path = path;
}
void SharedLibraryImpl::unloadImpl()
{
FastMutex::ScopedLock lock(_mutex);
if (_handle)
{
FreeLibrary((HMODULE) _handle);
_handle = 0;
}
_path.clear();
}
bool SharedLibraryImpl::isLoadedImpl() const
{
return _handle != 0;
}
void* SharedLibraryImpl::findSymbolImpl(const std::string& name)
{
FastMutex::ScopedLock lock(_mutex);
if (_handle)
{
#if defined(_WIN32_WCE)
std::wstring uname;
UnicodeConverter::toUTF16(name, uname);
return (void*) GetProcAddressW((HMODULE) _handle, uname.c_str());
#else
return (void*) GetProcAddress((HMODULE) _handle, name.c_str());
#endif
}
else return 0;
}
const std::string& SharedLibraryImpl::getPathImpl() const
{
return _path;
}
std::string SharedLibraryImpl::prefixImpl()
{
return "";
}
std::string SharedLibraryImpl::suffixImpl()
{
#if defined(_DEBUG) && !defined(POCO_NO_SHARED_LIBRARY_DEBUG_SUFFIX)
return "d.dll";
#else
return ".dll";
#endif
}
} // namespace Poco

View File

@ -17,9 +17,7 @@
#include "Poco/Exception.h"
#include "Poco/File.h"
#include "Poco/Format.h"
#if defined (POCO_WIN32_UTF8)
#include "Poco/UnicodeConverter.h"
#endif
#include "Poco/UnWindows.h"
@ -37,13 +35,9 @@ SharedMemoryImpl::SharedMemoryImpl(const std::string& name, std::size_t size, Sh
if (mode == SharedMemory::AM_WRITE)
_mode = PAGE_READWRITE;
#if defined (POCO_WIN32_UTF8)
std::wstring utf16name;
UnicodeConverter::toUTF16(_name, utf16name);
_memHandle = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL, _mode, 0, _size, utf16name.c_str());
#else
_memHandle = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, _mode, 0, _size, _name.c_str());
#endif
if (!_memHandle)
{
@ -54,11 +48,8 @@ SharedMemoryImpl::SharedMemoryImpl(const std::string& name, std::size_t size, Sh
if (_mode != PAGE_READONLY || dwRetVal != 5)
throw SystemException(format("Cannot create shared memory object %s [Error %d: %s]", _name, static_cast<int>(dwRetVal), Error::getMessage(dwRetVal)));
#if defined (POCO_WIN32_UTF8)
_memHandle = OpenFileMappingW(PAGE_READONLY, FALSE, utf16name.c_str());
#else
_memHandle = OpenFileMappingA(PAGE_READONLY, FALSE, _name.c_str());
#endif
if (!_memHandle)
{
dwRetVal = GetLastError();
@ -92,13 +83,9 @@ SharedMemoryImpl::SharedMemoryImpl(const Poco::File& file, SharedMemory::AccessM
fileMode |= GENERIC_WRITE;
}
#if defined (POCO_WIN32_UTF8)
std::wstring utf16name;
UnicodeConverter::toUTF16(_name, utf16name);
_fileHandle = CreateFileW(utf16name.c_str(), fileMode, shareMode, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#else
_fileHandle = CreateFileA(_name.c_str(), fileMode, shareMode, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
#endif
if (_fileHandle == INVALID_HANDLE_VALUE)
throw OpenFileException("Cannot open memory mapped file", _name);

View File

@ -53,13 +53,7 @@ std::string Timezone::name()
TIME_ZONE_INFORMATION tzInfo;
DWORD dstFlag = GetTimeZoneInformation(&tzInfo);
WCHAR* ptr = dstFlag == TIME_ZONE_ID_DAYLIGHT ? tzInfo.DaylightName : tzInfo.StandardName;
#if defined(POCO_WIN32_UTF8)
UnicodeConverter::toUTF8(ptr, result);
#else
char buffer[256];
DWORD rc = WideCharToMultiByte(CP_ACP, 0, ptr, -1, buffer, sizeof(buffer), NULL, NULL);
if (rc) result = buffer;
#endif
return result;
}
@ -70,13 +64,7 @@ std::string Timezone::standardName()
TIME_ZONE_INFORMATION tzInfo;
DWORD dstFlag = GetTimeZoneInformation(&tzInfo);
WCHAR* ptr = tzInfo.StandardName;
#if defined(POCO_WIN32_UTF8)
UnicodeConverter::toUTF8(ptr, result);
#else
char buffer[256];
DWORD rc = WideCharToMultiByte(CP_ACP, 0, ptr, -1, buffer, sizeof(buffer), NULL, NULL);
if (rc) result = buffer;
#endif
return result;
}
@ -87,13 +75,7 @@ std::string Timezone::dstName()
TIME_ZONE_INFORMATION tzInfo;
DWORD dstFlag = GetTimeZoneInformation(&tzInfo);
WCHAR* ptr = tzInfo.DaylightName;
#if defined(POCO_WIN32_UTF8)
UnicodeConverter::toUTF8(ptr, result);
#else
char buffer[256];
DWORD rc = WideCharToMultiByte(CP_ACP, 0, ptr, -1, buffer, sizeof(buffer), NULL, NULL);
if (rc) result = buffer;
#endif
return result;
}

View File

@ -21,6 +21,9 @@
#include <cstring>
#if defined(POCO_OS_FAMILY_WINDOWS) && !defined(POCO_NO_WSTRING)
namespace Poco {
@ -159,3 +162,6 @@ void UnicodeConverter::convert(const UTF32Char* utf32String, std::string& utf8St
} // namespace Poco
#endif // POCO_OS_FAMILY_WINDOWS && !POCO_NO_WSTRING

View File

@ -14,9 +14,7 @@
#include "Poco/WindowsConsoleChannel.h"
#include "Poco/Message.h"
#if defined(POCO_WIN32_UTF8)
#include "Poco/UnicodeConverter.h"
#endif
#include "Poco/String.h"
#include "Poco/Exception.h"
@ -44,8 +42,7 @@ void WindowsConsoleChannel::log(const Message& msg)
{
std::string text = msg.getText();
text += "\r\n";
#if defined(POCO_WIN32_UTF8)
if (_isFile)
{
DWORD written;
@ -58,10 +55,6 @@ void WindowsConsoleChannel::log(const Message& msg)
DWORD written;
WriteConsoleW(_hConsole, utext.data(), static_cast<DWORD>(utext.size()), &written, NULL);
}
#else
DWORD written;
WriteFile(_hConsole, text.data(), text.size(), &written, NULL);
#endif
}
@ -96,7 +89,6 @@ void WindowsColorConsoleChannel::log(const Message& msg)
SetConsoleTextAttribute(_hConsole, attr);
}
#if defined(POCO_WIN32_UTF8)
if (_isFile)
{
DWORD written;
@ -109,10 +101,6 @@ void WindowsColorConsoleChannel::log(const Message& msg)
DWORD written;
WriteConsoleW(_hConsole, utext.data(), static_cast<DWORD>(utext.size()), &written, NULL);
}
#else
DWORD written;
WriteFile(_hConsole, text.data(), text.size(), &written, NULL);
#endif
if (_enableColors && !_isFile)
{

View File

@ -29,14 +29,10 @@ FileStreamTest::~FileStreamTest()
void FileStreamTest::testRead()
{
#if defined(POCO_OS_FAMILY_WINDOWS) && !defined(POCO_WIN32_UTF8)
#if defined(POCO_OS_FAMILY_WINDOWS)
char tmp[]={'\xc4', '\xd6', '\xdc', '\xe4', '\xf6', '\xfc', '\0'};
std::string file(tmp);
file.append(".txt");
#elif defined(POCO_OS_FAMILY_WINDOWS)
char tmp[]={'\xc3', '\x84', '\xc3', '\x96', '\xc3', '\x9c', '\xc3', '\xa4', '\xc3', '\xb6', '\xc3', '\xbc', '\0'};
std::string file(tmp);
file.append(".txt");
#else
std::string file("testfile.txt");
#endif
@ -57,14 +53,10 @@ void FileStreamTest::testRead()
void FileStreamTest::testWrite()
{
#if defined(POCO_OS_FAMILY_WINDOWS) && !defined(POCO_WIN32_UTF8)
#if defined(POCO_OS_FAMILY_WINDOWS)
char tmp[]={'\xdf', '\xc4', '\xd6', '\xdc', '\xe4', '\xf6', '\xfc', '\0'};
std::string file(tmp);
file = "dummy_" + file + (".txt");
#elif defined(POCO_OS_FAMILY_WINDOWS)
char tmp[]={'\xc3', '\x9f', '\xc3', '\x84', '\xc3', '\x96', '\xc3', '\x9c', '\xc3', '\xa4', '\xc3', '\xb6', '\xc3', '\xbc', '\0'};
std::string file(tmp);
file = "dummy_" + file + ".txt";
#else
std::string file("dummy_file.txt");
#endif
@ -86,7 +78,7 @@ void FileStreamTest::testWrite()
void FileStreamTest::testReadWrite()
{
#if defined(POCO_OS_FAMILY_WINDOWS) && !defined(POCO_WIN32_UTF8)
#if defined(POCO_OS_FAMILY_WINDOWS)
char tmp[]={'\xdf', '\xc4', '\xd6', '\xdc', '\xe4', '\xf6', '\xfc', '\0'};
std::string file(tmp);
file = "dummy_" + file + (".txt");

View File

@ -524,7 +524,7 @@ void FileTest::testRename()
void FileTest::testLongPath()
{
#if defined(_WIN32) && defined(POCO_WIN32_UTF8) && !defined(_WIN32_WCE)
#if defined(POCO_OS_FAMILY_WINDOWS) && !defined(_WIN32_WCE)
Poco::Path p("longpathtest");
p.makeAbsolute();
std::string longpath(p.toString());

View File

@ -17,15 +17,13 @@
#include "Poco/Environment.h"
#include <iostream>
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
#if defined(POCO_OS_FAMILY_WINDOWS)
#if defined(_WIN32_WCE)
#include "Poco/Path_WINCE.h"
#else
#include "Poco/Path_WIN32U.h"
#endif
#elif defined(POCO_OS_FAMILY_WINDOWS)
#include "Poco/Path_WIN32.h"
#endif
#endif
using Poco::Path;
using Poco::PathSyntaxException;

View File

@ -27,9 +27,7 @@
#include "Poco/Format.h"
#if defined(POCO_OS_FAMILY_WINDOWS)
#include "Poco/Platform_WIN32_OSVER.h"
#if defined(POCO_WIN32_UTF8)
#include "Poco/UnicodeConverter.h"
#endif
#include "Poco/UnicodeConverter.h"
#include "Poco/Error.h"
#include <wincrypt.h>
#include <iphlpapi.h>
@ -1001,7 +999,7 @@ IPAddress subnetMaskForInterface(const std::string& name, bool isLoopback)
subKey += name;
std::string netmask;
HKEY hKey;
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if !defined(POCO_NO_WSTRING)
std::wstring usubKey;
Poco::UnicodeConverter::toUTF16(subKey, usubKey);
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, usubKey.c_str(), 0, KEY_READ, &hKey) != ERROR_SUCCESS)
@ -1017,20 +1015,6 @@ IPAddress subnetMaskForInterface(const std::string& name, bool isLoopback)
}
}
Poco::UnicodeConverter::toUTF8(unetmask, netmask);
#else
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, subKey.c_str(), 0, KEY_READ, &hKey) != ERROR_SUCCESS)
return IPAddress();
char unetmask[16];
DWORD size = sizeof(unetmask);
if (RegQueryValueExA(hKey, "DhcpSubnetMask", NULL, NULL, (LPBYTE)&unetmask, &size) != ERROR_SUCCESS)
{
if (RegQueryValueExA(hKey, "SubnetMask", NULL, NULL, (LPBYTE)&unetmask, &size) != ERROR_SUCCESS)
{
RegCloseKey(hKey);
return IPAddress();
}
}
netmask = unetmask;
#endif
RegCloseKey(hKey);
return IPAddress::parse(netmask);
@ -1145,17 +1129,8 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
std::string name;
std::string displayName;
std::string adapterName(pAddress->AdapterName);
#ifdef POCO_WIN32_UTF8
Poco::UnicodeConverter::toUTF8(pAddress->FriendlyName, name);
Poco::UnicodeConverter::toUTF8(pAddress->Description, displayName);
#else
char nameBuffer[1024];
int rc = WideCharToMultiByte(CP_ACP, 0, pAddress->FriendlyName, -1, nameBuffer, sizeof(nameBuffer), NULL, NULL);
if (rc) name = nameBuffer;
char displayNameBuffer[1024];
rc = WideCharToMultiByte(CP_ACP, 0, pAddress->Description, -1, displayNameBuffer, sizeof(displayNameBuffer), NULL, NULL);
if (rc) displayName = displayNameBuffer;
#endif
bool isUp = (pAddress->OperStatus == IfOperStatusUp);
bool isIP = (0 != pAddress->FirstUnicastAddress);

View File

@ -164,18 +164,13 @@ protected:
{
checkFile();
#if defined(_WIN32) && defined(POCO_WIN32_UTF8)
#if defined(POCO_OS_FAMILY_WINDOWS)
std::wstring wpath;
Poco::UnicodeConverter::toUTF16(_path, wpath);
if (InFile_OpenW(&_archiveStream.file, wpath.c_str()) != SZ_OK)
{
throw Poco::OpenFileException(_path);
}
#else
if (InFile_Open(&_archiveStream.file, _path.c_str()) != SZ_OK)
{
throw Poco::OpenFileException(_path);
}
#endif
_lookStream.realStream = &_archiveStream.s;

View File

@ -82,8 +82,7 @@ class Util_API Application: public Subsystem
/// If loadConfiguration() has never been called, application.configDir will be equal to application.dir.
///
/// The POCO_APP_MAIN macro can be used to implement main(argc, argv).
/// If POCO has been built with POCO_WIN32_UTF8, POCO_APP_MAIN supports
/// Unicode command line arguments.
/// POCO_APP_MAIN supports Unicode command line arguments.
{
public:
typedef std::vector<std::string> ArgVec;
@ -140,7 +139,7 @@ public:
/// Note that as of release 1.3.7, init() no longer
/// calls initialize(). This is now called from run().
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if !defined(POCO_NO_WSTRING)
void init(int argc, wchar_t* argv[]);
/// Processes the application's command line arguments
/// and sets the application's properties (e.g.,
@ -481,7 +480,7 @@ inline Poco::Timespan Application::uptime() const
//
// Macro to implement main()
//
#if defined(_WIN32) && defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if defined(POCO_OS_FAMILY_WINDOWS) && !defined(POCO_NO_WSTRING)
#define POCO_APP_MAIN(App) \
int wmain(int argc, wchar_t** argv) \
{ \

View File

@ -60,8 +60,7 @@ class Util_API ServerApplication: public Application
/// }
///
/// The POCO_SERVER_MAIN macro can be used to implement main(argc, argv).
/// If POCO has been built with POCO_WIN32_UTF8, POCO_SERVER_MAIN supports
/// Unicode command line arguments.
/// POCO_SERVER_MAIN supports Unicode command line arguments.
///
/// On Windows platforms, an application built on top of the
/// ServerApplication class can be run both from the command line
@ -144,7 +143,7 @@ public:
/// Runs the application by performing additional initializations
/// and calling the main() method.
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if !defined(POCO_NO_WSTRING)
int run(int argc, wchar_t** argv);
/// Runs the application by performing additional initializations
/// and calling the main() method.
@ -198,10 +197,8 @@ private:
};
static BOOL __stdcall ConsoleCtrlHandler(DWORD ctrlType);
static DWORD __stdcall ServiceControlHandler(DWORD control, DWORD event_type, LPVOID event_data, LPVOID context);
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if !defined(POCO_NO_WSTRING)
static void __stdcall ServiceMain(DWORD argc, LPWSTR* argv);
#else
static void __stdcall ServiceMain(DWORD argc, LPTSTR* argv);
#endif
bool hasConsole();
@ -235,7 +232,7 @@ private:
//
// Macro to implement main()
//
#if defined(_WIN32) && defined(POCO_WIN32_UTF8) && !defined(__MINGW32__)
#if defined(_WIN32) && !defined(__MINGW32__)
#define POCO_SERVER_MAIN(App) \
int wmain(int argc, wchar_t** argv) \
{ \

View File

@ -22,11 +22,7 @@
#include "Poco/UnWindows.h"
#if defined(POCO_WIN32_UTF8)
#define POCO_LPQUERY_SERVICE_CONFIG LPQUERY_SERVICE_CONFIGW
#else
#define POCO_LPQUERY_SERVICE_CONFIG LPQUERY_SERVICE_CONFIGA
#endif
namespace Poco {

View File

@ -41,9 +41,7 @@
#if defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_VXWORKS)
#include "Poco/SignalHandler.h"
#endif
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#include "Poco/UnicodeConverter.h"
#endif
using Poco::Logger;
@ -136,7 +134,7 @@ void Application::init(int argc, char* pArgv[])
}
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if !defined(POCO_NO_WSTRING)
void Application::init(int argc, wchar_t* argv[])
{
std::vector<std::string> args;
@ -440,7 +438,7 @@ void Application::getApplicationPath(Poco::Path& appPath) const
appPath.makeAbsolute();
}
#elif defined(POCO_OS_FAMILY_WINDOWS)
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if !defined(POCO_NO_WSTRING)
wchar_t path[1024];
int n = GetModuleFileNameW(0, path, sizeof(path)/sizeof(wchar_t));
if (n > 0)

View File

@ -41,9 +41,7 @@
#include "Poco/UnWindows.h"
#include <cstring>
#endif
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#include "Poco/UnicodeConverter.h"
#endif
using Poco::NumberFormatter;
@ -169,20 +167,16 @@ DWORD ServerApplication::ServiceControlHandler(DWORD control, DWORD event_type,
}
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if !defined(POCO_NO_WSTRING)
void ServerApplication::ServiceMain(DWORD argc, LPWSTR* argv)
#else
void ServerApplication::ServiceMain(DWORD argc, LPTSTR* argv)
#endif
{
ServerApplication& app = static_cast<ServerApplication&>(Application::instance());
app.config().setBool("application.runAsService", true);
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if !defined(POCO_NO_WSTRING)
_serviceStatusHandle = RegisterServiceCtrlHandlerExW(L"", ServiceControlHandler, &app);
#else
_serviceStatusHandle = RegisterServiceCtrlHandlerExA("", ServiceControlHandler, &app);
#endif
if (!_serviceStatusHandle)
throw SystemException("cannot register service control handler");
@ -198,7 +192,7 @@ void ServerApplication::ServiceMain(DWORD argc, LPTSTR* argv)
try
{
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if !defined(POCO_NO_WSTRING)
std::vector<std::string> args;
for (DWORD i = 0; i < argc; ++i)
{
@ -207,8 +201,6 @@ void ServerApplication::ServiceMain(DWORD argc, LPTSTR* argv)
args.push_back(arg);
}
app.init(args);
#else
app.init(argc, argv);
#endif
_serviceStatus.dwCurrentState = SERVICE_RUNNING;
SetServiceStatus(_serviceStatusHandle, &_serviceStatus);
@ -313,7 +305,7 @@ int ServerApplication::run(const std::vector<std::string>& args)
}
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if !defined(POCO_NO_WSTRING)
int ServerApplication::run(int argc, wchar_t** argv)
{
if (!hasConsole() && isService())
@ -353,20 +345,13 @@ int ServerApplication::run(int argc, wchar_t** argv)
bool ServerApplication::isService()
{
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if !defined(POCO_NO_WSTRING)
SERVICE_TABLE_ENTRYW svcDispatchTable[2];
svcDispatchTable[0].lpServiceName = L"";
svcDispatchTable[0].lpServiceProc = ServiceMain;
svcDispatchTable[1].lpServiceName = NULL;
svcDispatchTable[1].lpServiceProc = NULL;
return StartServiceCtrlDispatcherW(svcDispatchTable) != 0;
#else
SERVICE_TABLE_ENTRY svcDispatchTable[2];
svcDispatchTable[0].lpServiceName = "";
svcDispatchTable[0].lpServiceProc = ServiceMain;
svcDispatchTable[1].lpServiceName = NULL;
svcDispatchTable[1].lpServiceProc = NULL;
return StartServiceCtrlDispatcherA(svcDispatchTable) != 0;
#endif
}
@ -519,7 +504,7 @@ int ServerApplication::run(const std::vector<std::string>& args)
}
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
#if !defined(POCO_NO_WSTRING)
int ServerApplication::run(int argc, wchar_t** argv)
{
try

View File

@ -15,9 +15,7 @@
#include "Poco/Util/WinRegistryKey.h"
#include "Poco/Exception.h"
#include "Poco/Buffer.h"
#if defined(POCO_WIN32_UTF8)
#include "Poco/UnicodeConverter.h"
#endif
using Poco::SystemException;
@ -90,17 +88,12 @@ WinRegistryKey::~WinRegistryKey()
void WinRegistryKey::setString(const std::string& name, const std::string& value)
{
open();
#if defined(POCO_WIN32_UTF8)
std::wstring uname;
Poco::UnicodeConverter::toUTF16(name, uname);
std::wstring uvalue;
Poco::UnicodeConverter::toUTF16(value, uvalue);
if (RegSetValueExW(_hKey, uname.c_str(), 0, REG_SZ, (CONST BYTE*) uvalue.c_str(), (DWORD) (uvalue.size() + 1)*sizeof(wchar_t)) != ERROR_SUCCESS)
handleSetError(name);
#else
if (RegSetValueExA(_hKey, name.c_str(), 0, REG_SZ, (CONST BYTE*) value.c_str(), (DWORD) value.size() + 1) != ERROR_SUCCESS)
handleSetError(name);
#endif
}
@ -109,7 +102,6 @@ std::string WinRegistryKey::getString(const std::string& name)
open();
DWORD type;
DWORD size;
#if defined(POCO_WIN32_UTF8)
std::wstring uname;
Poco::UnicodeConverter::toUTF16(name, uname);
if (RegQueryValueExW(_hKey, uname.c_str(), NULL, &type, NULL, &size) != ERROR_SUCCESS || (type != REG_SZ && type != REG_EXPAND_SZ && type != REG_LINK))
@ -125,18 +117,6 @@ std::string WinRegistryKey::getString(const std::string& name)
Poco::UnicodeConverter::toUTF8(uresult, result);
return result;
}
#else
if (RegQueryValueExA(_hKey, name.c_str(), NULL, &type, NULL, &size) != ERROR_SUCCESS || (type != REG_SZ && type != REG_EXPAND_SZ && type != REG_LINK))
throw NotFoundException(key(name));
if (size > 0)
{
Poco::Buffer<char> buffer(size + 1);
RegQueryValueExA(_hKey, name.c_str(), NULL, NULL, (BYTE*) buffer.begin(), &size);
buffer[size] = 0;
std::string result(buffer.begin());
return result;
}
#endif
return std::string();
}
@ -144,17 +124,12 @@ std::string WinRegistryKey::getString(const std::string& name)
void WinRegistryKey::setStringExpand(const std::string& name, const std::string& value)
{
open();
#if defined(POCO_WIN32_UTF8)
std::wstring uname;
Poco::UnicodeConverter::toUTF16(name, uname);
std::wstring uvalue;
Poco::UnicodeConverter::toUTF16(value, uvalue);
if (RegSetValueExW(_hKey, uname.c_str(), 0, REG_EXPAND_SZ, (CONST BYTE*) uvalue.c_str(), (DWORD) (uvalue.size() + 1)*sizeof(wchar_t)) != ERROR_SUCCESS)
handleSetError(name);
#else
if (RegSetValueExA(_hKey, name.c_str(), 0, REG_EXPAND_SZ, (CONST BYTE*) value.c_str(), (DWORD) value.size() + 1) != ERROR_SUCCESS)
handleSetError(name);
#endif
}
@ -163,7 +138,6 @@ std::string WinRegistryKey::getStringExpand(const std::string& name)
open();
DWORD type;
DWORD size;
#if defined(POCO_WIN32_UTF8)
std::wstring uname;
Poco::UnicodeConverter::toUTF16(name, uname);
if (RegQueryValueExW(_hKey, uname.c_str(), NULL, &type, NULL, &size) != ERROR_SUCCESS || (type != REG_SZ && type != REG_EXPAND_SZ && type != REG_LINK))
@ -184,25 +158,9 @@ std::string WinRegistryKey::getStringExpand(const std::string& name)
#else
std::string result;
UnicodeConverter::toUTF8(buffer.begin(), result);
#endif
#endif // _WIN32_WCE
return result;
}
#else
if (RegQueryValueExA(_hKey, name.c_str(), NULL, &type, NULL, &size) != ERROR_SUCCESS || (type != REG_SZ && type != REG_EXPAND_SZ && type != REG_LINK))
throw NotFoundException(key(name));
if (size > 0)
{
Poco::Buffer<char> buffer(size + 1);
RegQueryValueExA(_hKey, name.c_str(), NULL, NULL, (BYTE*) buffer.begin(), &size);
buffer[size] = 0;
char temp;
DWORD expSize = ExpandEnvironmentStringsA(buffer, &temp, 1);
Poco::Buffer<char> expBuffer(expSize);
ExpandEnvironmentStringsA(buffer.begin(), expBuffer.begin(), expSize);
std::string result(expBuffer.begin());
return result;
}
#endif
return std::string();
}
@ -211,15 +169,10 @@ std::string WinRegistryKey::getStringExpand(const std::string& name)
void WinRegistryKey::setBinary( const std::string& name, const std::vector<char>& value )
{
open();
#if defined(POCO_WIN32_UTF8)
std::wstring uname;
Poco::UnicodeConverter::toUTF16(name, uname);
if (RegSetValueExW(_hKey, uname.c_str(), 0, REG_BINARY, (CONST BYTE*) &value[0], (DWORD) value.size()) != ERROR_SUCCESS)
handleSetError(name);
#else
if (RegSetValueExA(_hKey, name.c_str(), 0, REG_BINARY, (CONST BYTE*) &value[0], (DWORD) value.size()) != ERROR_SUCCESS)
handleSetError(name);
#endif
}
@ -229,8 +182,6 @@ std::vector<char> WinRegistryKey::getBinary( const std::string& name )
DWORD type;
DWORD size;
std::vector<char> result;
#if defined(POCO_WIN32_UTF8)
std::wstring uname;
Poco::UnicodeConverter::toUTF16(name, uname);
if (RegQueryValueExW(_hKey, uname.c_str(), NULL, &type, NULL, &size) != ERROR_SUCCESS || type != REG_BINARY)
@ -240,15 +191,6 @@ std::vector<char> WinRegistryKey::getBinary( const std::string& name )
result.resize(size);
RegQueryValueExW(_hKey, uname.c_str(), NULL, NULL, (BYTE*) &result[0], &size);
}
#else
if (RegQueryValueExA(_hKey, name.c_str(), NULL, &type, NULL, &size) != ERROR_SUCCESS || type != REG_BINARY)
throw NotFoundException(key(name));
if (size > 0)
{
result.resize(size);
RegQueryValueExA(_hKey, name.c_str(), NULL, NULL, (BYTE*) &result[0], &size);
}
#endif
return result;
}
@ -257,15 +199,10 @@ void WinRegistryKey::setInt(const std::string& name, int value)
{
open();
DWORD data = value;
#if defined(POCO_WIN32_UTF8)
std::wstring uname;
Poco::UnicodeConverter::toUTF16(name, uname);
if (RegSetValueExW(_hKey, uname.c_str(), 0, REG_DWORD, (CONST BYTE*) &data, sizeof(data)) != ERROR_SUCCESS)
handleSetError(name);
#else
if (RegSetValueExA(_hKey, name.c_str(), 0, REG_DWORD, (CONST BYTE*) &data, sizeof(data)) != ERROR_SUCCESS)
handleSetError(name);
#endif
}
@ -275,15 +212,10 @@ int WinRegistryKey::getInt(const std::string& name)
DWORD type;
DWORD data;
DWORD size = sizeof(data);
#if defined(POCO_WIN32_UTF8)
std::wstring uname;
Poco::UnicodeConverter::toUTF16(name, uname);
if (RegQueryValueExW(_hKey, uname.c_str(), NULL, &type, (BYTE*) &data, &size) != ERROR_SUCCESS || (type != REG_DWORD && type != REG_DWORD_BIG_ENDIAN))
throw NotFoundException(key(name));
#else
if (RegQueryValueExA(_hKey, name.c_str(), NULL, &type, (BYTE*) &data, &size) != ERROR_SUCCESS || (type != REG_DWORD && type != REG_DWORD_BIG_ENDIAN))
throw NotFoundException(key(name));
#endif
return data;
}
@ -294,15 +226,10 @@ int WinRegistryKey::getInt(const std::string& name)
void WinRegistryKey::setInt64(const std::string& name, Poco::Int64 value)
{
open();
#if defined(POCO_WIN32_UTF8)
std::wstring uname;
Poco::UnicodeConverter::toUTF16(name, uname);
if (RegSetValueExW(_hKey, uname.c_str(), 0, REG_QWORD, (CONST BYTE*) &value, sizeof(value)) != ERROR_SUCCESS)
handleSetError(name);
#else
if (RegSetValueExA(_hKey, name.c_str(), 0, REG_QWORD, (CONST BYTE*) &value, sizeof(value)) != ERROR_SUCCESS)
handleSetError(name);
#endif
}
Poco::Int64 WinRegistryKey::getInt64(const std::string& name)
@ -311,15 +238,10 @@ Poco::Int64 WinRegistryKey::getInt64(const std::string& name)
DWORD type;
Poco::Int64 data;
DWORD size = sizeof(data);
#if defined(POCO_WIN32_UTF8)
std::wstring uname;
Poco::UnicodeConverter::toUTF16(name, uname);
if (RegQueryValueExW(_hKey, uname.c_str(), NULL, &type, (BYTE*) &data, &size) != ERROR_SUCCESS || type != REG_QWORD)
throw NotFoundException(key(name));
#else
if (RegQueryValueExA(_hKey, name.c_str(), NULL, &type, (BYTE*) &data, &size) != ERROR_SUCCESS || type != REG_QWORD)
throw NotFoundException(key(name));
#endif
return data;
}
@ -330,15 +252,10 @@ Poco::Int64 WinRegistryKey::getInt64(const std::string& name)
void WinRegistryKey::deleteValue(const std::string& name)
{
open();
#if defined(POCO_WIN32_UTF8)
std::wstring uname;
Poco::UnicodeConverter::toUTF16(name, uname);
if (RegDeleteValueW(_hKey, uname.c_str()) != ERROR_SUCCESS)
throw NotFoundException(key(name));
#else
if (RegDeleteValueA(_hKey, name.c_str()) != ERROR_SUCCESS)
throw NotFoundException(key(name));
#endif
}
@ -360,7 +277,6 @@ void WinRegistryKey::deleteKey()
// We cannot call it directly as this would prevent the code running on Windows XP 32-bit.
// Therefore, if we need to call RegDeleteKeyEx (_extraSam != 0) we need to check for
// its existence in ADVAPI32.DLL and call it indirectly.
#if defined(POCO_WIN32_UTF8)
std::wstring usubKey;
Poco::UnicodeConverter::toUTF16(_subKey, usubKey);
@ -383,32 +299,12 @@ void WinRegistryKey::deleteKey()
#endif
if (RegDeleteKeyW(_hRootKey, usubKey.c_str()) != ERROR_SUCCESS)
throw NotFoundException(key());
#else
typedef LONG (WINAPI *RegDeleteKeyExAFunc)(HKEY hKey, const char* lpSubKey, REGSAM samDesired, DWORD Reserved);
if (_extraSam != 0)
{
AutoHandle advAPI32(LoadLibraryA("ADVAPI32.DLL"));
if (advAPI32.handle())
{
RegDeleteKeyExAFunc pRegDeleteKeyExA = reinterpret_cast<RegDeleteKeyExAFunc>(GetProcAddress(advAPI32.handle() , "RegDeleteKeyExA"));
if (pRegDeleteKeyExA)
{
if ((*pRegDeleteKeyExA)(_hRootKey, _subKey.c_str(), _extraSam, 0) != ERROR_SUCCESS)
throw NotFoundException(key());
return;
}
}
}
if (RegDeleteKey(_hRootKey, _subKey.c_str()) != ERROR_SUCCESS)
throw NotFoundException(key());
#endif
}
bool WinRegistryKey::exists()
{
HKEY hKey;
#if defined(POCO_WIN32_UTF8)
std::wstring usubKey;
Poco::UnicodeConverter::toUTF16(_subKey, usubKey);
if (RegOpenKeyExW(_hRootKey, usubKey.c_str(), 0, KEY_READ | _extraSam, &hKey) == ERROR_SUCCESS)
@ -416,13 +312,6 @@ bool WinRegistryKey::exists()
RegCloseKey(hKey);
return true;
}
#else
if (RegOpenKeyExA(_hRootKey, _subKey.c_str(), 0, KEY_READ | _extraSam, &hKey) == ERROR_SUCCESS)
{
RegCloseKey(hKey);
return true;
}
#endif
return false;
}
@ -432,15 +321,10 @@ WinRegistryKey::Type WinRegistryKey::type(const std::string& name)
open();
DWORD type = REG_NONE;
DWORD size;
#if defined(POCO_WIN32_UTF8)
std::wstring uname;
Poco::UnicodeConverter::toUTF16(name, uname);
if (RegQueryValueExW(_hKey, uname.c_str(), NULL, &type, NULL, &size) != ERROR_SUCCESS)
throw NotFoundException(key(name));
#else
if (RegQueryValueExA(_hKey, name.c_str(), NULL, &type, NULL, &size) != ERROR_SUCCESS)
throw NotFoundException(key(name));
#endif
Type aType = (Type)type;
return aType;
@ -451,7 +335,6 @@ bool WinRegistryKey::exists(const std::string& name)
{
bool exists = false;
HKEY hKey;
#if defined(POCO_WIN32_UTF8)
std::wstring usubKey;
Poco::UnicodeConverter::toUTF16(_subKey, usubKey);
if (RegOpenKeyExW(_hRootKey, usubKey.c_str(), 0, KEY_READ | _extraSam, &hKey) == ERROR_SUCCESS)
@ -461,13 +344,6 @@ bool WinRegistryKey::exists(const std::string& name)
exists = RegQueryValueExW(hKey, uname.c_str(), NULL, NULL, NULL, NULL) == ERROR_SUCCESS;
RegCloseKey(hKey);
}
#else
if (RegOpenKeyExA(_hRootKey, _subKey.c_str(), 0, KEY_READ | _extraSam, &hKey) == ERROR_SUCCESS)
{
exists = RegQueryValueExA(hKey, name.c_str(), NULL, NULL, NULL, NULL) == ERROR_SUCCESS;
RegCloseKey(hKey);
}
#endif
return exists;
}
@ -476,7 +352,6 @@ void WinRegistryKey::open()
{
if (!_hKey)
{
#if defined(POCO_WIN32_UTF8)
std::wstring usubKey;
Poco::UnicodeConverter::toUTF16(_subKey, usubKey);
if (_readOnly)
@ -489,18 +364,6 @@ void WinRegistryKey::open()
if (RegCreateKeyExW(_hRootKey, usubKey.c_str(), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE | _extraSam, NULL, &_hKey, NULL) != ERROR_SUCCESS)
throw SystemException("Cannot open registry key: ", key());
}
#else
if (_readOnly)
{
if (RegOpenKeyExA(_hRootKey, _subKey.c_str(), 0, KEY_READ | _extraSam, &_hKey) != ERROR_SUCCESS)
throw NotFoundException("Cannot open registry key: ", key());
}
else
{
if (RegCreateKeyExA(_hRootKey, _subKey.c_str(), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_READ | KEY_WRITE | _extraSam, NULL, &_hKey, NULL) != ERROR_SUCCESS)
throw SystemException("Cannot open registry key: ", key());
}
#endif
}
}
@ -601,7 +464,6 @@ void WinRegistryKey::subKeys(WinRegistryKey::Keys& keys)
if (RegQueryInfoKey(_hKey, NULL, NULL, NULL, &subKeyCount, NULL, NULL, &valueCount, NULL, NULL, NULL, NULL) != ERROR_SUCCESS)
return;
#if defined(POCO_WIN32_UTF8)
wchar_t buf[256];
DWORD bufSize = sizeof(buf)/sizeof(wchar_t);
for (DWORD i = 0; i< subKeyCount; ++i)
@ -615,19 +477,6 @@ void WinRegistryKey::subKeys(WinRegistryKey::Keys& keys)
}
bufSize = sizeof(buf)/sizeof(wchar_t);
}
#else
char buf[256];
DWORD bufSize = sizeof(buf);
for (DWORD i = 0; i< subKeyCount; ++i)
{
if (RegEnumKeyExA(_hKey, i, buf, &bufSize, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
{
std::string name(buf);
keys.push_back(name);
}
bufSize = sizeof(buf);
}
#endif
}
@ -640,7 +489,6 @@ void WinRegistryKey::values(WinRegistryKey::Values& vals)
if (RegQueryInfoKey(_hKey, NULL, NULL, NULL, NULL, NULL, NULL, &valueCount, NULL, NULL, NULL, NULL) != ERROR_SUCCESS)
return ;
#if defined(POCO_WIN32_UTF8)
wchar_t buf[256];
DWORD bufSize = sizeof(buf)/sizeof(wchar_t);
for (DWORD i = 0; i< valueCount; ++i)
@ -654,19 +502,6 @@ void WinRegistryKey::values(WinRegistryKey::Values& vals)
}
bufSize = sizeof(buf)/sizeof(wchar_t);
}
#else
char buf[256];
DWORD bufSize = sizeof(buf);
for (DWORD i = 0; i< valueCount; ++i)
{
if (RegEnumValueA(_hKey, i, buf, &bufSize, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
{
std::string name(buf);
vals.push_back(name);
}
bufSize = sizeof(buf);
}
#endif
}

View File

@ -19,9 +19,7 @@
#include "Poco/Util/WinRegistryKey.h"
#include "Poco/Thread.h"
#include "Poco/Exception.h"
#if defined(POCO_WIN32_UTF8)
#include "Poco/UnicodeConverter.h"
#endif
using Poco::Thread;
@ -64,13 +62,9 @@ const std::string& WinService::name() const
std::string WinService::displayName() const
{
POCO_LPQUERY_SERVICE_CONFIG pSvcConfig = config();
#if defined(POCO_WIN32_UTF8)
std::wstring udispName(pSvcConfig->lpDisplayName);
std::string dispName;
Poco::UnicodeConverter::toUTF8(udispName, dispName);
#else
std::string dispName(pSvcConfig->lpDisplayName);
#endif
LocalFree(pSvcConfig);
return dispName;
}
@ -79,13 +73,9 @@ std::string WinService::displayName() const
std::string WinService::path() const
{
POCO_LPQUERY_SERVICE_CONFIG pSvcConfig = config();
#if defined(POCO_WIN32_UTF8)
std::wstring upath(pSvcConfig->lpBinaryPathName);
std::string path;
UnicodeConverter::toUTF8(upath, path);
#else
std::string path(pSvcConfig->lpBinaryPathName);
#endif
LocalFree(pSvcConfig);
return path;
}
@ -94,7 +84,6 @@ std::string WinService::path() const
void WinService::registerService(const std::string& path, const std::string& displayName)
{
close();
#if defined(POCO_WIN32_UTF8)
std::wstring uname;
Poco::UnicodeConverter::toUTF16(_name, uname);
std::wstring udisplayName;
@ -111,18 +100,6 @@ void WinService::registerService(const std::string& path, const std::string& dis
SERVICE_ERROR_NORMAL,
upath.c_str(),
NULL, NULL, NULL, NULL, NULL);
#else
_svcHandle = CreateServiceA(
_scmHandle,
_name.c_str(),
displayName.c_str(),
SERVICE_ALL_ACCESS,
SERVICE_WIN32_OWN_PROCESS,
SERVICE_DEMAND_START,
SERVICE_ERROR_NORMAL,
path.c_str(),
NULL, NULL, NULL, NULL, NULL);
#endif
if (!_svcHandle)
throw SystemException("cannot register service", _name);
}
@ -213,7 +190,7 @@ void WinService::setStartup(WinService::Startup startup)
}
}
WinService::Startup WinService::getStartup() const
{
POCO_LPQUERY_SERVICE_CONFIG pSvcConfig = config();
@ -269,13 +246,9 @@ bool WinService::tryOpen() const
{
if (!_svcHandle)
{
#if defined(POCO_WIN32_UTF8)
std::wstring uname;
Poco::UnicodeConverter::toUTF16(_name, uname);
_svcHandle = OpenServiceW(_scmHandle, uname.c_str(), SERVICE_ALL_ACCESS);
#else
_svcHandle = OpenServiceA(_scmHandle, _name.c_str(), SERVICE_ALL_ACCESS);
#endif
}
return _svcHandle != 0;
}
@ -300,11 +273,7 @@ POCO_LPQUERY_SERVICE_CONFIG WinService::config() const
if (!pSvcConfig) throw OutOfMemoryException("cannot allocate service config buffer");
try
{
#if defined(POCO_WIN32_UTF8)
while (!QueryServiceConfigW(_svcHandle, pSvcConfig, size, &bytesNeeded))
#else
while (!QueryServiceConfigA(_svcHandle, pSvcConfig, size, &bytesNeeded))
#endif
{
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
{

View File

@ -108,7 +108,7 @@ if (CMAKE_SYSTEM MATCHES "SunOS")
endif(CMAKE_SYSTEM MATCHES "SunOS")
if (CMAKE_COMPILER_IS_MINGW)
add_definitions(-DWC_NO_BEST_FIT_CHARS=0x400 -DPOCO_WIN32_UTF8)
add_definitions(-DWC_NO_BEST_FIT_CHARS=0x400)
add_definitions(-D_WIN32 -DMINGW32 -DWINVER=0x500 -DODBCVER=0x0300 -DPOCO_THREAD_STACK_SIZE)
endif (CMAKE_COMPILER_IS_MINGW)