From 91f1db5ac80c674ec057bc69bc1964ec390d54c6 Mon Sep 17 00:00:00 2001 From: zeffy Date: Sun, 27 Aug 2017 19:33:03 -0700 Subject: [PATCH] fix x86 build --- wufuc/patchwua.c | 1 + wufuc/rundll32.c | 2 -- wufuc/wufuc.def | 3 +++ wufuc/wufuc.vcxproj | 11 +++++++++++ wufuc/wufuc.vcxproj.filters | 3 +++ wufuc_aihelper/aihelper.c | 1 - wufuc_aihelper/wufuc_aihelper.def | 2 ++ wufuc_aihelper/wufuc_aihelper.vcxproj | 7 +++++++ 8 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 wufuc/wufuc.def create mode 100644 wufuc_aihelper/wufuc_aihelper.def diff --git a/wufuc/patchwua.c b/wufuc/patchwua.c index 4b42aa6..60cb8f4 100644 --- a/wufuc/patchwua.c +++ b/wufuc/patchwua.c @@ -1,5 +1,6 @@ #include "patchwua.h" +#include "helpers.h" #include "patternfind.h" #include "logging.h" diff --git a/wufuc/rundll32.c b/wufuc/rundll32.c index 51c34d3..fb05de9 100644 --- a/wufuc/rundll32.c +++ b/wufuc/rundll32.c @@ -7,7 +7,6 @@ #include #include -__declspec(dllexport) void CALLBACK Rundll32Entry(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow) { HANDLE hEvent = OpenEvent(SYNCHRONIZE, FALSE, _T("Global\\wufuc_UnloadEvent")); if ( hEvent ) { @@ -74,7 +73,6 @@ void CALLBACK Rundll32Entry(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int n CloseHandle(hProcess); } -__declspec(dllexport) void CALLBACK Rundll32Unload(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow) { HANDLE hEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE, _T("Global\\wufuc_UnloadEvent")); if ( hEvent ) { diff --git a/wufuc/wufuc.def b/wufuc/wufuc.def new file mode 100644 index 0000000..17c0f4f --- /dev/null +++ b/wufuc/wufuc.def @@ -0,0 +1,3 @@ +EXPORTS + Rundll32Entry + Rundll32Unload diff --git a/wufuc/wufuc.vcxproj b/wufuc/wufuc.vcxproj index 57e6622..64b214f 100644 --- a/wufuc/wufuc.vcxproj +++ b/wufuc/wufuc.vcxproj @@ -104,10 +104,12 @@ Disabled WIN32;_DEBUG;_WINDOWS;_USRDLL;WUFUC_EXPORTS;%(PreprocessorDefinitions) MultiThreadedDebug + CompileAsC Windows %(AdditionalDependencies) + wufuc.def @@ -116,10 +118,12 @@ Disabled _DEBUG;_WINDOWS;_USRDLL;WUFUC_EXPORTS;%(PreprocessorDefinitions) MultiThreadedDebug + CompileAsC Windows %(AdditionalDependencies) + wufuc.def @@ -130,6 +134,7 @@ true WIN32;NDEBUG;_WINDOWS;_USRDLL;WUFUC_EXPORTS;%(PreprocessorDefinitions) MultiThreaded + CompileAsC BUILD_VERSION=$(BUILD_VERSION);BUILD_VERSION_COMMA_SEP=$(BUILD_VERSION_COMMA_SEP);$(PreprocessorDefinitions) @@ -140,6 +145,7 @@ true false %(AdditionalDependencies) + wufuc.def @@ -154,6 +160,7 @@ true NDEBUG;_WINDOWS;_USRDLL;WUFUC_EXPORTS;%(PreprocessorDefinitions) MultiThreaded + CompileAsC BUILD_VERSION=$(BUILD_VERSION);BUILD_VERSION_COMMA_SEP=$(BUILD_VERSION_COMMA_SEP);$(PreprocessorDefinitions) @@ -164,6 +171,7 @@ true false %(AdditionalDependencies) + wufuc.def @@ -198,6 +206,9 @@ + + + diff --git a/wufuc/wufuc.vcxproj.filters b/wufuc/wufuc.vcxproj.filters index e1388f1..08d9026 100644 --- a/wufuc/wufuc.vcxproj.filters +++ b/wufuc/wufuc.vcxproj.filters @@ -28,4 +28,7 @@ + + + \ No newline at end of file diff --git a/wufuc_aihelper/aihelper.c b/wufuc_aihelper/aihelper.c index 0191667..80ac186 100644 --- a/wufuc_aihelper/aihelper.c +++ b/wufuc_aihelper/aihelper.c @@ -2,7 +2,6 @@ #include #include -__declspec(dllexport) UINT __stdcall AIHelper_SetUnloadEvent(MSIHANDLE hInstall) { HANDLE hEvent = OpenEvent(EVENT_MODIFY_STATE, FALSE, _T("Global\\wufuc_UnloadEvent")); if ( hEvent ) { diff --git a/wufuc_aihelper/wufuc_aihelper.def b/wufuc_aihelper/wufuc_aihelper.def new file mode 100644 index 0000000..f4045dc --- /dev/null +++ b/wufuc_aihelper/wufuc_aihelper.def @@ -0,0 +1,2 @@ +EXPORTS + AIHelper_SetUnloadEvent diff --git a/wufuc_aihelper/wufuc_aihelper.vcxproj b/wufuc_aihelper/wufuc_aihelper.vcxproj index d763f7a..d68dd78 100644 --- a/wufuc_aihelper/wufuc_aihelper.vcxproj +++ b/wufuc_aihelper/wufuc_aihelper.vcxproj @@ -111,6 +111,7 @@ true Msi.lib;%(AdditionalDependencies) false + wufuc_aihelper.def @@ -122,6 +123,7 @@ Windows + wufuc_aihelper.def @@ -133,6 +135,7 @@ Windows + wufuc_aihelper.def @@ -150,12 +153,16 @@ true Msi.lib;%(AdditionalDependencies) false + wufuc_aihelper.def + + +