Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Using an ECOM component

From Wiki
Jump to: navigation, search
Article Metadata
Code Example
Source file: Media:ECom.zip
Tested with
Devices(s): Nokia N95
Compatibility
Platform(s): S60 3rd Edition, FP1
S60 3rd Edition FP1
Article
Keywords: REComSession, TEComResolverParams
Created: tepaa (20 Feb 2008)
Last edited: hamishwillee (30 May 2013)

Contents

Overview

This code snippet demonstrates how to use an ECom component.

Preconditions and important issues

  • An application that loads an ECom component must call REComSession::FinalClose() in its destructor. It signals the destruction of the interface implementation to ECom.

MMP file

...
 
USERINCLUDE .
SYSTEMINCLUDE \Epoc32\include
SYSTEMINCLUDE \Epoc32\include\ecom
 
...
 
LIBRARY ecom.lib

Source file

TBuf<50> string;
 
// Create the ECom implementation
CHelloEcomIF* ecom = CHelloEcomIF::NewL();
CleanupStack::PushL(ecom);
 
// Call ECom
ecom->SayHello(string);
 
// Delete ECom
CleanupStack::PopAndDestroy(ecom);
 
// Close ECom
REComSession::FinalClose();

PKG file

...
 
; The ECom component
"Epoc32\release\gcce\urel\EComExample.dll"
- "!:\sys\bin\EComExample.dll"
"Epoc32\data\z\resource\plugins\EComExample.rsc"
- "!:\resource\plugins\EComExample.rsc"

Postconditions

The application loads the existing ECom component and calls its interface.

See also

This page was last modified on 30 May 2013, at 04:41.
43 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×