From d159db4d985331e61179c96602af0019d84fc7c8 Mon Sep 17 00:00:00 2001 From: namazso Date: Sat, 24 Jun 2023 21:12:37 +0200 Subject: [PATCH] Fix exports so that it's actually a shell extension --- LegacyAlgorithms/LegacyHasher.cpp | 2 +- OpenHashTab/CMakeLists.txt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/LegacyAlgorithms/LegacyHasher.cpp b/LegacyAlgorithms/LegacyHasher.cpp index 5eac137d..69eceebb 100644 --- a/LegacyAlgorithms/LegacyHasher.cpp +++ b/LegacyAlgorithms/LegacyHasher.cpp @@ -210,7 +210,7 @@ struct AlgorithmsDll ~AlgorithmsDll() = default; }; -__declspec(dllexport) const AlgorithmsDll& get_algorithms_dll() +const AlgorithmsDll& get_algorithms_dll() { static AlgorithmsDll algorithms_dll; return algorithms_dll; diff --git a/OpenHashTab/CMakeLists.txt b/OpenHashTab/CMakeLists.txt index 1fa816cf..83c4fc47 100644 --- a/OpenHashTab/CMakeLists.txt +++ b/OpenHashTab/CMakeLists.txt @@ -28,6 +28,11 @@ target_compile_options(OpenHashTab PRIVATE /EHsc ) +target_link_options(OpenHashTab PRIVATE + /EXPORT:DllCanUnloadNow + /EXPORT:DllGetClassObject + ) + target_precompile_headers(OpenHashTab PRIVATE stdafx.h) add_custom_command(TARGET OpenHashTab POST_BUILD