#pragma once

#include <Windows.h>

#include <filesystem>
#include <optional>

namespace ta::adapters::windows::module_path_cache
{
    // Call exactly once from DLL_PROCESS_ATTACH before DllMain returns.
    // The function only queries and copies the module path; it performs no file I/O.
    [[nodiscard]] bool capture(HMODULE module) noexcept;

    [[nodiscard]] bool available() noexcept;
    [[nodiscard]] DWORD error_code() noexcept;
    [[nodiscard]] std::optional<std::filesystem::path> file_path();
    [[nodiscard]] std::optional<std::filesystem::path> directory();
}
