Support DLL unmapping

This commit is contained in:
momo5502
2024-12-22 16:45:31 +01:00
parent b4e7606226
commit 4de6813c09
3 changed files with 40 additions and 6 deletions

View File

@@ -101,3 +101,17 @@ void module_manager::deserialize(utils::buffer_deserializer& buffer)
{
buffer.read_map(this->modules_);
}
bool module_manager::unmap(const uint64_t address)
{
const auto mod = this->modules_.find(address);
if (mod == this->modules_.end())
{
return false;
}
unmap_module(*this->emu_, mod->second);
this->modules_.erase(mod);
return true;
}