Namespaces
Variants
Actions

Using an ECOM component

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

Article
Keywords: REComSession, TEComResolverParams
Created: tepaa (20 Feb 2008)
Last edited: lpvalente (21 Jul 2012)

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 21 July 2012, at 23:12.
170 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved