1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#pragma once #include <windows.h> #include <string> // windows 辅助函数 namespace Win { std::string GetCurrentWorkingDirectory(); void SetDllSearchDirectory(std::string path); // 主线程 HANDLE GetMainThread(); // 当前执行的线程 HANDLE GetCurrentThread(); // 当前的执行是否在主线程 bool IsInMainThread(); }