[C++] GetAsyncKeyState. <DLL>
Can anyone help me with this?
I want to F1 you have that particular value.
The Code :
I want to F1 you have that particular value.
The Code :
Code:
#include <Windows.h>
#define ADR_HP ADDRESS
void WriteMemory(DWORD address, DWORD value)
{
DWORD dwOldProt;
VirtualProtect((LPVOID)address, 4, PAGE_READWRITE, &dwOldProt);
*(DWORD *)address = value;
VirtualProtect((LPVOID)address, 4, dwOldProt, &dwOldProt);
}
int __stdcall DllMain(HMODULE hModule, DWORD dwReasons, LPVOID lpReserved)
{
if(GetAsyncKeyState(VK_F1))
{
WriteMemory(ADR_HP, 0);
}
}