This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/memory/module.hpp
gir489 7ba85de412
Replace offset.bin's header version variable with TimeDateStamp. (#2832)
* Replace offset.bin's header version variable with TimeDateStamp.

* Broke out Read Attribute Patch into two signatures.
2024-03-16 22:06:29 +01:00

40 lines
793 B
C++

#pragma once
#include "range.hpp"
namespace memory
{
class module : public range
{
public:
explicit module(const std::string_view name);
/**
* @brief Get the export address of the current module given a symbol name
*
* @param symbol_name
* @return memory::handle
*/
memory::handle get_export(std::string_view symbol_name);
bool loaded() const;
size_t size() const;
DWORD timestamp() const;
/**
* @brief Waits till the given module is loaded.
*
* @param time Time to wait before giving up.
* @return true
* @return false
*/
bool wait_for_module(std::optional<std::chrono::high_resolution_clock::duration> time = std::nullopt);
protected:
bool try_get_module();
private:
const std::string_view m_name;
bool m_loaded;
};
}