step1:
CMyLLKDlg.h
class CMyLLKDlg : public CDialog
{
// Construction
public:
CMyLLKDlg(CWnd* pParent = NULL) // standard constructor
void startGame()
step2:
MyCode.h
void CMyLLKDlg::startGame()
{
HWND gameh=::FindWindow(NULL,"QQ游戏 - 连连看角色版")
DWORD processID
GetWindowThreadProcessId(gameh,&processID)
HANDLE processH=OpenProcess(PROCESS_ALL_ACCESS,false,processID)
ReadProcessMemory(processH,(LPCVOID)0x00115CA0,&m_player1,1,NULL)
ReadProcessMemory(processH,(LPCVOID)0x00115CA4,&m_player2,1,NULL)
ReadProcessMemory(processH,(LPCVOID)0x00115CA8,&m_player3,1,NULL)
ReadProcessMemory(processH,(LPCVOID)0x0012E01C,&m_player4,1,NULL)
ReadProcessMemory(processH,(LPCVOID)0x00115CB0,&m_player5,1,NULL)
ReadProcessMemory(processH,(LPCVOID)0x00115CB4,&m_player6,1,NULL)
UpdateData(false)
}
都是头文件重复编译的问题使用
#ifndef XXXXXXXXXXXX_H
#define XXXXXXXXXXXX_H
代码
#endif
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)