Mono:Lua:mono getImageFromAssembly

From Cheat Engine
Jump to navigation Jump to search

This can be run from the lua window (CTRL+M for memory window, then CTRL+L for lua)

domains = mono_enumDomains()
assemblies = mono_enumAssemblies()
function maparr(tbl, f)
  local t = {}
  for k,v in ipairs(tbl) do
    local r = f(v)
    print(tostring(k)..' is '..tostring(v)..' result '..tostring(r))
    table.insert(t,r)
  end
  return t
end
images = maparr(assemblies, function(a) return mono_image_get_name(mono_getImageFromAssembly(a)) end)
return assemblies, #assemblies