C # programming in wince -- Cross-process event synchronization

Source: Internet
Author: User

For event synchronization, eventwaithandle is encapsulated in C #, which is very convenient to use. Even in the wince system, autoresetevent and manualresetevent are still supported. However, if you want to cross-process, you must use eventwaithandle (I don't know if I am alone, but I don't know if there are other methods ). Unfortunately, this class is not supported in the wince system. For this reason, I was depressed for a while.

In desperation, prepare to call the API functions-openevent, setevent, and resetevent. The result is that only openevent is successfully called, and both setevent and resetevent fail to be called. At the beginning, I still suspected that my code was wrong. Later I checked coredll. dll, and there were no setevent or resetevent functions. For this reason, I am so angry with the class C # language.

When checking coredll. dll, we accidentally found a good function ceeventmodify (handle hhandle, uint func). As long as the func value is changed, we can implement the setevent or resetevent function. Oh, it seems that God cares for me!

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.