diff --git a/Dllmain/BuildNo.rc b/Dllmain/BuildNo.rc index ca8a7877..57dda37f 100644 --- a/Dllmain/BuildNo.rc +++ b/Dllmain/BuildNo.rc @@ -1 +1 @@ -#define BUILD_NUMBER 2381 +#define BUILD_NUMBER 2382 diff --git a/Stub/BuildNo.rc b/Stub/BuildNo.rc index b8c07d5e..9958f2ed 100644 --- a/Stub/BuildNo.rc +++ b/Stub/BuildNo.rc @@ -1 +1 @@ -#define BUILD_NUMBER 140 +#define BUILD_NUMBER 141 diff --git a/Wrappers/wrapper.cpp b/Wrappers/wrapper.cpp index 959dd026..ad3193f3 100644 --- a/Wrappers/wrapper.cpp +++ b/Wrappers/wrapper.cpp @@ -16,6 +16,7 @@ #define WIN32_LEAN_AND_MEAN #include +#include #include #include @@ -77,13 +78,26 @@ } \ } -#include "wrapper.h" - namespace Wrapper { + struct wrapper_map + { + FARPROC Proc; + FARPROC *val; + }; + + // Forward function decalration + HRESULT __stdcall _jmpaddr(); + HRESULT __stdcall _jmpaddrvoid(); + + // Varable decalration + constexpr FARPROC jmpaddr = (FARPROC)*_jmpaddr; + constexpr FARPROC jmpaddrvoid = (FARPROC)*_jmpaddrvoid; std::vector jmpArray; } +#include "wrapper.h" + __declspec(naked) HRESULT __stdcall Wrapper::_jmpaddrvoid() { __asm diff --git a/Wrappers/wrapper.h b/Wrappers/wrapper.h index 83340d2c..2c4d2ced 100644 --- a/Wrappers/wrapper.h +++ b/Wrappers/wrapper.h @@ -1,25 +1,7 @@ #pragma once -#include - namespace Wrapper { - struct wrapper_map - { - FARPROC Proc; - FARPROC *val; - }; - - // Forward function decalration - HRESULT __stdcall _jmpaddr(); - HRESULT __stdcall _jmpaddrvoid(); - - // Varable decalration - constexpr FARPROC jmpaddr = (FARPROC)*_jmpaddr; - constexpr FARPROC jmpaddrvoid = (FARPROC)*_jmpaddrvoid; - extern std::vector jmpArray; - - // Shared Functions bool ValidProcAddress(FARPROC ProcAddress); void ShimProc(FARPROC &var, FARPROC in, FARPROC &out); HMODULE CreateWrapper(const char *ProxyDll, const char *WrapperMode);