#include "Util.h" #include #include #ifdef _WIN32 #include #include #elif __linux__ #include #elif __APPLE__ #include #endif #ifdef _WIN32 std::string GetDllPathPlatform() { HMODULE hModule = GetModuleHandle(TEXT("TokenCore.dll")); char szPath[MAX_PATH] = { 0 }; GetModuleFileNameA(hModule, szPath, MAX_PATH); std::string::size_type pos = std::string(szPath).find_last_of("\\/"); return std::string(szPath).substr(0, pos) + "/"; } #elif __linux__ #elif __APPLE__ #endif std::string GetDllPath() { return GetDllPathPlatform(); }