????2??????????????

????1????????????????

??????????????UINT SendInput(

????UINT nInputs?? // count of input events

????LPINPUT pInputs?? // array of input events

????int cbSize // size of structure

????);api????

???????????????????????????????????????????????????????????????????????????????????????С??????????????????????????????????

?????????????????и??????????VOID keybd_event(
BYTE bVk?? // ???????
BYTE bScan?? // ?????
DWORD dwFlags??
ULONG_PTR dwExtraInfo // ???????
);

??????
VOID mouse_event(
DWORD dwFlags?? // motion and click options
DWORD dx?? // horizontal position or change
DWORD dy?? // vertical position or change
DWORD dwData?? // wheel movement
ULONG_PTR dwExtraInfo // application-defined information
);

????????????????????????????Щ???????????????????????????????????????????????????.

?????????????????????????????????????????????????????У?????????????????????????????????????????????GetWindow????????????????????Findwindow???????????????????????????FindWindowEx????FindwindowEx?????????????????????簴???????????.??????л???????????????????FindWindowEx??????Щ??????????????????ж????????????????????????????????GetWindowInfo??????Щ?????????統(tǒng)????????????????????????????????л????????.?е??????п???????棬??????????????任??????????????????????.??????????????????????????.

???????????????????????????????????????hook??????????????????????????????????????????hook???????SetWindowHook??????????????????????????????????????????????????????????????????????.??????????????????????msdn????SetWindowHook??????????????????????ú??????????????????????????е???????????????????е???????????????????????????????

????2????????

??????Щ??????????????????????????????????????????????????????????????????????????Щ??????????.

??????????????????????hook?????????????????????????????????????????????????????????????????????????????????????????????????????????д??????????????????????????????SetWindowHook??д?????????????????.

?????????????????????????????????????????????????????洦???Щ??????????ж???????????????????????ζ???????????Щ??????????Σ????????????????????????????????????????????????????????????????????????????????????????к????????????????????????