Files
UnlockedByDaylight/src/unlocker/utils.cpp
T
2026-04-09 06:40:34 -03:00

15 lines
335 B
C++

#include "utils.h"
#include <minwindef.h>
#include <libloaderapi.h>
std::string utils::getExePath()
{
char buffer[MAX_PATH];
GetModuleFileNameA(NULL, buffer, MAX_PATH);
std::string path(buffer);
size_t pos = path.find_last_of("\\/");
if (pos != std::string::npos) return path.substr(0, pos + 1);
return "";
}