pengzong155 发表于 2012-2-9 14:56:22

AutoCad中怎么使用hook啊 弄了两天了还没弄出来 急啊

arx中做了如下代码测试:
#include "StdAfx.h"
#include "rxmfcapi.h"
BOOL Hook(MSG * pMsg);
voidAccelerator();
static BOOL filterCtrlKeyDone=FALSE;
voidAccelerator()
{
if(acedRegisterFilterWinMsg(Hook)==TRUE){
filterCtrlKeyDone=TRUE;
}
return;
}
BOOLHook(MSG * pMsg)
{
return FALSE;
}
但不知为什么总是出现链接错误,错误如下:
Error 19 error LNK2028: unresolved token (0A000038) "int __cdecl acedRegisterFilterWinMsg(int (__cdecl*const)(struct tagMSG *))" (?acedRegisterFilterWinMsg@@$$FYAHQ6AHPAUtagMSG@@@Z@Z) referenced in function "void __cdecl Accelerator(void)" (?Accelerator@@$$FYAXXZ) Hook.obj
Error 20 error LNK2019: unresolved external symbol "int __cdecl acedRegisterFilterWinMsg(int (__cdecl*const)(struct tagMSG *))" (?acedRegisterFilterWinMsg@@$$FYAHQ6AHPAUtagMSG@@@Z@Z) referenced in function "void __cdecl Accelerator(void)" (?Accelerator@@$$FYAXXZ) Hook.obj

不知道哪位大牛能看看,帮忙解决下么? 不甚感激啊!!

pengzong155 发表于 2012-2-9 17:32:25

哎   没人帮忙   还是自己弄了

luowy 发表于 2012-2-10 11:52:21

我也看不出来问题在哪里,下次求助,用代码模式
页: [1]
查看完整版本: AutoCad中怎么使用hook啊 弄了两天了还没弄出来 急啊