Understanding the Ecom in Symbian

Source: Internet
Author: User

Symbian also has a Windows Com-like mechanism that is used as a binary interface standard between modules.

Ecom is much simpler than Windows COM, with no GUIDs, no IUnknown, no marshal, no many other things ...

So, what's left? One by one.

First and COM as your DLL to register, so that others can find you, the difference is not registered to the registry, DLL also does not elicit registration of the registration of the function (no similar dllregisterserver and dllunregisterserver things), But write an RSS file, which write your ecom registration information, this RSS file compiled to generate RSC files, put into the system Ecom plug-in registry directory, so that the system can be found in the file of the information you ecom DLL. This RSS is not difficult to write, basically copy a change ID is good.

The only thing to note is that the RSC file name that is generated after the RSS compilation is the same as the DLL file name.

* Note: Here's RSS and blog that RSS is not a concept, Symbian inside the resource file is the exhibition name is RSS.

Then, your DLL must implement an extraction function

Export_c Const timplementationproxy* Implementationgroupproxy (tint& atablecount);

This is necessary, and this function returns an array of structures that describes the ID of all the objects that this DLL contains and a pointer to the factory function.

Typically, this function returns a global variable in a DLL, such as:

const TImplementationProxy ImplementationTable[] =
{
IMPLEMENTATION_PROXY_ENTRY(0x13457890, CFoo::NewL)
};

CFOO::NEWL will return a, cfoo*, and Cfoo must have implemented the ID 0x13457890 corresponding interface.

It's so simple, it's very primitive compared to Windows COM, but ecom is very widely used in Symbian and S60.

Because the handset system needs the extremely strong customization ability, most functions are realized by the ecom, the different version difference many is by the release time uses the different ecom to do. Ecom DLLs are not the same as other generic DLLs when making a cell phone ROM, ecom will have a separate area and indexing to ensure that ecom loads faster than other DLLs. So some of the data files will be made into ecom, because the load is relatively fast.

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.