还是关于钩子(50分)

  • 主题发起人 主题发起人 ff_ff
  • 开始时间 开始时间
F

ff_ff

Unregistered / Unconfirmed
GUEST, unregistred user!
1.<br>谢谢大家,还有几个小问题<br>hHk:=SetWindowsHookEx(13,@keyHookProc,HINSTANCE,0);<br>这里的13是自定义的,<br>只要和这里<br> { SetWindowsHook() codes }<br> &nbsp;{$EXTERNALSYM WH_MIN}<br> &nbsp;WH_MIN = -1;<br> &nbsp;{$EXTERNALSYM WH_MSGFILTER}<br> &nbsp;WH_MSGFILTER = -1;<br> &nbsp;{$EXTERNALSYM WH_JOURNALRECORD}<br> &nbsp;WH_JOURNALRECORD = 0;<br> &nbsp;{$EXTERNALSYM WH_JOURNALPLAYBACK}<br> &nbsp;WH_JOURNALPLAYBACK = 1;<br> &nbsp;{$EXTERNALSYM WH_KEYBOARD}<br> &nbsp;WH_KEYBOARD = 2;<br> &nbsp;{$EXTERNALSYM WH_GETMESSAGE}<br> &nbsp;WH_GETMESSAGE = 3;<br> &nbsp;{$EXTERNALSYM WH_CALLWNDPROC}<br> &nbsp;WH_CALLWNDPROC = 4;<br> &nbsp;{$EXTERNALSYM WH_CBT}<br> &nbsp;WH_CBT = 5;<br> &nbsp;{$EXTERNALSYM WH_SYSMSGFILTER}<br> &nbsp;WH_SYSMSGFILTER = 6;<br> &nbsp;{$EXTERNALSYM WH_MOUSE}<br> &nbsp;WH_MOUSE = 7;<br> &nbsp;{$EXTERNALSYM WH_HARDWARE}<br> &nbsp;WH_HARDWARE = 8;<br> &nbsp;{$EXTERNALSYM WH_DEBUG}<br> &nbsp;WH_DEBUG = 9;<br> &nbsp;{$EXTERNALSYM WH_SHELL}<br> &nbsp;WH_SHELL = 10;<br> &nbsp;{$EXTERNALSYM WH_FOREGROUNDIDLE}<br> &nbsp;WH_FOREGROUNDIDLE = 11;<br> &nbsp;{$EXTERNALSYM WH_CALLWNDPROCRET}<br> &nbsp;WH_CALLWNDPROCRET = 12;<br> &nbsp;{$EXTERNALSYM WH_MAX}<br> &nbsp;WH_MAX = 12;<br> &nbsp;{$EXTERNALSYM WH_MINHOOK}<br> &nbsp;WH_MINHOOK = WH_MIN;<br> &nbsp;{$EXTERNALSYM WH_MAXHOOK}<br> &nbsp;WH_MAXHOOK = WH_MAX;<br>不一样就行吗?<br> &nbsp;WH_CALLWNDPROCRET = 12;<br> &nbsp;WH_MAX = 12;这两个为什么相同呢?<br>2.type<br> &nbsp;PKBDDLLHOOKSTRUCT = ^KBDDLLHOOKSTRUCT;<br> &nbsp;KBDDLLHOOKSTRUCT=record<br> &nbsp; &nbsp;vkCode: DWORD;<br> &nbsp; &nbsp;ScanCode: DWORD;<br> &nbsp; &nbsp;Flags: DWORD;<br> &nbsp; &nbsp;Time: DWORD;<br> &nbsp; &nbsp;dwExtraInfo: DWORD;<br> &nbsp;end;<br>这个结构体Delphi中没有自带,每次自已写,是不是很麻烦,有没有好办法呢?<br>楼上的兄弟别急,一会一并给分,如果不够,可以再加
 
我说得不清楚吗?大家帮帮忙,谢谢
 
就没人说两 句。
 
咳,我的帖子想结都不知给谁?<br>高手哪里去啦?<br>世道变啦
 
搞Delphi的人越来越少啦.
 
你在一个公用单元写这个。其他单元引用它。
 
用公共单元写,放到哪里呢?<br>WH_CALLWNDPROCRET = 12;<br>WH_MAX = 12;这个是做什么用的?<br>wh_
 
接受答案了.
 
后退
顶部