最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

一分鐘找出所有雷的掃雷外掛源碼

2019-06-21 21:06 作者:程序員小明哥  | 我要投稿

#include <stdio.h>

#include <Windows.h>


int main()

{

//找到掃雷游戲?qū)?yīng)的窗口句柄和進(jìn)程ID

HWND hWinmine = FindWindowA(NULL, "掃雷");

DWORD dwPid = 0;

GetWindowThreadProcessId(hWinmine, &dwPid);


//打開(kāi)掃雷游戲獲取其句柄

HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwPid);


PBYTE pByte = NULL;

DWORD dwHight = 0, dwWidth = 0;


DWORD dwAddr = 0x01005330;

DWORD dwNum = 0;

DWORD dwRead = 0;


//讀取雷的數(shù)量級(jí)

//讀取雷區(qū)的寬和高

ReadProcessMemory(hProcess, (LPVOID)(dwAddr), &dwNum, sizeof(DWORD), &dwRead);

ReadProcessMemory(hProcess, (LPVOID)(dwAddr + 4), &dwWidth, sizeof(DWORD), &dwRead);

ReadProcessMemory(hProcess, (LPVOID)(dwAddr + 8), &dwHight, sizeof(DWORD), &dwRead);


//判斷游戲模式是否為高級(jí)模式

if (dwWidth != 30 || dwHight != 16)

{

return 0;

}


DWORD dwBoomAddr = 0x01005340;

DWORD dwSize = dwWidth*dwHight + dwWidth * 2 + dwHight * 2 + 4;

pByte = (PBYTE)malloc(dwSize);


//讀取整個(gè)雷區(qū)的數(shù)據(jù)

ReadProcessMemory(hProcess, (LPVOID)dwBoomAddr, pByte, dwSize, &dwRead);

BYTE bClear = 0x8E;

int i = 0;

int n = dwNum;

while (i<dwSize)

{

if (pByte[i] == 0x8F)//0x8F代表的是雷

{

DWORD dwAddr1 = 0x01005340 + i;

WriteProcessMemory(hProcess, (LPVOID)dwAddr1, &bClear, sizeof(BYTE), &dwRead);

n--;

}

i++;

}


//刷新掃雷的客戶區(qū)

RECT rt;

GetClientRect(hWinmine, &rt);

InvalidateRect(hWinmine, &rt, TRUE);


free(pByte);

printf("%d \r\n", n);


CloseHandle(hProcess);

getchar();

return 0;

}


一分鐘找出所有雷的掃雷外掛源碼的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
彝良县| 武乡县| 历史| 邵武市| 类乌齐县| 酉阳| 司法| 郁南县| 正宁县| 荃湾区| 收藏| 武城县| 安丘市| 武汉市| 社旗县| 攀枝花市| 彝良县| 双江| 贡觉县| 景东| 太白县| 石屏县| 恭城| 彭山县| 襄城县| 嫩江县| 大化| 仪陇县| 平阴县| 盐山县| 大田县| 吴桥县| 集贤县| 石嘴山市| 祁东县| 奉新县| 都安| 墨脱县| 雷州市| 太原市| 东乌珠穆沁旗|