#include <Windows.h>
int main()
{
const char* dllPath = "C:\\Skeet.dll";
DWORD procId = 0;
HWND gameHWND = FindWindowA(NULL, "CounterStrike");
GetWindowThreadProcessId(gameHWND, &procId);
HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, 0, procId);
void* loc = VirtualAllocEx(hProc, 0, MAX_PATH, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
WriteProcessMemory(hProc, loc, dllPath, strlen(dllPath) + 1, 0);
HANDLE hThread = CreateRemoteThread(hProc, 0, 0, (LPTHREAD_START_ROUTINE)LoadLibraryA, loc, 0, 0);
}