Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Credits to : cardoow (for key list)
- #include <Windows.h>
- #include <iostream>
- #include <fstream>
- #include "keys.h"
- using namespace std;
- char key;
- void file() {
- ifstream myReadFile;
- myReadFile.open("C:\\Hotkey.txt");
- char output;
- if (myReadFile.is_open()) {
- myReadFile >> output;
- key = output;
- }
- myReadFile.close();
- }
- DWORD WINAPI Hotkeys(LPVOID)
- {
- file();
- while (1)
- {
- if(GetAsyncKeyState(key)&1)
- MessageBox( 0, "Freee!", "FREE", 0);
- Sleep(200);
- }
- return 0;
- }
- BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
- {
- if(dwReason == DLL_PROCESS_ATTACH)
- {
- CreateThread(0,0,Hotkeys,0,0,0);
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement