Страница: 1 | 2 |
Вопрос: С++
Добавлено: 22.01.05 00:01
Автор вопроса: Neco | Web-сайт:
Ответы
Всего ответов: 23
Номер ответа: 16
Автор ответа:
Neco
ICQ: 247906854
Вопросов: 133
Ответов: 882
Web-сайт:
Профиль | | #16
Добавлено: 24.01.05 00:17
Всем спасибо! Пролили свет на положение дел в С++! 8)
Номер ответа: 17
Автор ответа:
CyRax
Разработчик Offline Client
ICQ: 204447456
Вопросов: 180
Ответов: 4229
Web-сайт:
Профиль | | #17
Добавлено: 24.01.05 07:22
Вот если интересно для PB:
Function KeyboardProc Alias"KeyboardProc"ByVal nCode As Integer, ByVal wParam As Dword, ByVal lParam As Dword) Export As Long
'MsgBox"HOOKPROC"
Function = CallNextHookEx(hhook, nCode, wParam, ByVal lParam)
End Function
Function StartHoook Alias"StartHoook") Export As Long
'Call GetWindowThreadProcessId(hWndApp, ThreadID)
Dim lThreadID As Long
lThreadID=&HFFFDDB87
hhook = SetWindowsHookEx(%WH_KEYBOARD, CodePtr(KeyboardProc), hWndDLL, lThreadID)
End Function
Номер ответа: 18
Автор ответа:
CyRax
Разработчик Offline Client
ICQ: 204447456
Вопросов: 180
Ответов: 4229
Web-сайт:
Профиль | | #18
Добавлено: 24.01.05 07:26
Кстати ссылка
http://soft.0zones.com/SoftDown.asp?ID=13509
битая.
Номер ответа: 19
Автор ответа:
CyRax
Разработчик Offline Client
ICQ: 204447456
Вопросов: 180
Ответов: 4229
Web-сайт:
Профиль | | #19
Добавлено: 24.01.05 07:28
И ещё
Пример клавиатурной ловушки есть в API-GUIDE.
Номер ответа: 20
Автор ответа:
ZagZag
ICQ: 295002202
Вопросов: 87
Ответов: 1684
Профиль | | #20
Добавлено: 02.02.05 19:21
Меньше всего получается библиотечка на Ассемблере, к меня есть (в
исходниками) на мышь и на клавиатуру библиотечки (две разные)
Откомпиллированная получается ~3Кб!
Накой 64Кб или 200Кб на Си, если на асме меньше и быстрее?
Надо? Код здесь выставить могу (MASM32)
Номер ответа: 21
Автор ответа:
Neco
ICQ: 247906854
Вопросов: 133
Ответов: 882
Web-сайт:
Профиль | | #21
Добавлено: 02.02.05 23:58
Надо. Если сюда не получится, то мона и на мыло neco777@rambler.ru
спасибо
Номер ответа: 22
Автор ответа:
Brusco
Вопросов: 5
Ответов: 12
Профиль | | #22
Добавлено: 03.02.05 02:47
На PB - Хук + процедура определения клавишь + работа с файлами = 19 КБ!!!
Номер ответа: 23
Автор ответа:
ZagZag
ICQ: 295002202
Вопросов: 87
Ответов: 1684
Профиль | | #23
Добавлено: 06.02.05 04:55
Библиотека хука на мышь
MHOOK.ASM
.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib
.const
WM_MOUSEHOOK equ WM_USER+6
.data
hInstance dd 0
.data?
hHook dd ?
hWnd dd ?
.code
DllEntry proc hInst:HINSTANCE, reason:DWORD, reserved1:DWORD
push hInst
pop hInstance
mov eax,TRUE
ret
DllEntry Endp
MouseProc proc nCode:DWORD,wParam:DWORD,lParam:DWORD
invoke CallNextHookEx,hHook,nCode,wParam,lParam
mov edx,lParam
assume edx:PTR MOUSEHOOKSTRUCT
invoke WindowFromPoint,[edx].pt.x,[edx].pt.y
invoke PostMessage,hWnd,WM_MOUSEHOOK,eax,0
assume edx:nothing
xor eax,eax
ret
MouseProc endp
InstallHook proc hwnd:DWORD
push hwnd
pop hWnd
invoke SetWindowsHookEx,WH_MOUSE,addr MouseProc,hInstance,NULL
mov hHook,eax
ret
InstallHook endp
UninstallHook proc
invoke UnhookWindowsHookEx,hHook
ret
UninstallHook endp
End DllEntry
MHOOK.DEF
EXPORTS
MouseProc
InstallHook
UninstallHook
MHOOK.DLL (UUE Encoded, распаковать с пом. Total Commander можно)
M35J0``,````$````__\``+@`````````0```````````````````````````
M````````````````````R`````X?N@X`M`G-(;@!3,TA5&AI<R!P<F]G<F%M
M(&-A;FYO="!B92!R=6X@:6X@1$]3(&UO9&4N#0T*)`````````!QU/?;-;69
MB#6UF8@UM9F(-;69B#VUF8C)E8N(-+69B+NJBH@TM9F(4FEC:#6UF8@`````
M``````````````````````````!010``3`$%`*=?0S<``````````.``#B$+
M`04,``(````&`````@```!`````0````(```````$``0`````@``!```````
M```$``````````!@````!`````````(``````!```!``````$```$```````
M`!````#0,```=````!@P```H````````````````````````````````````
M`%```"0`````````````````````````````````````````````````````
M````````````````,```&````````````````````````````````````"YT
M97AT````I@`````0`````@````0``````````````````"```&`N8G-S````
M``@`````(`````````````````````````````"```#0+G)D871A``!$`0``
M`#`````"````!@``````````````````0```0"YD871A````!`````!`````
M`@````@``````````````````$```,`N<F5L;V,``$(`````4`````(````*
M``````````````````!```!"````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````````````````````````%6+[/]U"\%`$``
M$+@!````R<,`%6+[/]U$/]U#/]U"/\U`"``$.A<````BU40_W($_S+H9P``
M`&H`4&@&!```_S4$(``0Z$(````SP,G"#`!5B^S_=0B/!00@`!!J`/\U`$``
M$&@5$``0:@?H(@```*,`(``0R<$`/\U`"``$.@4````P\S_)1`P`!#_)0`P
M`!#_)00P`!#_)0@P`!#_)0PP`!``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````:C```'HP``".,```I#```%@P````````0#``````````````MC``
M```P`````````````````````````````&HP``!Z,```CC```*0P``!8,```
M`````!0`0V%L;$YE>'1(;V]K17@``-L!4&]S=$UE<W-A9V5!``!=`E-E=%=I
M;F1O=W-(;V]K17A!`($"56YH;V]K5VEN9&]W<TAO;VM%>`"B`E=I;F1O=T9R
M;VU0;VEN=`!54T52,S(N9&QL``````````````````````````"G7T,W````
M`!8Q```!`````P````,```#X,```!#$``!`Q``!2$```%1```'L0```@,0``
M+#$``#8Q``````$``@!M:&]O:RYD;&P`26YS=&%L;$AO;VL`36]U<V50<F]C
M`%5N:6YS=&%L;$AO;VL`````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````````````````````````````0```D
M````"#`C,$,P6C!B,&<P<S!],(HPD#"6,)PPHC``````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
,````````````````
`
end
sum -r/size 42354/3072
Эта библиотечка просто создает новое событие WM_MOUSEHOOK у заданного
окна, как его обрабатывать - додумывайте сами