Brew advanced and proficient-3G mobile value-added business operation, customization and development-81-brew shared memory for inter-Application Communication

Source: Internet
Author: User

In fact, event transmission is essentially a shared memory communication method. Iclipboard can be used to cut and paste data in the aee layer. It is another important form of shared memory communication. Because the Clipboard data may still exist after the application ends, this function will allocate new memory and copy the content to the new buffer, that is, the system memory exists in the allocated iclipboard_set, so it can be used by other applications. If the pointer is null or the value is 0, the existing Clipboard data will be released.

When the target application wants to obtain the communication content from the clipboard, it needs to use iclipboard_enuminit () to initialize the enumeration context of each format in the clipboard, and then call iclipboard_getdata () to copy the Clipboard data in the specified format to the target buffer zone, if the data in the clipboard is not required by the target application, you need to call iclipboard_enumnext () to return the next available/registered clipboard format for further processing, and so on. After the target application is processed, you can call iclipboard_empty () to delete all data in all formats from the clipboard. If the last application does not call iclipboard_empty to release the clipboard and brew exits after the handheld device is shut down, all data on the clipboard will be lost.

It should be noted that the data on the clipboard will be updated when data is added and may be updated at any time. At this time, you need to call iclipboard_getsequence () to let the caller determine whether the clipboard has been updated, the serial number only increases the count when data is added. data deletion does not affect the serial number. After the handheld device is shut down and then powered on, the serial number will be reset.

Related Article

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.