GetAsyncKeyState
ok so here is my code, (not a keylogger).
[php]#include <Windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR CmdShow, int CmdLine)
{
MessageBox(NULL, TEXT("SUP"), TEXT("SUP"), NULL);
if(GetAsyncKeyState(int (VK_NUMPAD9)) & 0)
{
MessageBox(NULL, TEXT("YES"), TEXT("SKD"), NULL);
return 0;
}
}[/php]
the problem is that after the user presses ok on the first message box the program shuts down, it doesn't wait until you press 9 on the num pad.
[php]#include <Windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR CmdShow, int CmdLine)
{
MessageBox(NULL, TEXT("SUP"), TEXT("SUP"), NULL);
if(GetAsyncKeyState(int (VK_NUMPAD9)) & 0)
{
MessageBox(NULL, TEXT("YES"), TEXT("SKD"), NULL);
return 0;
}
}[/php]
the problem is that after the user presses ok on the first message box the program shuts down, it doesn't wait until you press 9 on the num pad.