Hi, can someone guide me on creating a DLL that will inject a value into a program's address after pressing a hotkey?
Example, After pressing the key 's' it changes the address from a certain digit to the digit i want.
Hi, can someone guide me on creating a DLL that will inject a value into a program's address after pressing a hotkey?
Example, After pressing the key 's' it changes the address from a certain digit to the digit i want.
I think this is the code for that what you want to achieve. When injected it runs MyThread.
#include <windows.h>
void WINAPI MyThread ( )
{
MessageBox(NULL, "DLL is injected!", "Injected!", MB_OK);
}
BOOL WINAPI DllMain ( HMODULE hModule, DWORD dwReason, LPVOID lpvReserved )
{
switch ( dwReason ) {
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hModule);
if ( CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)MyThread, NULL, 0, NULL) == NULL ) {
return FALSE;
}
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
return TRUE;
}
External processes can use WriteProcessMemory to edit values but i don´t know if that works here too. For the hotkeys u can use GetAsyncKeyState. MSDN has some good guides about that.
P.S. Correct me if I'm wrong. I'm nub.
Last edited by Cõins; 2011-01-19 at 03:08 PM.
Perharps you can tell me, which is the line that allow me to attach the the specify "...".exe?
I'm also a noob in such things.
Please write to the PM only at the right issues.
or if you know what 0x90)))
P.s.
it's NOT NOP