找回密码
 加入
搜索
查看: 2144|回复: 1

[系统综合] VC++远程CALL调用代码 ,谁能写成AU3的呢

[复制链接]
发表于 2010-4-21 01:02:42 | 显示全部楼层 |阅读模式
//定义全局变量

HANDLE h;    //游戏进程句柄PID
LPVOID address;



void asm()   
{
_asm
{
写 汇编代码

}
}




void CMyDlg::OnButton1()
{
// TODO: Add your control notification handler code here
HWND hwnd=::FindWindow(NULL,"MU");
if(hwnd==0){AfxMessageBox("获取窗口句柄失败!");  return;}


DWORD pid;
GetWindowThreadProcessId(hwnd,&pid);
if(pid==0){AfxMessageBox("获取游戏进程ID失败!");return;}

h=::OpenProcess(PROCESS_ALL_ACCESS,false,pid);
if(h==0){AfxMessageBox("打开进程失败!");return;}
//分配内存空间
address=::VirtualAllocEx(h,NULL,0x1000,MEM_COMMIT | MEM_RESERVE,PAGE_EXECUTE);


if(address==0){AfxMessageBox("申请内存空间失败!");return;}

m_address=(int)address;
UpdateData(false);     //接受用户输入,为真,输出就为假

WriteProcessMemory(h,address,asm,0x1000,NULL);

//DWORD tid;
//CreateRemoteThread(h,NULL,0,(LPTHREAD_START_ROUTINE)address,0,0,&tid);


}







void CALLBACK TimerProc(HWND hWnd,UINT nMsg,UINT nTimerid,DWORD dwTime)    //设置时钟的回调函数
{

DWORD tid;
HANDLE yuanc=::CreateRemoteThread(h,NULL,0,(LPTHREAD_START_ROUTINE)address,0,0,&tid);

}









void CMyDlg::OnButton3()
{
// TODO: Add your control notification handler code here
// SetTimer( NULL,(UINT_PTR)1,(UINT) 500,(TIMERPROC) OnButton2);
SetTimer(1,300,TimerProc);


}
发表于 2010-4-21 07:04:45 | 显示全部楼层
一窍不通......
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-28 09:57 , Processed in 0.314130 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表