Greetings fellow Programmers,
I have a question regarding this c code.

Originally Posted by
loller007
//Microsoft Minesweeper Time Hack
//By Samuel-Sama
//Preprocessor files
#include <windows.h>
//Define variables
DWORD ThreadID;
int *time = (int*)0x0100579C; //Offset for time.
DWORD WINAPI changeTime(LPVOID lParam) {
while(1)
*time = 0;
ExitThread(0);
}
BOOL APIENTRY DllMain(HINSTANCE hDll, DWORD callReason, LPVOID lpReserved) {
if(callReason == DLL_PROCESS_ATTACH) {
MessageBox(0, "Dll Injection Successful! ", "Dll Injector", MB_ICONEXCLAMATION | MB_OK);
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&changeTime, 0, 0, &ThreadID);
}
return 1;
}
I am running windows 7 Home premium.
I compiled it with devcpp,
run winject 1.7. with admin rights
pick minesweeper from the process list,
pick my dll to load into the process.
then winject says Unable to inject into: Minesweeper.exe Reason: 0
(Finject aka Faith Injector does inject my dll, tho i do not see a messagebox).
( i am not expecting the minesweeper timer to freeze on 0, I just expect it to load that messagebox() )
If you can help me, i would greatly appreciate it!
greetings,
loller007