Hello. I modified a value of a memory of a process but with a console application...
now i'm trying to do it with a dll...
What's wrong here?
now i'm trying to do it with a dll...
What's wrong here?
PHP Code:
#include <windows.h>
#include <iostream>
using namespace std;
int main()
BOOLEAN WINAPI DllMain( IN HINSTANCE hDllHandle,
IN DWORD nReason,
IN LPVOID Reserved )
{
;
DWORD Id;
HANDLE ProcessHandle;
int value;
unsigned adress = 0x07A4F60;
switch ( nReason )
{
case DLL_PROCESS_ATTACH:
DWORD WINAPI GetCurrentProcessId(Id);
ProcessHandle = OpenProcess(PROCESS_VM_WRITE |PROCESS_VM_OPERATION ,false,Id);
value=1967458304;
fflush(stdin);
WriteProcessMemory(ProcessHandle,(LPVOID)adress,&value,sizeof(int),NULL);
break;
}
}