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...

o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received

donations for this month's patches.
Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.