SendInput Function
--------------------------------------------------------------------------------
The SendInput function synthesizes keystrokes, mouse motions, and button clicks.
Syntax
UINT SendInput( UINT nInputs,
LPINPUT pInputs,
int cbSize
);
Parameters
nInputs
[in] Specifies the number of structures in the pInputs array.
pInputs
[in] Pointer to an array of INPUT structures. Each structure represents an event to be inserted into the keyboard or mouse input stream.
cbSize
[in] Specifies the size, in bytes, of an INPUT structure. If cbSize is not the size of an INPUT structure, the function will fail.
Return Value
The function returns the number of events that it successfully inserted into the keyboard or mouse input stream. If the function returns zero, the input was already blocked by another thread.
To get extended error information, call GetLastError.
Remarks
The SendInput function inserts the events in the INPUT structures serially into the keyboard or mouse input stream. These events aren't interspersed with other keyboard or mouse input events inserted either by the user (with the keyboard or mouse) or by calls to keybd_event, mouse_event, or other calls to SendInput.
This function does not reset the keyboard's current state. Any keys that are already pressed when the function is called might interfere with the events that this function generates. To avoid this problem, check the keyboard's state with the GetAsyncKeyState function and correct as necessary.
引用第7楼我是誰于2006-11-06 14:36发表的“”:
一般,反外挂只是针对Hook及修改内存和封包的。针对键盘鼠标模拟类的,并没有什么“屏蔽API”的说法。只不过游戏响应的消息不同而已。要验证游戏能不能用外挂,使用“按键精灵”试试就知道了。只要按键精灵有用,你自己同样也能实现。自己多调试一下就行。
我现在在做的外挂,是梦幻西游里自动任务外挂,从NPC接任务,再分析任务,到目的地抓怪。基本上也就是分析像素及键鼠模拟。技术上也较简单。不过因为是别人订做的,涉及到商业机密,就恕我不能给你看了。
引用第11楼qiuq86于2006-11-07 13:26发表的“”:
那个十一秒是因为我在用的是C-Free,好多c标准库函数都不支持的,呵呵,见笑了 [s:64]
欢迎光临 碧海潮声大学生网 (http://www.zjoubbs.com/) | Powered by Discuz! X3.2 |