Page 1 of 1
need some help with MAXMANA
Posted: Fri May 02, 2003 12:45 pm
by EqMule
Code: Select all
DWORD GetMaxMana(VOID)
{
DWORD MaxMana = 0;
DWORD CharInfo = NULL;
if (!EQADDR_CHAR_INFO) return 0;
if (!*EQADDR_CHAR_INFO) return 0;
CharInfo = (DWORD)*EQADDR_CHAR_INFO;
#if defined(_MSC_VER)
__asm {
push eax;
push ecx;
mov ecx, dword ptr [CharInfo];
call dword ptr [EQADDR_MAXMANA];
movsx eax, ax;
mov [MaxMana], eax;
pop ecx;
pop eax;
}
ok If I where to execute this code from an exefile not the eqlib.dll can someone post a code example, howto execute code in another process like this? What do I need to do, as it is right now I can call the GetMaxMana(); from main() but it will give me an access violation on
this line... well I have full access to the eqgame process, but dont I need to createprocessthread or something to be able to access it directly like that function is? hmm I need to be able to do this so I can debug easier, then I can help on the click thing and many other... we can do alot of fun stuff as soon as I learn howto execute code in the eqgame process...
Posted: Fri May 02, 2003 2:09 pm
by dont_know_at_all
You can't. Eqlib.dll is loaded into the eqgame.exe process space. I can't really run as a stand alone program.
Posted: Fri May 02, 2003 2:26 pm
by EqMule
hmm i was hoping for an API or something that let me inject into the process and then execute that code...
Posted: Fri May 02, 2003 4:35 pm
by dont_know_at_all
Well, that's the way MQ works.
MacroQuest.exe injects eqlib.dll into eqgame.exe
You could make your own dll to inject as numerous other people have.