Index: ch.vc140.sln =================================================================== diff -u -r545098ae76e9ce23598d37d2bee4020d6cb59f3c -re2054db3fa2be3652ca376a318d49dbaba8539ed --- ch.vc140.sln (.../ch.vc140.sln) (revision 545098ae76e9ce23598d37d2bee4020d6cb59f3c) +++ ch.vc140.sln (.../ch.vc140.sln) (revision e2054db3fa2be3652ca376a318d49dbaba8539ed) @@ -36,6 +36,8 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ext", "ext", "{0E7F04BC-F111-4174-A665-F58CDF142934}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "regchext", "src\regchext\regchext.vcxproj", "{767D21BE-A123-46CD-B5D6-E01714E2A981}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -176,6 +178,22 @@ {DF9957D4-3D95-4AC3-AD3F-DCBEA058F79D}.Testing Release|Win32.Build.0 = Testing Release|Win32 {DF9957D4-3D95-4AC3-AD3F-DCBEA058F79D}.Testing Release|x64.ActiveCfg = Testing Release|x64 {DF9957D4-3D95-4AC3-AD3F-DCBEA058F79D}.Testing Release|x64.Build.0 = Testing Release|x64 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Debug|Win32.ActiveCfg = Debug|Win32 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Debug|Win32.Build.0 = Debug|Win32 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Debug|x64.ActiveCfg = Debug|x64 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Debug|x64.Build.0 = Debug|x64 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Release|Win32.ActiveCfg = Release|Win32 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Release|Win32.Build.0 = Release|Win32 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Release|x64.ActiveCfg = Release|x64 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Release|x64.Build.0 = Release|x64 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Testing Debug|Win32.ActiveCfg = Testing Debug|Win32 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Testing Debug|Win32.Build.0 = Testing Debug|Win32 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Testing Debug|x64.ActiveCfg = Testing Debug|x64 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Testing Debug|x64.Build.0 = Testing Debug|x64 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Testing Release|Win32.ActiveCfg = Testing Release|Win32 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Testing Release|Win32.Build.0 = Testing Release|Win32 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Testing Release|x64.ActiveCfg = Testing Release|x64 + {767D21BE-A123-46CD-B5D6-E01714E2A981}.Testing Release|x64.Build.0 = Testing Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Index: src/chext/chext.cpp =================================================================== diff -u -rebc7fabbd2d59f9a0f723ea480b5374cc393ec12 -re2054db3fa2be3652ca376a318d49dbaba8539ed --- src/chext/chext.cpp (.../chext.cpp) (revision ebc7fabbd2d59f9a0f723ea480b5374cc393ec12) +++ src/chext/chext.cpp (.../chext.cpp) (revision e2054db3fa2be3652ca376a318d49dbaba8539ed) @@ -21,11 +21,9 @@ // run nmake -f CopyHandlerShellExtps.mk in the project directory. #include "stdafx.h" -#include "resource.h" #include "chext.h" #include "dllmain.h" #include "Logger.h" -#include "GuidFormatter.h" ///////////////////////////////////////////////////////////////////////////// // Used to determine whether the DLL can be unloaded by OLE Index: src/regchext/TComRegistrar.cpp =================================================================== diff -u --- src/regchext/TComRegistrar.cpp (revision 0) +++ src/regchext/TComRegistrar.cpp (revision e2054db3fa2be3652ca376a318d49dbaba8539ed) @@ -0,0 +1,116 @@ +// ============================================================================ +// Copyright (C) 2001-2016 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#include "stdafx.h" +#include "TComRegistrar.h" +#include + +TComRegistrar::TComRegistrar() +{ + DetectRegsvrPaths(); +} + +void TComRegistrar::RegisterNative(const wchar_t* pszPath, const wchar_t* pszDir) +{ + if(!PathFileExists(pszPath)) + throw std::runtime_error("File does not exist"); + + Register(pszPath, pszDir, m_strNativeRegsvrPath.c_str()); +} + +void TComRegistrar::UnregisterNative(const wchar_t* pszPath, const wchar_t* pszDir) +{ + if(!PathFileExists(pszPath)) + throw std::runtime_error("File does not exist"); + + Unregister(pszPath, pszDir, m_strNativeRegsvrPath.c_str()); +} + +#ifdef _WIN64 + +void TComRegistrar::Register32bit(const wchar_t* pszPath, const wchar_t* pszDir) +{ + if(!PathFileExists(pszPath)) + throw std::runtime_error("File does not exist"); + + Register(pszPath, pszDir, m_str32bitRegsvr.c_str()); +} + +void TComRegistrar::Unregister32bit(const wchar_t* pszPath, const wchar_t* pszDir) +{ + if(!PathFileExists(pszPath)) + throw std::runtime_error("File does not exist"); + + Unregister(pszPath, pszDir, m_str32bitRegsvr.c_str()); +} + +#endif + +bool TComRegistrar::Register(const wchar_t* pszPath, const wchar_t* pszDir, const wchar_t* pszRegsvrPath) +{ + // try with regsvr32 + SHELLEXECUTEINFO sei = { 0 }; + sei.cbSize = sizeof(sei); + sei.fMask = SEE_MASK_UNICODE; + sei.lpVerb = L"runas"; + sei.lpFile = pszRegsvrPath; + sei.lpDirectory = pszDir; + std::wstring strParams = std::wstring(L"/s \"") + pszPath + L"\""; + sei.lpParameters = strParams.c_str(); + sei.nShow = SW_SHOW; + + return ShellExecuteEx(&sei) != FALSE; +} + +bool TComRegistrar::Unregister(const wchar_t* pszPath, const wchar_t* pszDir, const wchar_t* pszRegsvrPath) +{ + // try with regsvr32 + SHELLEXECUTEINFO sei = { 0 }; + sei.cbSize = sizeof(sei); + sei.fMask = SEE_MASK_UNICODE; + sei.lpVerb = L"runas"; + sei.lpFile = pszRegsvrPath; + sei.lpDirectory = pszDir; + std::wstring strParams = std::wstring(L"/u /s \"") + pszPath + L"\""; + sei.lpParameters = strParams.c_str(); + sei.nShow = SW_SHOW; + + return ShellExecuteEx(&sei) != FALSE; +} + +void TComRegistrar::DetectRegsvrPaths() +{ + wchar_t szWindowsPath[ _MAX_PATH ] = { 0 }; + + if(GetWindowsDirectory(szWindowsPath, _MAX_PATH) == 0) + throw std::runtime_error("Cannot detect Windows directory"); + + std::wstring wstrWindowsPath = szWindowsPath; + if(*wstrWindowsPath.rbegin() != L'\\') + wstrWindowsPath += L'\\'; + + m_strNativeRegsvrPath = wstrWindowsPath + L"system32\\regsvr32.exe"; + if(!PathFileExists(m_strNativeRegsvrPath.c_str())) + throw std::runtime_error("Native regsvr32.exe does not exist"); + +#ifdef _WIN64 + m_str32bitRegsvr = wstrWindowsPath + L"SysWOW64\\regsvr32.exe"; + if(!PathFileExists(m_str32bitRegsvr.c_str())) + throw std::runtime_error("32bit regsvr32.exe does not exist"); +#endif +} Index: src/regchext/TComRegistrar.h =================================================================== diff -u --- src/regchext/TComRegistrar.h (revision 0) +++ src/regchext/TComRegistrar.h (revision e2054db3fa2be3652ca376a318d49dbaba8539ed) @@ -0,0 +1,48 @@ +// ============================================================================ +// Copyright (C) 2001-2016 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#ifndef __TCOMREGISTRAR_H__ +#define __TCOMREGISTRAR_H__ + +#include + +class TComRegistrar +{ +public: + TComRegistrar(); + + void RegisterNative(const wchar_t* pszPath, const wchar_t* pszDir); + void UnregisterNative(const wchar_t* pszPath, const wchar_t* pszDir); +#ifdef _WIN64 + void Register32bit(const wchar_t* pszPath, const wchar_t* pszDir); + void Unregister32bit(const wchar_t* pszPath, const wchar_t* pszDir); +#endif + +private: + void DetectRegsvrPaths(); + static bool Register(const wchar_t* pszPath, const wchar_t* pszDir, const wchar_t* pszRegsvrPath); + static bool Unregister(const wchar_t* pszPath, const wchar_t* pszDir, const wchar_t* pszRegsvrPath); + +private: + std::wstring m_strNativeRegsvrPath; +#ifdef _WIN64 + std::wstring m_str32bitRegsvr; +#endif +}; + +#endif Index: src/regchext/TExtensionDetector.cpp =================================================================== diff -u --- src/regchext/TExtensionDetector.cpp (revision 0) +++ src/regchext/TExtensionDetector.cpp (revision e2054db3fa2be3652ca376a318d49dbaba8539ed) @@ -0,0 +1,70 @@ +// ============================================================================ +// Copyright (C) 2001-2016 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#include "stdafx.h" +#include "TExtensionDetector.h" +#include + +#ifdef _WIN64 + #define DLL_NATIVE L"chext64.dll" + #define DLL_32BIT L"chext.dll" +#else + #define DLL_NATIVE L"chext.dll" +#endif + +TExtensionDetector::TExtensionDetector() +{ + DetectPaths(); +} + +void TExtensionDetector::DetectPaths() +{ + // get path of this file + const DWORD dwMaxPath = 32768; + wchar_t szThisPath[ dwMaxPath ]; + DWORD dwLen = GetModuleFileName(nullptr, szThisPath, dwMaxPath); + if(dwLen == 0) + throw std::runtime_error("Cannot retrieve program path"); + + szThisPath[ dwLen ] = L'\0'; + std::wstring wstrThisPath = szThisPath; + size_t stPos = wstrThisPath.find_last_of(L'\\'); + if(stPos != std::wstring::npos) + wstrThisPath.erase(wstrThisPath.begin() + stPos + 1, wstrThisPath.end()); + else if(*wstrThisPath.rbegin() != L'\\') + wstrThisPath += L'\\'; + + // find chext.dll/chext64.dll + m_strNativeExtension = wstrThisPath + DLL_NATIVE; + m_strNativeBasePath = wstrThisPath; + if(!PathFileExists(m_strNativeExtension.c_str())) + throw std::runtime_error("Native extension does not exist"); + +#ifdef _WIN64 + m_str32bitExtension = wstrThisPath + DLL_32BIT; + m_str32bitBasePath = wstrThisPath; + + if(!PathFileExists(m_strNativeExtension.c_str())) + { + m_str32bitExtension = wstrThisPath + L"ShellExt32\\" + DLL_32BIT; + m_str32bitBasePath = wstrThisPath + L"ShellExt32\\"; + if(!PathFileExists(m_strNativeExtension.c_str())) + throw std::runtime_error("32bit extension does not exist"); + } +#endif +} Index: src/regchext/TExtensionDetector.h =================================================================== diff -u --- src/regchext/TExtensionDetector.h (revision 0) +++ src/regchext/TExtensionDetector.h (revision e2054db3fa2be3652ca376a318d49dbaba8539ed) @@ -0,0 +1,48 @@ +// ============================================================================ +// Copyright (C) 2001-2016 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#ifndef __TEXTENSIONDETECTOR_H__ +#define __TEXTENSIONDETECTOR_H__ + +#include + +class TExtensionDetector +{ +public: + TExtensionDetector(); + + const std::wstring& GetNativeExtension() const { return m_strNativeExtension; } + const std::wstring& GetNativeBasePath() const { return m_strNativeBasePath; } +#ifdef _WIN64 + const std::wstring& Get32bitExtension() const { return m_str32bitExtension; } + const std::wstring& Get32bitBasePath() const { return m_str32bitBasePath; } +#endif + +private: + void DetectPaths(); + +private: + std::wstring m_strNativeExtension; + std::wstring m_strNativeBasePath; +#ifdef _WIN64 + std::wstring m_str32bitExtension; + std::wstring m_str32bitBasePath; +#endif +}; + +#endif Index: src/regchext/regchext.cpp =================================================================== diff -u --- src/regchext/regchext.cpp (revision 0) +++ src/regchext/regchext.cpp (revision e2054db3fa2be3652ca376a318d49dbaba8539ed) @@ -0,0 +1,66 @@ +// ============================================================================ +// Copyright (C) 2001-2016 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#include "stdafx.h" +#include +#include "TExtensionDetector.h" +#include "TComRegistrar.h" + +int APIENTRY wWinMain(_In_ HINSTANCE /*hInstance*/, + _In_opt_ HINSTANCE /*hPrevInstance*/, + _In_ LPWSTR /*lpCmdLine*/, + _In_ int /*nCmdShow*/) +{ + bool bRegister = true; + + int argc = __argc; + if(argc > 1) + { + const wchar_t* pszParam = __wargv[ 1 ]; + std::wstring wstrParam = pszParam; + if(wstrParam == L"/u" || wstrParam == L"/U") + bRegister = false; + } + + try + { + TExtensionDetector extensions; + TComRegistrar registrar; + + if(bRegister) + { +#ifdef _WIN64 + registrar.Register32bit(extensions.Get32bitExtension().c_str(), extensions.Get32bitBasePath().c_str()); +#endif + registrar.RegisterNative(extensions.GetNativeExtension().c_str(), extensions.GetNativeBasePath().c_str()); + } + else + { +#ifdef _WIN64 + registrar.Unregister32bit(extensions.Get32bitExtension().c_str(), extensions.Get32bitBasePath().c_str()); +#endif + registrar.UnregisterNative(extensions.GetNativeExtension().c_str(), extensions.GetNativeBasePath().c_str()); + } + } + catch(const std::exception&) + { + return 1; + } + + return 0; +} Index: src/regchext/regchext.rc =================================================================== diff -u --- src/regchext/regchext.rc (revision 0) +++ src/regchext/regchext.rc (revision e2054db3fa2be3652ca376a318d49dbaba8539ed) @@ -0,0 +1,91 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define _USING_V110_SDK71_ 1 +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_MAINFRAME ICON "res\\regchext.ico" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#define _USING_V110_SDK71_ 1\r\n" + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#define _AFX_NO_SPLITTER_RESOURCES\r\n" + "#define _AFX_NO_OLE_RESOURCES\r\n" + "#define _AFX_NO_TRACKER_RESOURCES\r\n" + "#define _AFX_NO_PROPERTY_RESOURCES\r\n" + "\r\n" + "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" + "#if defined(_WIN32) || defined(_WIN64)\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif\r\n" + "#include ""res\\regchext.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\0" +END + +#endif // APSTUDIO_INVOKED + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#define _AFX_NO_SPLITTER_RESOURCES +#define _AFX_NO_OLE_RESOURCES +#define _AFX_NO_TRACKER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#if defined(_WIN32) || defined(_WIN64) +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif +#include "res\regchext.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + Index: src/regchext/regchext.vcxproj =================================================================== diff -u --- src/regchext/regchext.vcxproj (revision 0) +++ src/regchext/regchext.vcxproj (revision e2054db3fa2be3652ca376a318d49dbaba8539ed) @@ -0,0 +1,570 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + Testing Debug + Win32 + + + Testing Debug + x64 + + + Testing Release + Win32 + + + Testing Release + x64 + + + + regchext + {767D21BE-A123-46CD-B5D6-E01714E2A981} + regchext + MFCProj + + + + Application + v120_xp + false + Unicode + + + Application + v120_xp + false + Unicode + + + Application + v120_xp + false + Unicode + + + Application + v120_xp + false + Unicode + + + Application + v120_xp + false + Unicode + + + Application + v120_xp + false + Unicode + + + Application + v120_xp + false + Unicode + + + Application + v120_xp + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>11.0.51106.1 + + + $(SolutionDir)bin\$(Configuration)\ + $(SolutionDir)intermediate\$(PlatformToolset)\$(Platform)\$(ProjectName)_$(Configuration)\ + true + + + $(SolutionDir)bin\$(Configuration)\ + $(SolutionDir)intermediate\$(PlatformToolset)\$(Platform)\$(ProjectName)_$(Configuration)\ + true + + + $(SolutionDir)bin\$(Configuration)\ + $(SolutionDir)intermediate\$(PlatformToolset)\$(Platform)\$(ProjectName)_$(Configuration)\ + true + $(ProjectName)64 + false + NativeRecommendedRules.ruleset + + + $(SolutionDir)bin\$(Configuration)\ + $(SolutionDir)intermediate\$(PlatformToolset)\$(Platform)\$(ProjectName)_$(Configuration)\ + true + $(ProjectName)64 + false + NativeRecommendedRules.ruleset + + + $(SolutionDir)bin\$(Configuration)\ + $(SolutionDir)intermediate\$(PlatformToolset)\$(Platform)\$(ProjectName)_$(Configuration)\ + false + + + $(SolutionDir)bin\$(Configuration)\ + $(SolutionDir)intermediate\$(PlatformToolset)\$(Platform)\$(ProjectName)_$(Configuration)\ + false + + + $(SolutionDir)bin\$(Configuration)\ + $(SolutionDir)intermediate\$(PlatformToolset)\$(Platform)\$(ProjectName)_$(Configuration)\ + false + $(ProjectName)64 + + + $(SolutionDir)bin\$(Configuration)\ + $(SolutionDir)intermediate\$(PlatformToolset)\$(Platform)\$(ProjectName)_$(Configuration)\ + false + $(ProjectName)64 + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/ch.tlb + + + + /Zm150 %(AdditionalOptions) + Disabled + WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + Use + Level4 + true + ProgramDatabase + true + false + NoExtensions + 4714 + true + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + Shlwapi.lib;%(AdditionalDependencies) + true + Windows + MachineX86 + "$(OutDir)" + true + RequireAdministrator + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/ch.tlb + + + + + /Zm150 %(AdditionalOptions) + Disabled + ..\..\ext\googletest\googletest\include;..\..\ext\googletest\googlemock\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;_SCL_SECURE_NO_WARNINGS;TESTING;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + Use + Level4 + true + ProgramDatabase + true + false + NoExtensions + 4714 + true + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + Shlwapi.lib;gmock32d.lib;%(AdditionalDependencies) + true + Console + MachineX86 + "$(OutDir)" + true + RequireAdministrator + + + cd "$(TargetDir)" +"$(TargetPath)" --gtest_shuffle --gtest_output="xml:$(TargetPath).UnitTests.xml" + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/ch.tlb + + + + /Zm150 %(AdditionalOptions) + Disabled + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + Use + Level4 + true + ProgramDatabase + 4714 + false + true + false + true + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + Shlwapi.lib;%(AdditionalDependencies) + true + Windows + MachineX64 + "$(OutDir)" + false + RequireAdministrator + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/ch.tlb + + + + + /Zm150 %(AdditionalOptions) + Disabled + ..\..\ext\googletest\googletest\include;..\..\ext\googletest\googlemock\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;_SCL_SECURE_NO_WARNINGS;TESTING;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + Use + Level4 + true + ProgramDatabase + 4714 + false + true + false + true + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + Shlwapi.lib;gmock64d.lib;%(AdditionalDependencies) + true + Console + MachineX64 + "$(OutDir)" + false + RequireAdministrator + + + cd "$(TargetDir)" +"$(TargetPath)" --gtest_shuffle --gtest_output="xml:$(TargetPath).UnitTests.xml" + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/ch.tlb + + + + /Zm150 %(AdditionalOptions) + MaxSpeed + AnySuitable + WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Use + Level4 + true + ProgramDatabase + true + NoExtensions + 4714 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + Shlwapi.lib;%(AdditionalDependencies) + true + Windows + MachineX86 + "$(OutDir)" + true + RequireAdministrator + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/ch.tlb + + + + + /Zm150 %(AdditionalOptions) + MaxSpeed + AnySuitable + ..\..\ext\googletest\googletest\include;..\..\ext\googletest\googlemock\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;_SCL_SECURE_NO_WARNINGS;TESTING;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Use + Level4 + true + ProgramDatabase + true + NoExtensions + 4714 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + Shlwapi.lib;gmock32.lib;%(AdditionalDependencies) + true + Console + MachineX86 + "$(OutDir)" + true + RequireAdministrator + + + cd "$(TargetDir)" +"$(TargetPath)" --gtest_shuffle --gtest_output="xml:$(TargetPath).UnitTests.xml" + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/ch.tlb + + + + /Zm150 %(AdditionalOptions) + Disabled + AnySuitable + WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Use + Level4 + true + ProgramDatabase + true + 4714 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + Shlwapi.lib;%(AdditionalDependencies) + true + Windows + MachineX64 + "$(OutDir)" + false + RequireAdministrator + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/ch.tlb + + + + + /Zm150 %(AdditionalOptions) + Disabled + AnySuitable + ..\..\ext\googletest\googletest\include;..\..\ext\googletest\googlemock\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_BIND_TO_CURRENT_VCLIBS_VERSION=1;_SCL_SECURE_NO_WARNINGS;TESTING;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + Use + Level4 + true + ProgramDatabase + true + 4714 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + Shlwapi.lib;gmock64.lib;%(AdditionalDependencies) + true + Console + MachineX64 + "$(OutDir)" + false + RequireAdministrator + + + cd "$(TargetDir)" +"$(TargetPath)" --gtest_shuffle --gtest_output="xml:$(TargetPath).UnitTests.xml" + + + + + + + + + + + + true + true + true + true + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: src/regchext/regchext.vcxproj.filters =================================================================== diff -u --- src/regchext/regchext.vcxproj.filters (revision 0) +++ src/regchext/regchext.vcxproj.filters (revision e2054db3fa2be3652ca376a318d49dbaba8539ed) @@ -0,0 +1,63 @@ + + + + + {975a87bd-0ec7-4217-b479-1350141697e0} + + + {8240899a-4d08-4b2e-9a11-aaed5b0793c3} + + + {ea9da771-9f6a-486f-8894-970b51c0d360} + + + {cb5ebc60-034c-4dd1-a3a9-8552f03a5144} + + + + + Resource Files + + + + + Resource Files + + + + + Resource Files + + + + + Source Files\Main + + + Source Files + + + Tests + + + Source Files + + + Source Files + + + + + Source Files\Main + + + Source Files + + + Source Files + + + Resource Files + + + \ No newline at end of file Index: src/regchext/res/regchext.ico =================================================================== diff -u Binary files differ Index: src/regchext/res/regchext.rc2 =================================================================== diff -u --- src/regchext/res/regchext.rc2 (revision 0) +++ src/regchext/res/regchext.rc2 (revision e2054db3fa2be3652ca376a318d49dbaba8539ed) @@ -0,0 +1,55 @@ +// +// ch.rc2 - resources Microsoft Visual C++ does not edit directly +// + +#ifdef APSTUDIO_INVOKED + #error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + +#include "../common/version.h" + +///////////////////////////////////////////////////////////////////////////// +// Add manually edited resources here... +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION PRODUCT_VERSION1, PRODUCT_VERSION2, PRODUCT_VERSION3, PRODUCT_VERSION4 + PRODUCTVERSION PRODUCT_VERSION1, PRODUCT_VERSION2, PRODUCT_VERSION3, PRODUCT_VERSION4 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x29L +#else + FILEFLAGS 0x28L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "Comments", "Program for copying files/folders" + VALUE "CompanyName", " " + VALUE "FileDescription", PRODUCT_FULL_VERSION + VALUE "FileVersion", PRODUCT_VERSION + VALUE "InternalName", PRODUCT_NAME + VALUE "LegalCopyright", COPYRIGHT_INFO + VALUE "LegalTrademarks", " " + VALUE "OriginalFilename", "Copy Handler.EXE" + VALUE "PrivateBuild", " " + VALUE "ProductName", PRODUCT_FULL_VERSION + VALUE "ProductVersion", PRODUCT_VERSION + VALUE "SpecialBuild", " " + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +///////////////////////////////////////////////////////////////////////////// Index: src/regchext/resource.h =================================================================== diff -u --- src/regchext/resource.h (revision 0) +++ src/regchext/resource.h (revision e2054db3fa2be3652ca376a318d49dbaba8539ed) @@ -0,0 +1,6 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by regchext.rc +// + +#define IDI_MAINFRAME 100 Index: src/regchext/stdafx.cpp =================================================================== diff -u --- src/regchext/stdafx.cpp (revision 0) +++ src/regchext/stdafx.cpp (revision e2054db3fa2be3652ca376a318d49dbaba8539ed) @@ -0,0 +1,19 @@ +// ============================================================================ +// Copyright (C) 2001-2016 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#include "stdafx.h" Index: src/regchext/stdafx.h =================================================================== diff -u --- src/regchext/stdafx.h (revision 0) +++ src/regchext/stdafx.h (revision e2054db3fa2be3652ca376a318d49dbaba8539ed) @@ -0,0 +1,29 @@ +// ============================================================================ +// Copyright (C) 2001-2016 by Jozef Starosczyk +// ixen@copyhandler.com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#ifndef __STDAFX_H__ +#define __STDAFX_H__ + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers +#define NOMINMAX + +#include "../common/targetver.h" + +#include + +#endif