thank you, i tried the ToAscii function but got stuck: how can i supply the first and the second parameters? i only have access to wParam and lParam of the messages. thank you.
INA_ctive
Posts
-
The best way to get the keystrokes in ASCII form -
The best way to get the keystrokes in ASCII formI'm using Windows API. Usually i use the GetKeyNameText function, but i found that i'm not satisfied with it since it returns all upper case ascii, it return special character such as the enter and space as ascii "Enter" and "Space". Do you have recommendation about more suitable function or maybe a way to solve this (if there isn't any function like that) thank you very much =)
-
windows api: system wide keyboard hook problemyes, thank you very much it has resolved! i thought since the function resides inside dll it will get the handle of the dll. i spent a few days troubleshooting this problem, thank you very much!
-
windows api: system wide keyboard hook problemIm trying to make a program that does system wide keyboard hook. This program consist of two parts, and those are: 1. a DLL which consist of three functions: InstallHook, HookProc (the hook procedure), and RemoveHook. 2. an EXE which will load the DLL and uses/calls all the functions what the program does is, everytime there's an input from the keyobard it will pop up a messagebox saying "whoa!". the problem is that this program only monitors keystrokes on it's own thread. when the program loses focus, it will not be able to detect keystrokes and output the "whoa!" message anymore. just my thought, i think the problem lies within my installhook function within the DLL, because im not really sure how to fill the third and fourth parameters (msdn kinda confuses me) [code] SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC) HookProc, GetModuleHandle(NULL), 0); [/code] this is the full source code of the program. DLL source : http://pastebin.com/468968 Exe Source : http://pastebin.com/468969 This problem really confuses me since there are no error displayed on the compiler, and the program just looks fine without crash or anything. Thank you very much for your time and help. - Ganeshwara -- modified at 3:40 Monday 19th December, 2005
-
w32 api (hooking) : Problem with GetProcAddress and callback (__stdcall) functionthank you, i'll try it =)
-
w32 api (hooking) : Problem with GetProcAddress and callback (__stdcall) functionI have a function inside a DLL that acts as a hook procedure. it has an __stdcall attribute. When i tried to retrieve the function pointer via another exe with GetProcAddress it always fails, and it only works after i remove the __stdcall attribute. How can i retrieve the function pointer of this callback function properly? Is there any difference in the way of retriving function pointer of regular function and callback function? *** code *** this is the hookproc function: LRESULT CALLBACK HookProc(int nCode, WPARAM w, LPARAM l) { return CallNextHookEx(NULL, nCode, w, l); } and this is how i call it in another exe: FARPROC HookProc = NULL; HookProc = GetProcAddress(HookDLL, "HookProc"); *** end of code *** thank you very much. - Ganeshwara