1
how do I call a function within a DLL already injected into the process? example: I would like when I press a button on the form I created, to call the asmFunction() function; if I call the function inside the main_thread works very well, but I doubt to do it Here is the code of my dll.
#include <Windows.h>
extern int UiMain();
DWORD WINAPI Main_Thread(LPVOID lpParam) {
UiMain();
return S_OK;
}
void asmFunction(DWORD x,DWORD y,DWORD adressToCall) {
__asm {
push x
push y
call adressToCall
};
}
BOOL APIENTRY DllMain(HMODULE hModule,DWORD _reason,LPVOID lpReserved) {
if (_reason == DLL_PROCESS_ATTACH) {
CreateThread(0, 0x1000, &Main_Thread, 0, 0, NULL);
}
return TRUE;
}
you just need to reference the function and call it somewhere in the code. The same is done with the
.h
– Brumazzi DB