I have to write an application, which should work in background, gather keyboard data, and send the new key codes to the foreground window. It is needed for input of cyrilical letters.
Keyboard hooks are not working.
Can you advise a solution
Thank you.

Windows Mobile 2005, keyboard
Rachita
Have you considered writing a Custom Soft Input Panel (SIP)
This would allow you to enter cyrilical letters directly.
See: http://blogs.msdn.com/windowsmobile/archive/2005/02/10/370355.aspx
sigipa
I use keyboard hooks on Windows Pocket PC 2003 and Windows Mobile 5. The hook is in my invisible, out of focus window. I can also send a WM_CLOSE message to this same invisible, out of focus window and it closes the program.
I don't know if sending a WM_CLOSE is different to sending any other keyboard event. It most likely is.
Dale17677
orouit
testqh
Thanks for ur reply.
I am developing managed application in .Net CF 2.0. In one of your posts
http://www.pcreview.co.uk/forums/thread-1298033.php,
I found that
NotSupported exception is typically caused by an incorrect P/Invoke definition, such as using "long" type or complex
structures.In case of SetWindowsHookEx it is caused by you attempting to pass a delegate to the P/Invoked function - this is not supported on Compact Framework. The workarounds are either place hook code into unmanaged code or use the approach I described here:
http://www.alexfeinman.com/callbacks/Callbacks.htm
The page Callbacks.htm is not found.
The Tick
Michael Klucher - MSFT
Why isn't the keyboard hook working It still has to be in a program with a message loop, basically a windowed program. You can force this program to run in the background by using ShowWindow(hWnd, SW_HIDE) . You can then use SendMessage to send messages to the approriate window. If you don't have the handle for the window, use FindWindow .
Is that the sort of stuff you needed to know
Bill Gates II
Sweenie
The window will not receive keyboard messages unless it has focus. It won't be able to get focus unless it is visible.
Hooks are not supported under Windows CE
NathanInNashville
Yes, this is a global hook. A sample can be found here: http://www.infusionblogs.com/blogs/ayakhnin/archive/2006/03/05/399.aspx
On WM 5.0 this API is considered a privileged API (see http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=111354&SiteID=1)