自己做的个DLL叫“CF自动卡BUG”,C++的,我加载了无效,怎么滴,各位大虾看看

社区服务
高级搜索
猴岛论坛电脑百科自己做的个DLL叫“CF自动卡BUG”,C++的,我加载了无效,怎么滴,各位大虾看看
发帖 回复
倒序阅读 最近浏览的帖子最近浏览的版块
2个回复

自己做的个DLL叫“CF自动卡BUG”,C++的,我加载了无效,怎么滴,各位大虾看看

楼层直达
shenchiyuan3

ZxID:10609140

等级: 列兵
举报 只看楼主 使用道具 楼主   发表于: 2010-12-18 0
自己做的个DLL叫“CF自动卡BUG”,C++的,我加载了无效,怎么滴,各位大虾看看,那个keybd_event无效额
#include <windows.h>
HWND hWnd;
HHOOK g;
void c();
void CALLBACK p(HWND hWnd,UINT nMsg,UINT nTimerid,DWORD dwTime)
{
  switch(nMsg)
  {
  case WM_TIMER:c();break;
  }
}
void c2()
{
keybd_event(0x11,0,0,0);
  keybd_event(0x20,0,0,0);
  Sleep(700);
  keybd_event(0x20,0,KEYEVENTF_KEYUP,0);
  Sleep(700);
  keybd_event(0x57,0,0,0);
  Sleep(300);
  keybd_event(0x57,0,KEYEVENTF_KEYUP,0);
  Sleep(300);
  keybd_event(0x53,0,0,0);
  Sleep(300);
  keybd_event(0x53,0,KEYEVENTF_KEYUP,0);
  Sleep(300);
  keybd_event(0x57,0,0,0);
  Sleep(800);
  keybd_event(0x11,0,KEYEVENTF_KEYUP,0);
  keybd_event(0x11,0,0,0);
  keybd_event(0x11,0,KEYEVENTF_KEYUP,0);
  keybd_event(0x57,0,KEYEVENTF_KEYUP,0);
}
void c1()
{
  keybd_event(0x11,0,0,0);
  keybd_event(0x20,0,0,0);
  Sleep(700);
  keybd_event(0x20,0,KEYEVENTF_KEYUP,0);
  Sleep(700);
  keybd_event(0x57,0,0,0);
  Sleep(300);
  keybd_event(0x57,0,KEYEVENTF_KEYUP,0);
  Sleep(300);
  keybd_event(0x53,0,0,0);
  Sleep(300);
  keybd_event(0x53,0,KEYEVENTF_KEYUP,0);
  Sleep(300);
  keybd_event(0x57,0,0,0);
  Sleep(300);
  keybd_event(0x57,0,KEYEVENTF_KEYUP,0);
  Sleep(300);
  keybd_event(0x53,0,0,0);
  Sleep(300);
  keybd_event(0x53,0,KEYEVENTF_KEYUP,0);
  Sleep(300);
  keybd_event(0x57,0,0,0);
  Sleep(800);
  keybd_event(0x11,0,KEYEVENTF_KEYUP,0);
  keybd_event(0x11,0,0,0);
  keybd_event(0x11,0,KEYEVENTF_KEYUP,0);
  keybd_event(0x57,0,KEYEVENTF_KEYUP,0);
}
LRESULT CALLBACK b(int code,WPARAM wParam,LPARAM lParam)
{
  switch(wParam)
  {
  case VK_F1:c1();break;
    case VK_F2:c2();break;
  }
  return CallNextHookEx(g,code,wParam,lParam);
}
BOOL WINAPI DllMain(
  HANDLE hinstDLL,
  DWORD dwReason,
  LPVOID lpvReserved
)
{
  switch(dwReason)
  {
  case DLL_PROCESS_ATTACH:
    {
      SetTimer(NULL,0,800,TIMERPROC(p));
      DWORD k=GetWindowThreadProcessId(hWnd,NULL);
      g=SetWindowsHookEx(WH_KEYBOARD,(HOOKPROC)b,GetModuleHandle("CF自动卡BUG.dll"),k);
      break;
    }
  }
  return 1;
}
void c()
{
  hWnd=FindWindow(NULL,"CrossFire");
  if(hWnd)
  {
    KillTimer(hWnd,0);
  }
}
淡淡の煙草味

ZxID:1549115

等级: 少将
原来 花开是结束 终结我们各自仅有的绚烂  &nb

举报 只看该作者 沙发   发表于: 2010-12-18 0
C++的不懂


E的懂。。。
冬寒、雪未飘

ZxID:11878703

等级: 大将

举报 只看该作者 板凳   发表于: 2010-12-19 0
C++不懂

« 返回列表
发帖 回复