#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 "";
}
