Welcome to MSDN Blogs Sign in | Join | Help
Capture all Windows Mobile device keys using the AllKeys API

Norm Sohl points out in his post on the Windows Mobile Team blog that Microsoft is taking further steps to deprecate the GAPI APIs. Check it out here. Norm’s post includes a native code sample. Some folks have asked if AllKeys() can be used from managed code. The answer is yes. Here is the C# P/Invoke signature:

[DllImport("coredll.dll", SetLastError = true)]
static extern bool AllKeys(bool bAllKeys);

Mike

P.S. If you need to capture a specific key, see RegisterHotKey().

Posted: Saturday, March 28, 2009 12:49 PM by mjf

Comments

Harshal said:

Hi,

Is there any way to disable the camera button on HTC S710? I tried allkeys(true) but the camera and function buttons are still working. I want to make all of them disabled. Please let me know.

Regards,

Harshal

# June 1, 2009 10:45 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker