c++ - Read and change global std::map in executable through injected dll -
I have some function hooks installed in implementing DLL. In the Executive is the Global Study :: Map variable, which
std :: map & lt; Int, int & gt; Has been declared as. G_lenMap;
I know its address is from disassembly. I need to insert the key / value combination in this map (or somehow hook: search () function, which looks very different to me).
However, the most obvious way does not work:
std :: map & lt; Int, int & gt; * G_lenMap; G_lenMap = (std :: map & lt; int, int & gt; *) 0x4D7480; Int result = (* g_lenMap) [100];
This throws the "map / set iterator incompatible". I can easily read and change other global variables / structures, but not std :: map. What am I doing wrong?
Comments
Post a Comment