摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 DWORD WINAPI ThreadProc(LPVOID lpParam) 6 { 7 int i=0; 8 while(i<20) 9 {10 //cout<<"I am from a thread ,count="<<i++<<endl;11 printf("I am from a thread ,count=%d\n",i++);12 Sleep(500);13 }14 re... 阅读全文
posted @ 2013-11-25 14:35 玄奘三藏 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 首先写一个是测试程序(game.exe)代码如下:#include #include #include int g_nNum;void main(int argc, char* argv[]){ int i=198; g_nNum=1003; while (1) { printf("i=%d,addr=%08lX; g_nNum=%d,addr=%08lX\n",++i,&i,--g_nNum,&g_nNum); getchar(); } return;}目的是要搜索和修改game... 阅读全文
posted @ 2013-11-25 07:27 玄奘三藏 阅读(2479) 评论(0) 推荐(0) 编辑
摘要: #include #include #include int main(int argc, char* argv[]){ PROCESSENTRY32 pe32; pe32.dwSize=sizeof(pe32); HANDLE hProcessSnap=::CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0); if (hProcessSnap==INVALID_HANDLE_VALUE) { printf("出错\n"); return -1; } BOOL bMore=::Process32First(hProcessSnap, 阅读全文
posted @ 2013-11-25 01:52 玄奘三藏 阅读(1252) 评论(0) 推荐(0) 编辑