From cff95bda88084f9af4e4663b8b3f39d5c0264219 Mon Sep 17 00:00:00 2001 From: khz_df Date: Tue, 14 May 2019 19:48:01 +0800 Subject: [PATCH] =?UTF-8?q?[tools]=20which=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/tools/tools.sln | 31 +++++ tools/tools/tools/pch.cpp | 5 + tools/tools/tools/pch.h | 14 ++ tools/tools/tools/tools.cpp | 38 ++++++ tools/tools/tools/tools.vcxproj | 168 ++++++++++++++++++++++++ tools/tools/tools/tools.vcxproj.filters | 30 +++++ 6 files changed, 286 insertions(+) create mode 100644 tools/tools/tools.sln create mode 100644 tools/tools/tools/pch.cpp create mode 100644 tools/tools/tools/pch.h create mode 100644 tools/tools/tools/tools.cpp create mode 100644 tools/tools/tools/tools.vcxproj create mode 100644 tools/tools/tools/tools.vcxproj.filters diff --git a/tools/tools/tools.sln b/tools/tools/tools.sln new file mode 100644 index 0000000..beaebfb --- /dev/null +++ b/tools/tools/tools.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.572 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tools", "tools\tools.vcxproj", "{84EEC732-2FB8-4CF8-B9C1-85DDB5DE67AA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {84EEC732-2FB8-4CF8-B9C1-85DDB5DE67AA}.Debug|x64.ActiveCfg = Debug|x64 + {84EEC732-2FB8-4CF8-B9C1-85DDB5DE67AA}.Debug|x64.Build.0 = Debug|x64 + {84EEC732-2FB8-4CF8-B9C1-85DDB5DE67AA}.Debug|x86.ActiveCfg = Debug|Win32 + {84EEC732-2FB8-4CF8-B9C1-85DDB5DE67AA}.Debug|x86.Build.0 = Debug|Win32 + {84EEC732-2FB8-4CF8-B9C1-85DDB5DE67AA}.Release|x64.ActiveCfg = Release|x64 + {84EEC732-2FB8-4CF8-B9C1-85DDB5DE67AA}.Release|x64.Build.0 = Release|x64 + {84EEC732-2FB8-4CF8-B9C1-85DDB5DE67AA}.Release|x86.ActiveCfg = Release|Win32 + {84EEC732-2FB8-4CF8-B9C1-85DDB5DE67AA}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A8F69077-DD4E-4F4B-8E0F-716CEE67A2BF} + EndGlobalSection +EndGlobal diff --git a/tools/tools/tools/pch.cpp b/tools/tools/tools/pch.cpp new file mode 100644 index 0000000..8eb50d0 --- /dev/null +++ b/tools/tools/tools/pch.cpp @@ -0,0 +1,5 @@ +// pch.cpp: 与预编译标头对应的源文件;编译成功所必需的 + +#include "pch.h" + +// 一般情况下,忽略此文件,但如果你使用的是预编译标头,请保留它。 diff --git a/tools/tools/tools/pch.h b/tools/tools/tools/pch.h new file mode 100644 index 0000000..69bf59d --- /dev/null +++ b/tools/tools/tools/pch.h @@ -0,0 +1,14 @@ +// 入门提示: +// 1. 使用解决方案资源管理器窗口添加/管理文件 +// 2. 使用团队资源管理器窗口连接到源代码管理 +// 3. 使用输出窗口查看生成输出和其他消息 +// 4. 使用错误列表窗口查看错误 +// 5. 转到“项目”>“添加新项”以创建新的代码文件,或转到“项目”>“添加现有项”以将现有代码文件添加到项目 +// 6. 将来,若要再次打开此项目,请转到“文件”>“打开”>“项目”并选择 .sln 文件 + +#ifndef PCH_H +#define PCH_H + +// TODO: 添加要在此处预编译的标头 + +#endif //PCH_H diff --git a/tools/tools/tools/tools.cpp b/tools/tools/tools/tools.cpp new file mode 100644 index 0000000..d575e70 --- /dev/null +++ b/tools/tools/tools/tools.cpp @@ -0,0 +1,38 @@ +// tools.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 +// + +#include "pch.h" +#include +#include + +int main(int argc, char **argv) +{ +// std::cout << "Hello World!\n"; + + if (argc != 2) + { + std::cout << "必须有一个参数!\n"; + return -1; + } + + HMODULE module = LoadLibraryA(argv[1]); + printf("module = 0X%08X\n", (unsigned int)module); + + char szModuleFileName[MAX_PATH] = { 0 }; + GetModuleFileNameA(module, szModuleFileName, MAX_PATH); + printf("%s 的全路径是 %s\n", argv[1], szModuleFileName); + getchar(); + + return 0; +} + +// 运行程序: Ctrl + F5 或调试 >“开始执行(不调试)”菜单 +// 调试程序: F5 或调试 >“开始调试”菜单 + +// 入门提示: +// 1. 使用解决方案资源管理器窗口添加/管理文件 +// 2. 使用团队资源管理器窗口连接到源代码管理 +// 3. 使用输出窗口查看生成输出和其他消息 +// 4. 使用错误列表窗口查看错误 +// 5. 转到“项目”>“添加新项”以创建新的代码文件,或转到“项目”>“添加现有项”以将现有代码文件添加到项目 +// 6. 将来,若要再次打开此项目,请转到“文件”>“打开”>“项目”并选择 .sln 文件 diff --git a/tools/tools/tools/tools.vcxproj b/tools/tools/tools/tools.vcxproj new file mode 100644 index 0000000..3731f56 --- /dev/null +++ b/tools/tools/tools/tools.vcxproj @@ -0,0 +1,168 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {84EEC732-2FB8-4CF8-B9C1-85DDB5DE67AA} + Win32Proj + tools + 10.0.17763.0 + + + + Application + true + v110_xp + Unicode + + + Application + false + v110_xp + true + Unicode + + + Application + true + v141 + Unicode + + + Application + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + Use + Level3 + Disabled + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + pch.h + + + Console + true + + + + + Use + Level3 + Disabled + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + pch.h + + + Console + true + + + + + Use + Level3 + MaxSpeed + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + pch.h + + + Console + true + true + true + + + + + Use + Level3 + MaxSpeed + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + pch.h + + + Console + true + true + true + + + + + + + + Create + Create + Create + Create + + + + + + + \ No newline at end of file diff --git a/tools/tools/tools/tools.vcxproj.filters b/tools/tools/tools/tools.vcxproj.filters new file mode 100644 index 0000000..b4143be --- /dev/null +++ b/tools/tools/tools/tools.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {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 -- GitLab