diff --git a/CcMainDll/.vs/CcMainDll/v15/.suo b/CcMainDll/.vs/CcMainDll/v15/.suo index cbdf3b0..e4993f5 100644 Binary files a/CcMainDll/.vs/CcMainDll/v15/.suo and b/CcMainDll/.vs/CcMainDll/v15/.suo differ diff --git a/CcMainDll/CcMainDll.sln b/CcMainDll/CcMainDll.sln index 2c2c7ff..4515cfc 100644 --- a/CcMainDll/CcMainDll.sln +++ b/CcMainDll/CcMainDll.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 15.0.28307.1082 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CcMainDll", "CcMainDll\CcMainDll.vcxproj", "{912043E1-526F-4C23-AF8B-0D76C07F5723}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLoadDll", "TestLoadDll\TestLoadDll.vcxproj", "{7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -21,6 +23,14 @@ Global {912043E1-526F-4C23-AF8B-0D76C07F5723}.Release|x64.Build.0 = Release|x64 {912043E1-526F-4C23-AF8B-0D76C07F5723}.Release|x86.ActiveCfg = Release|Win32 {912043E1-526F-4C23-AF8B-0D76C07F5723}.Release|x86.Build.0 = Release|Win32 + {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Debug|x64.ActiveCfg = Debug|x64 + {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Debug|x64.Build.0 = Debug|x64 + {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Debug|x86.ActiveCfg = Debug|Win32 + {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Debug|x86.Build.0 = Debug|Win32 + {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Release|x64.ActiveCfg = Release|x64 + {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Release|x64.Build.0 = Release|x64 + {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Release|x86.ActiveCfg = Release|Win32 + {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/CcMainDll/TestLoadDll/Debug/TestLoadDll.log b/CcMainDll/TestLoadDll/Debug/TestLoadDll.log new file mode 100644 index 0000000..462cbac --- /dev/null +++ b/CcMainDll/TestLoadDll/Debug/TestLoadDll.log @@ -0,0 +1,3 @@ +C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。 + TestLoadDll.cpp + TestLoadDll.vcxproj -> F:\myapp\CcRemote\CcMainDll\TestLoadDll\..\..\bin\server\TestLoadDll.exe diff --git a/CcMainDll/TestLoadDll/Debug/TestLoadDll.tlog/TestLoadDll.lastbuildstate b/CcMainDll/TestLoadDll/Debug/TestLoadDll.tlog/TestLoadDll.lastbuildstate new file mode 100644 index 0000000..bd1e4f2 --- /dev/null +++ b/CcMainDll/TestLoadDll/Debug/TestLoadDll.tlog/TestLoadDll.lastbuildstate @@ -0,0 +1,2 @@ +#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0 +Debug|Win32|F:\myapp\CcRemote\CcMainDll\| diff --git a/CcMainDll/TestLoadDll/Release/TestLoadDll.Build.CppClean.log b/CcMainDll/TestLoadDll/Release/TestLoadDll.Build.CppClean.log new file mode 100644 index 0000000..566c1c1 --- /dev/null +++ b/CcMainDll/TestLoadDll/Release/TestLoadDll.Build.CppClean.log @@ -0,0 +1 @@ +f:\myapp\ccremote\ccmaindll\testloaddll\..\..\bin\server\testloaddll.exe diff --git a/CcMainDll/TestLoadDll/Release/TestLoadDll.log b/CcMainDll/TestLoadDll/Release/TestLoadDll.log new file mode 100644 index 0000000..40277e4 --- /dev/null +++ b/CcMainDll/TestLoadDll/Release/TestLoadDll.log @@ -0,0 +1,6 @@ +C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(377,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。 + TestLoadDll.cpp + 正在生成代码 + All 171 functions were compiled because no usable IPDB/IOBJ from previous compilation was found. + 已完成代码的生成 + TestLoadDll.vcxproj -> F:\myapp\CcRemote\CcMainDll\TestLoadDll\..\..\bin\server\TestLoadDll.exe diff --git a/CcMainDll/TestLoadDll/Release/TestLoadDll.tlog/TestLoadDll.lastbuildstate b/CcMainDll/TestLoadDll/Release/TestLoadDll.tlog/TestLoadDll.lastbuildstate new file mode 100644 index 0000000..3f4a20c --- /dev/null +++ b/CcMainDll/TestLoadDll/Release/TestLoadDll.tlog/TestLoadDll.lastbuildstate @@ -0,0 +1,2 @@ +#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17763.0 +Release|Win32|F:\myapp\CcRemote\CcMainDll\| diff --git a/CcMainDll/TestLoadDll/TestLoadDll.cpp b/CcMainDll/TestLoadDll/TestLoadDll.cpp new file mode 100644 index 0000000..5265369 --- /dev/null +++ b/CcMainDll/TestLoadDll/TestLoadDll.cpp @@ -0,0 +1,24 @@ +// TestLoadDll.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 +// + +#include +#include + +int main() +{ + std::cout << "Hello World!\n"; + + //载入服务端dll hijack test + HMODULE hServerDll = LoadLibrary(".\\..\\..\\bin\\server\\CcMainDll.dll"); + + //声明导出函数类型--导出的TestRun函数 + typedef void(_cdecl *TestRunT)(); + //寻找dll中导出函数 + TestRunT pReflectiveLoader = (TestRunT)GetProcAddress(hServerDll, "ReflectiveLoader"); + //判断函数是否为空 + if (pReflectiveLoader != NULL) + { + pReflectiveLoader(); //调用这个函数 + } + +} diff --git a/CcMainDll/TestLoadDll/TestLoadDll.vcxproj b/CcMainDll/TestLoadDll/TestLoadDll.vcxproj new file mode 100644 index 0000000..a3c364d --- /dev/null +++ b/CcMainDll/TestLoadDll/TestLoadDll.vcxproj @@ -0,0 +1,164 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {7FD3FB3F-5E07-4F67-9A94-9A8507044D8B} + Win32Proj + TestLoadDll + 10.0.17763.0 + + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + false + ..\..\bin\server + + + true + ..\..\bin\server + + + true + + + false + + + + + + Level3 + MaxSpeed + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + + + Console + true + true + true + + + + + + + Level3 + Disabled + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + Default + + + Console + true + + + + + + + Level3 + Disabled + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + + Level3 + MaxSpeed + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/CcMainDll/TestLoadDll/TestLoadDll.vcxproj.filters b/CcMainDll/TestLoadDll/TestLoadDll.vcxproj.filters new file mode 100644 index 0000000..626e4f1 --- /dev/null +++ b/CcMainDll/TestLoadDll/TestLoadDll.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + 源文件 + + + \ No newline at end of file diff --git a/CcMainDll/TestLoadDll/TestLoadDll.vcxproj.user b/CcMainDll/TestLoadDll/TestLoadDll.vcxproj.user new file mode 100644 index 0000000..be25078 --- /dev/null +++ b/CcMainDll/TestLoadDll/TestLoadDll.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/bin/server/CcMainDll.dll b/bin/server/CcMainDll.dll index ffb3fa0..740d5c5 100644 Binary files a/bin/server/CcMainDll.dll and b/bin/server/CcMainDll.dll differ diff --git a/bin/server/TestLoadDll.exe b/bin/server/TestLoadDll.exe index 8ab23d7..7bd8b28 100644 Binary files a/bin/server/TestLoadDll.exe and b/bin/server/TestLoadDll.exe differ