diff options
Diffstat (limited to 'zen/FindFilePlus')
-rw-r--r-- | zen/FindFilePlus/dll_main.cpp | 2 | ||||
-rw-r--r-- | zen/FindFilePlus/find_file_plus.cpp | 13 | ||||
-rw-r--r-- | zen/FindFilePlus/find_file_plus.h | 3 | ||||
-rw-r--r-- | zen/FindFilePlus/init_dll_binding.h | 2 | ||||
-rw-r--r-- | zen/FindFilePlus/load_dll.cpp | 2 | ||||
-rw-r--r-- | zen/FindFilePlus/load_dll.h | 2 |
6 files changed, 15 insertions, 9 deletions
diff --git a/zen/FindFilePlus/dll_main.cpp b/zen/FindFilePlus/dll_main.cpp index a7637be4..ab3b25a3 100644 --- a/zen/FindFilePlus/dll_main.cpp +++ b/zen/FindFilePlus/dll_main.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) ZenJu (zenju AT gmx DOT de) - All Rights Reserved * +// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** diff --git a/zen/FindFilePlus/find_file_plus.cpp b/zen/FindFilePlus/find_file_plus.cpp index 9b146008..5fc1a538 100644 --- a/zen/FindFilePlus/find_file_plus.cpp +++ b/zen/FindFilePlus/find_file_plus.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) ZenJu (zenju AT gmx DOT de) - All Rights Reserved * +// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "find_file_plus.h" @@ -9,8 +9,8 @@ //#include <windows.h> //these two don't play nice with each other #include "load_dll.h" #include <zen/scope_guard.h> - -#include <cstdio> +#include <new> +//#include <cstdio> using namespace dll; using namespace findplus; @@ -357,13 +357,18 @@ FindHandle findplus::openDir(const wchar_t* dirname) { try { - return new FileSearcher(dirname); //throw NtFileError + return new FileSearcher(dirname); //throw NtFileError, std::bad_alloc } catch (const NtFileError& e) { setWin32Error(rtlNtStatusToDosError(e.ntError)); return nullptr; } + catch (const std::bad_alloc&) //not unlikely in this context! => handle! + { + setWin32Error(rtlNtStatusToDosError(STATUS_NO_MEMORY)); + return nullptr; + } } diff --git a/zen/FindFilePlus/find_file_plus.h b/zen/FindFilePlus/find_file_plus.h index a2f61cdc..a26bdeb3 100644 --- a/zen/FindFilePlus/find_file_plus.h +++ b/zen/FindFilePlus/find_file_plus.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) ZenJu (zenju AT gmx DOT de) - All Rights Reserved * +// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef FIND_FIRST_FILE_PLUS_HEADER_087483434 @@ -87,5 +87,6 @@ const char funName_closeDir[] = "closeDir"; inline const wchar_t* getDllName() { return zen::is64BitBuild ? L"FindFilePlus_x64.dll" : L"FindFilePlus_Win32.dll"; } } +#undef DLL_FUNCTION_DECLARATION #endif //FIND_FIRST_FILE_PLUS_HEADER_087483434 diff --git a/zen/FindFilePlus/init_dll_binding.h b/zen/FindFilePlus/init_dll_binding.h index 993a3790..44591ab4 100644 --- a/zen/FindFilePlus/init_dll_binding.h +++ b/zen/FindFilePlus/init_dll_binding.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) ZenJu (zenju AT gmx DOT de) - All Rights Reserved * +// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef INIT_DLL_BINDING_HEADER_ß018356031467832145 diff --git a/zen/FindFilePlus/load_dll.cpp b/zen/FindFilePlus/load_dll.cpp index 5f72e31b..c9396f6d 100644 --- a/zen/FindFilePlus/load_dll.cpp +++ b/zen/FindFilePlus/load_dll.cpp @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) ZenJu (zenju AT gmx DOT de) - All Rights Reserved * +// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #include "load_dll.h" diff --git a/zen/FindFilePlus/load_dll.h b/zen/FindFilePlus/load_dll.h index ce414733..d661c4b9 100644 --- a/zen/FindFilePlus/load_dll.h +++ b/zen/FindFilePlus/load_dll.h @@ -1,7 +1,7 @@ // ************************************************************************** // * This file is part of the FreeFileSync project. It is distributed under * // * GNU General Public License: http://www.gnu.org/licenses/gpl.html * -// * Copyright (C) ZenJu (zenju AT gmx DOT de) - All Rights Reserved * +// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** #ifndef LOAD_DLL_HEADER_0312463214872163832174 |