an die adressen der funktionen komme cih mittels GetProcAddress, wie bekomme ich die adressen von Exportieren Varablen?
genauso?
hie ein beispiel von GetProcAddress aus einem meiner programme
c++ code:
PHP Code:
void ThisCall(char * modName, char * funcName, int * params, int paramsAnz, void* thisPionter)
{
HMODULE hMod = GetModuleHandleA(modName);
if(hMod == 0){
MessageBox(0,L"Module nicht gefunden",L"FAIL",0);
MessageBoxA(0,modName,"Module Name:",0);
return;
}
unsigned int FuncP = (unsigned int)GetProcAddress(hMod, funcName);
if(FuncP == 0){
MessageBox(0,L"Function nicht gefunden",L"FAIL",0);
MessageBoxA(0,funcName,"Function Name:",0);
return;
}
paramsAnz;
int* lastPlus1 = ¶ms[paramsAnz];
_asm
{
push eax
push ebx
push ecx
push edx
mov ebx, params
mov ecx, lastPlus1
startLoop:
cmp ebx, ecx
je end
sub ecx,4
mov eax, [ecx]
push eax
jmp startLoop
end:
mov ecx, thisPionter
call FuncP
pop edx
pop ecx
pop ebx
pop eax
}
}






