评论 (0条)
抢沙发,第一个发表评论温馨提示:该网站暂时无法进行访问
原因一:根据工信部相关法规,您尚未进行备案;
原因二:根据工信部相关法规,您当前的接入商不是北京优帆科技有限公司;
原因三:您的网站可能存在不适宜传播的违法信息,请联系网站管理员。
本页面为默认提示页面,如网站存在以上问题请及时进行处理。
请登录青云备案系统进行备案 即可 。用户名密码登录青云后台,页面右上角【帮助】下拉菜单选择【ICP备案】即可。谢谢合作!
备案咨询***:400- 亦可登陆青云网址在线***咨询。
北京优帆科技有限公司这段时间真够累的,不想沦落为程序员,纪念下。
通过hook键盘,将dll注入到游戏主程序。游戏中,F12呼出辅助工具界面。
主要功能:通过加载、读取任务脚本,实现:指定NPC对话、跑路到指定坐标、自动杀指定数量的指定名称怪、自动拾取打怪掉落的指定物品、自动加血加蓝。
文件分类:配置文件加载函数、对话框程序主程序、基础功能函数、主要功能函数、任务脚本解析函数、线程处理调用类函数
#include &IniFile.h&
//加载配置文件,各类基础数据的获取
call_attack,call_choose,call_findway,call_usegoods,call_pickup,call_selectmonster,call_
BaseAddr,BaseO
ps_base,ps_x,ps_y,ps_z,ps_level,ps_life,ps_magic,ps_max_life,ps_max_magic,ps_
mt_base1,mt_base2,mt_base3,mt_base4,mt_max,mt_id,mt_distance,mt_name1,mt_name2,mt_status,mt_
//Backpack
bp_base1,bp_base2,bp_base3,bp_max_size,bp_type,bp_id,bp_num,bp_name1,bp_name2;
gd_base1,gd_base2,gd_base3,gd_max,gd_object,gd_sysid,gd_id,gd_distance,gd_name1,gd_name2;
Map_Target,map_
st_lifepoint,st_magicpoint,st_pickup_distance,st_select_
st_lifegoods[1024]={0},st_magicgoods[1024]={0},st_pickup[1024]={0};
BOOL LoadConfig()
INIFILE config("D:\\game\\诛仙2&时光之书\\element\\Config.ini");
BaseAddr=config.GetInteger("BASE","BaseAddr");
BaseOffset=config.GetInteger("BASE","BaseOffset");
ps_base=config.GetInteger("PERSON","base");
ps_x=config.GetInteger("PERSON","x");
ps_y=config.GetInteger("PERSON","y");
ps_z=config.GetInteger("PERSON","z");
ps_level=config.GetInteger("PERSON","level");
ps_life=config.GetInteger("PERSON","life");
ps_magic=config.GetInteger("PERSON","magic");
ps_max_life=config.GetInteger("PERSON","max_life");
ps_max_magic=config.GetInteger("PERSON","max_magic");
ps_npc=config.GetInteger("PERSON","npc");
mt_base1=config.GetInteger("MONSTER","base1");
mt_base2=config.GetInteger("MONSTER","base2");
mt_base3=config.GetInteger("MONSTER","base3");
mt_base4=config.GetInteger("MONSTER","base4");
mt_max=config.GetInteger("MONSTER","max");
mt_id=config.GetInteger("MONSTER","id");
mt_distance=config.GetInteger("MONSTER","distance");
mt_name1=config.GetInteger("MONSTER","name1");
mt_name2=config.GetInteger("MONSTER","name2");
mt_status=config.GetInteger("MONSTER","status");
mt_select=config.GetInteger("MONSTER","select");
//Backpack
bp_base1=config.GetInteger("BACKPACK","base1");
bp_base2=config.GetInteger("BACKPACK","base2");
bp_base3=config.GetInteger("BACKPACK","base3");
bp_max_size=config.GetInteger("BACKPACK","max_size");
bp_type=config.GetInteger("BACKPACK","type");
bp_id=config.GetInteger("BACKPACK","id");
bp_num=config.GetInteger("BACKPACK","num");
bp_name1=config.GetInteger("BACKPACK","name1");
bp_name2=config.GetInteger("BACKPACK","name2");
gd_base1=config.GetInteger("GROUND","base1");
gd_base2=config.GetInteger("GROUND","base2");
gd_base3=config.GetInteger("GROUND","base3");
gd_max=config.GetInteger("GROUND","max");
gd_object=config.GetInteger("GROUND","object");
gd_sysid=config.GetInteger("GROUND","sysid");
gd_id=config.GetInteger("GROUND","id");
gd_distance=config.GetInteger("GROUND","distance");
gd_name1=config.GetInteger("GROUND","name1");
gd_name2=config.GetInteger("GROUND","name2");
Map_Target=config.GetInteger("MAP","Target");
map_offset=config.GetInteger("MAP","offset");
call_attack=config.GetInteger("CALL","attack");
call_choose=config.GetInteger("CALL","choose");
call_findway=config.GetInteger("CALL","findway");
call_usegoods=config.GetInteger("CALL","usegoods");
call_pickup=config.GetInteger("CALL","pickup");
call_selectmonster=config.GetInteger("CALL","selectmonster");
call_talknpc=config.GetInteger("CALL","talknpc");
config.GetString("SETTING","GameName",GameName,260);
st_lifepoint=config.GetFloat("SETTING","lifepoint");
st_magicpoint=config.GetFloat("SETTING","magicpoint");
st_pickup_distance=config.GetFloat("SETTING","pickup_distance");
st_select_distance=config.GetFloat("SETTING","select_distance");
config.GetString("SETTING","lifegoods",st_lifegoods,1024);
config.GetString("SETTING","magicgoods",st_magicgoods,1024);
config.GetString("SETTING","pickup",st_pickup,1024);
st_Time_Interval=config.GetInteger("SETTING","interval");
if (BaseAddr==0||BaseOffset==0)
return FALSE;
return TRUE;
//基本函数char
GameName[260],ScriptPath[260]={0};;
thMain,thLifeMagic,thK
*pMonsterStatus,*pIfS
ListLife,ListMagic,ListPickUp;
BTEXEC,BTSELECT;
struct KillMonster
MonsterName[255];
DWORD *GetAddress(DWORD *BaseAddr,DWORD offset1=-1,DWORD offset2=-1,DWORD offset3=-1,DWORD offset4=-1,DWORD offset5=-1,DWORD offset6=-1,DWORD offset7=-1)
DWORD *ret=BaseA
if (offset1!=-1)
if (*ret!=NULL)
ret=(DWORD *)(*ret+offset1);
return NULL;
if (offset2!=-1)
if (*ret!=NULL)
ret=(DWORD *)(*ret+offset2);
return NULL;
if (offset3!=-1)
if (*ret!=NULL)
ret=(DWORD *)(*ret+offset3);
return NULL;
if (offset4!=-1)
if (*ret!=NULL)
ret=(DWORD *)(*ret+offset4);
return NULL;
if (offset5!=-1)
if (*ret!=NULL)
ret=(DWORD *)(*ret+offset5);
return NULL;
if (offset6!=-1)
if (*ret!=NULL)
ret=(DWORD *)(*ret+offset6);
return NULL;
if (offset7!=-1)
if (*ret!=NULL)
ret=(DWORD *)(*ret+offset7);
return NULL;
catch (...)
//各主函数文件//基本数据
*PersonBase,*BackPakcBase,*GroundBase,*MonsterB
//获取基本地址
GetBaseAddr()
PersonBase=GetAddress((DWORD*)BaseAddr,BaseOffset,ps_base);
BackPakcBase=GetAddress((DWORD*)BaseAddr,BaseOffset,bp_base1,bp_base2);
GroundBase=GetAddress((DWORD*)BaseAddr,BaseOffset,gd_base1,gd_base2);
MonsterBase=GetAddress((DWORD*)BaseAddr,BaseOffset,mt_base1,mt_base2);
pIfSelected=GetAddress((DWORD*)BaseAddr,BaseOffset,ps_base,0x12E0);
//普通攻击()
DWORD *PersonInfo=GetAddress(PersonBase,0);
ecx,PersonInfo
call_attack
//使用物品(物品名)
BOOL UseGoods(char *GoodsName)
DWORD *pBase,*pName,*pMaxSize,*pGoodsType,GoodsID;
WCHAR Name[255]={0};
MultiByteToWideChar(CP_ACP,0,GoodsName,strlen(GoodsName),Name,255);
pMaxSize=GetAddress(BackPakcBase,bp_max_size);
pBase=GetAddress(BackPakcBase,bp_base3);
for (UINT i=0;i&*pMaxSi++)
pGoodsType=GetAddress(pBase,i*4,4);
if (pGoodsType!=NULL && *pGoodsType==2)
pName=GetAddress(pBase,i*4,bp_name1,bp_name2);
if (wcscmp((WCHAR*)pName,Name)==0)
GoodsID=*GetAddress(pBase,i*4,bp_id);
push GoodsID
mov eax,0x
add esp,0x10
return TRUE;
return FALSE;
//拾取物品(物品名)
BOOL PickUp(char *GoodsName)
DWORD *pMaxGoods,*pGoodsBase,GoodsSysID,GoodsID;
WCHAR *pGoodsN
WCHAR Name[255]={0};
MultiByteToWideChar(CP_ACP,0,GoodsName,strlen(GoodsName),Name,255);
pMaxGoods=GetAddress(GroundBase,gd_max);
pGoodsBase=GetAddress(GroundBase,gd_base3);
for (UINT i=0;i&*pMaxGi++)
pGoodsName=(WCHAR *)GetAddress(pGoodsBase,i*4,gd_object,gd_name1,gd_name2);
if (pGoodsName!=NULL && *pGoodsName!=NULL)
if (wcscmp(pGoodsName,Name)==0)
pDistance=(float *)GetAddress(pGoodsBase,i*4,gd_object,gd_distance);
if (*pDistance&=st_pickup_distance)
GoodsID=*GetAddress(pGoodsBase,i*4,gd_object,gd_id);
GoodsSysID=*GetAddress(pGoodsBase,i*4,gd_object,gd_sysid);
GoodsSysID
call_pickup
Sleep(500);
return TRUE;
return FALSE;
//去指定坐标(地图ID,X,Y)
void GoTo(UINT mapid,float x,float y)
DWORD *pCurPos,*pDesP
pCurPos=GetAddress((DWORD*)BaseAddr,BaseOffset,ps_base,ps_x);
pDesPos=(DWORD *)Map_T
eax,Map_Target
add eax,map_offset
mov ebx,mapid
mov [eax],ebx
add eax,0x4
mov [eax],ebx
add eax,0x4
mov [eax],0
add eax,0x4
mov [eax],ebx
push pCurPos
mov ecx,pDesPos
call call_findway
//根据怪ID选中怪(怪ID)
SelectById(DWORD ID)
DWORD *pSelectA
pSelectAddr=GetAddress(PersonBase,mt_select);
eax,pSelectAddr
call_selectmonster
//选中指定范围内选中指定名称怪(怪名称)
SelectMonster(char *MonsterName)
*pMaxSize,*pMonBase,*pMonsterId;
*pMonDistance,MinDistance=st_select_
Name[255]={0},*pMonsterN
MultiByteToWideChar(CP_ACP,0,MonsterName,strlen(MonsterName),Name,255);
pMaxSize=GetAddress(MonsterBase,mt_max);
for (UINT i=0;i&*pMaxSi++)
pMonBase=GetAddress(MonsterBase,mt_base3,i*4,mt_base4);
if (pMonBase!=NULL && *pMonBase!=NULL)
pMonDistance=(FLOAT*)GetAddress(pMonBase,mt_distance);
if (*pMonDistance&st_select_distance)
pMonsterName=(WCHAR*)GetAddress(pMonBase,mt_name1,mt_name2);
if (wcscmp(Name,pMonsterName)==0)
pMonsterStatus=GetAddress((DWORD*)BaseAddr,BaseOffset,mt_base1,mt_base2,mt_base3,i*4,mt_base4,mt_status);
if (*pMonsterStatus!=4)
if (*pMonDistance&MinDistance)
MinDistance=*pMonD
pMonsterId=GetAddress(pMonBase,mt_id);
if (MinDistance==st_select_distance){
return FALSE;
SelectById(*pMonsterId);
return TRUE;
//打开指定npc对话框
TalkWithNPC(char *NPCName)
*pMaxSize,*pNpcBase,NpcId;
Name[255]={0},*pNpcN
MultiByteToWideChar(CP_ACP,0,NPCName,strlen(NPCName),Name,255);
pMaxSize=GetAddress(MonsterBase,mt_max);
for (UINT i=0;i&*pMaxSi++)
pNpcBase=GetAddress(MonsterBase,mt_base3,i*4,mt_base4);
if (pNpcBase!=NULL && *pNpcBase!=NULL)
pNpcName=(WCHAR*)GetAddress(pNpcBase,mt_name1,mt_name2);
if (wcscmp(Name,pNpcName)==0)
pNpcDistance=(FLOAT*)GetAddress(pNpcBase,mt_distance);
if (*pNpcDistance&6)
NpcId=*GetAddress(pNpcBase,mt_id);
push NpcId
mov ecx,BaseAddr
mov ecx,[ecx]
mov ecx,dword ptr [ecx+0x20]
add ecx,0x0d4
call call_talknpc
return TRUE;
return FALSE;
//主线程函数#include &FSTREAM.h&
//函数定义
GaveOver();
KillThread();
Goto(UINT mapid,FLOAT x,FLOAT y);
LifeMagicThread();
Talk(char *TalkStr);
//变量定义
KillMonster
MonsterTask[255];
szRichEdit[255];
MonsterLen=0;
void DispathCmd(char *pCmd)
pCmd[4]=0x00;
if (strcmp(pCmd,"KILL")==0)
char Tmp[255];
while(strtok(pCmd,";"))
strcpy(Tmp,pCmd);
strtok(Tmp,",");
strcpy(MonsterTask[MonsterLen].MonsterName,Tmp);
MonsterTask[MonsterLen].Num=0;
MonsterTask[MonsterLen].MaxNum=atoi((char *)&Tmp[strlen(Tmp)+1]);
sprintf(szRichEdit,"\t杀怪:%s(%d)\r\n",MonsterTask[MonsterLen].MonsterName,MonsterTask[MonsterLen].MaxNum);
RichLog.AppendColorString(szRichEdit,RGB(0,0,0xff));
MonsterLen++;
pCmd+=strlen(pCmd)+1;
else if (strcmp(pCmd,"GOTO")==0)
strtok(pCmd,",");
UINT mapid=atoi(pCmd);
pCmd+=strlen(pCmd)+1;
strtok(pCmd,",");
FLOAT x=(FLOAT)atof(pCmd);
pCmd+=strlen(pCmd)+1;
FLOAT y=(FLOAT)atof(pCmd);
sprintf(szRichEdit,"\t开始跑路:%d,&%0.2f,%0.2f&\r\n",mapid,x,y);
RichLog.AppendColorString(szRichEdit,RGB(0,0,0xff));
Goto(mapid,x,y);
else if (strcmp(pCmd,"TALK")==0)
sprintf(szRichEdit,"\t开始对话:%s\r\n",pCmd);
RichLog.AppendColorString(szRichEdit,RGB(0,0,0xff));
strtok(pCmd,";");
TalkWithNPC(pCmd);
pCmd+=strlen(pCmd)+1;
Sleep(1000);
Talk(pCmd);
else if (strcmp(pCmd,"NAME")==0)
sprintf(szRichEdit,"新任务:%s\r\n",pCmd);
RichLog.AppendColorString(szRichEdit,RGB(0xff,0,0),TRUE,TRUE);
sprintf(szRichEdit,"当前任务:%s",pCmd);
SendMessage(hMainSbr,SB_SETTEXT,1,(LPARAM)szRichEdit);
void MainThread()
fstream taskfile(ScriptPath,ios::in);
char szLine[4096]={0},szTmp[255]={0};
memset(MonsterTask,0x00,sizeof(KillMonster)*255);
thLifeMagic.Create(LifeMagicThread);
while (!taskfile.eof())
taskfile.getline(szLine,4096);
char *pLine=szL
while (strtok(pLine,"|"))
strcpy(szTmp,pLine);
DispathCmd(szTmp);
pLine+=strlen(pLine)+1;
SendMessage(hMainSbr,SB_SETTEXT,0,(LPARAM)"脚本执行完毕!");
SendMessage(hMainSbr,SB_SETTEXT,1,(LPARAM)"等待新任务!");
BTEXEC.SetEnable(TRUE);
BTSELECT.SetEnable(TRUE);
taskfile.close();
void Goto(UINT mapid,FLOAT x,FLOAT y)
FLOAT *pCurX,*pCurY;
GoTo(mapid,x,y);
pCurX=(FLOAT*)GetAddress((DWORD*)BaseAddr,BaseOffset,ps_base,ps_x);
pCurY=(FLOAT*)GetAddress((DWORD*)BaseAddr,BaseOffset,ps_base,ps_y);
if ((*pCurX&=x-2 && *pCurX&=x+2) && (*pCurY&=y-2 && *pCurY&=y+2)){
sprintf(szRichEdit,"\t已达到目的地:%d,&%0.2f,%0.2f&\r\n",mapid,x,y);
RichLog.AppendColorString(szRichEdit,RGB(0,0,0xff));
Sleep(1000);
void LifeMagicThread()
FLOAT *pCurLife,*pCurMagic,*pMaxLife,*pMaxM
char szTmp[255];
UINT count1=ListLife.GetItemCount();
UINT count2=ListMagic.GetItemCount();
pMaxLife=(FLOAT*)GetAddress((DWORD*)BaseAddr,BaseOffset,ps_base,ps_max_life);
pMaxMagic=(FLOAT*)GetAddress((DWORD*)BaseAddr,BaseOffset,ps_base,ps_max_magic);
pCurLife=(FLOAT*)GetAddress((DWORD*)BaseAddr,BaseOffset,ps_base,ps_life);
pCurMagic=(FLOAT*)GetAddress((DWORD*)BaseAddr,BaseOffset,ps_base,ps_magic);
if ((*pCurLife / *pMaxLife)&st_lifepoint)
for (UINT i=0;i&count1;i++)
ListLife.GetItemText(i,0,szTmp,255);
if (UseGoods(szTmp))
sprintf(szRichEdit,"\t使用红药:%s\r\n",szTmp);
RichLog.AppendColorString(szRichEdit,RGB(0xff,0,0));
memset(szTmp,0x00,255);
if ((*pCurMagic / *pMaxMagic)&st_magicpoint)
for (UINT i=0;i&count2;i++)
ListMagic.GetItemText(i,0,szTmp,255);
if (UseGoods(szTmp))
sprintf(szRichEdit,"\t使用蓝药:%s\r\n",szTmp);
RichLog.AppendColorString(szRichEdit,RGB(0,0,0xff));
memset(szTmp,0x00,255);
Sleep(st_Time_Interval);
void Pickup()
char szTmp[255]={0};
UINT count=ListPickUp.GetItemCount();
for (UINT i=0;i&i++)
ListPickUp.GetItemText(i,0,szTmp,255);
if (PickUp(szTmp))
sprintf(szRichEdit,"\t拾取物品:%s\r\n",szTmp);
RichLog.AppendColorString(szRichEdit,RGB(0,0,0xff));
void KillThread()
for (UINT i=0;i&MonsterLi++)
while (MonsterTask[i].Num&MonsterTask[i].MaxNum)
if (SelectMonster(MonsterTask[i].MonsterName))
if (*pIfSelected==0)
MonsterTask[i].Num++;
sprintf(szRichEdit,"\t已杀怪:%s (%d/%d)\r\n",MonsterTask[i].MonsterName,MonsterTask[i].Num,MonsterTask[i].MaxNum);
RichLog.AppendString(szRichEdit);
Sleep(1000);
void Kill()
thKill.Create(KillThread);
thKill.WaitForEnd();
memset(&MonsterTask,0x00,sizeof(KillMonster)*255);
MonsterLen=0;
void Talk(char *TalkStr)
DWORD *pCanMove=GetAddress((DWORD*)BaseAddr,BaseOffset,ps_base,0x12fd);
mov eax,pCanMove
mov [eax],0
while (strtok(TalkStr,","))
win.SendLBClick(30,180+12.5*(atoi(TalkStr)-1));
TalkStr+=strlen(TalkStr)+1;
sprintf(szRichEdit,"\t对话完毕!\r\n");
RichLog.AppendColorString(szRichEdit,RGB(0,0,0xff));
void GameOver()
thLifeMagic.Terminate();
thKill.Terminate();
thMain.Terminate();
//对话框函数#include "header.h"
ID_MAINSBR
//初始化状态栏
void InitStatusBar()
int aWidths[2]={100,-1};
SendMessage(hMainSbr,SB_SETPARTS,2,(LPARAM)aWidths);
SendMessage(hMainSbr,SB_SETTEXT,0,(LPARAM)"等待加载脚本!");
SendMessage(hMainSbr,SB_SETTEXT,1,(LPARAM)"当前任务:无");
//加载设置
void LoadSetting(HWND hDlg)
char *pLifeGoods=st_lifegoods,*pMagicGoods=st_magicgoods,*pPickUp=st_pickup,tmp[255]={0};
while (*pLifeGoods)
strtok(pLifeGoods,"|");
ListLife.InsertItemText(i,pLifeGoods);
pLifeGoods+=strlen(pLifeGoods)+1;
while (*pMagicGoods)
strtok(pMagicGoods,"|");
ListMagic.InsertItemText(i,pMagicGoods);
pMagicGoods+=strlen(pMagicGoods)+1;
while (*pPickUp)
strtok(pPickUp,"|");
ListPickUp.InsertItemText(i,pPickUp);
pPickUp+=strlen(pPickUp)+1;
sprintf(tmp,"%.0f",st_lifepoint*100);
SetWindowText(GetDlgItem(hDlg,IDC_EDITLIFE),tmp);
sprintf(tmp,"%.0f",st_magicpoint*100);
SetWindowText(GetDlgItem(hDlg,IDC_EDITMAGIC),tmp);
sprintf(tmp,"%d",st_Time_Interval);
SetWindowText(GetDlgItem(hDlg,IDC_EDITTIME),tmp);
int CALLBACK DlgProc(HWND hDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
switch(uMsg)
case WM_INITDIALOG:
if (LoadConfig()==FALSE)
MessageBox(hDlg,"加载配置文件失败!","错误",MB_OK|MB_ICONERROR);
EndDialog(hDlg,0);
GetBaseAddr();
win.FindWindow(GameName);
hMainSbr=CreateStatusWindow(WS_CHILD|WS_VISIBLE|SBARS_SIZEGRIP,NULL,hDlg,ID_MAINSBR);
InitStatusBar();
RichLog.Associate(hDlg,IDC_RICHLOG);
ListLife.Associate(hDlg,IDC_LISTLIFE);
ListMagic.Associate(hDlg,IDC_LISTMAGIC);
ListPickUp.Associate(hDlg,IDC_LISTPICKUP);
BTEXEC.Associate(hDlg,IDB_EXEC);
BTSELECT.Associate(hDlg,IDB_GETSCRIPT);
LoadSetting(hDlg);
case WM_CLOSE:
GameOver();
EndDialog(hDlg,0);
case WM_COMMAND:
switch (LOWORD(wParam))
case IDB_EXEC:
thMain.Create(MainThread);
BTEXEC.SetEnable(FALSE);
BTSELECT.SetEnable(FALSE);
case IDB_GETSCRIPT:
OPENFILENAME
memset(&ofn,0x00,sizeof(ofn));
ofn.lStructSize=sizeof(ofn);
ofn.hwndOwner=hD
ofn.lpstrFile=ScriptP
ofn.nMaxFile=260;
ofn.lpstrFilter="Text File(*.txt)\0*.txt\0任意文件(*.*)\0*.*\0\0";
if (GetOpenFileName(&ofn)){
BTEXEC.SetEnable(TRUE);
SetWindowText(GetDlgItem(hDlg,IDC_PATH),ScriptPath);
SendMessage(hMainSbr,SB_SETTEXT,0,(LPARAM)"加载脚本成功!");
SendMessage(hMainSbr,SB_SETTEXT,0,(LPARAM)"加载脚本失败!");
LRESULT CALLBACK KeyboardProc(
// hook code
WPARAM wParam,
// virtual-key code
LPARAM lParam
// keystroke-message information
if (code&0)
return CallNextHookEx(hkGame,code,wParam,lParam);
if (wParam==VK_F12 && lParam&0x)
DialogBox(GetModuleHandle("GameDll.dll"),MAKEI***ESOURCE(IDD_DIALOG1),NULL,DlgProc); //第一个参数也可以写作:(HMODULE)LoadLibrar("GameDll.dll")
extern "C" __declspec(dllexport) void StartHook(char *gamename)
strcpy(GameName,gamename);
DWORD TID=GetWindowThreadProcessId(FindWindow(NULL,GameName),NULL);
if (!TID){
MessageBox(0,"请先打开游戏!","提示",MB_OK|MB_ICONINFORMATION);
hkGame=SetWindowsHookEx(WH_KEYBOARD,KeyboardProc,GetModuleHandle("GameDll.dll"),TID);
if (!hkGame){
MessageBox(0,"尝试注入到游戏进程失败!","错误",MB_OK|MB_ICONERROR);
阅读(...) 评论()