Solution for intercepting meizu M8 system messages under. Net CF, including M keys and USB status change events

Source: Internet
Author: User
. Net CF system message blocking solution, including the M key, USB status change event compressed package contains a DLL and C # reference Code.

 

The principle is very simple. Use C ++ to write a DLL and then listen to it in the DLL.SystemMessage. If the message is sent to C # message ***, the message is forwarded to C # message ***.
C # contains a message ***, which receives the message belonging to the window. The corresponding processing is fine.

Exported
Uint mzgethomekeymessage ();
Int registerusbnotifymsg ();
Int getusbconnecttype ();
Three necessary API functions can be called directly.

According to mayaqcn's usage return, unlocking the screen will trigger a USB status change event.
This may be because a Message ID conflicts with a USB message.
SolutionThe solution is: after receiving the USB message, call getusbconnecttype () to determine the USB status. If the status changes, the USB status changes.

Prtscn20091230212142.png(174.23 KB)
TestHardwareKey@200912302207.rar (69.03 KB)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.