03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

loopback. This does exactly what you might expect – anything sent via SendL() is<br />

immediately delivered to GdpHandleL(), looping the data back.<br />

ECOM interface implementations are delivered as DLLs, as you might expect. A single DLL<br />

can have both implement multiple interfaces, and provide multiple implementations of each<br />

interface. However, we're only interested in one interface (the GDP one) and one<br />

implementation (the loopback one).<br />

Here is the .mmp file for the gdploop.dll:<br />

// gdploop.mmp<br />

TARGET gdploop.dll<br />

TARGETTYPE ECOMIIC<br />

UID 0x10009D8D 0x101F8B54<br />

SOURCE gdploop.cpp<br />

USERINCLUDE .<br />

SYSTEMINCLUDE \epoc32\include<br />

SYSTEMINCLUDE \epoc32\include\ecom<br />

RESOURCE 101F8B54.rss<br />

LIBRARY gdp.lib euser.lib ecom.lib<br />

As this is an ECOM plug-in, the TARGETTYPE is ECOMIIC.All ECOM DLLs must have a<br />

second UID of 0x10009D8D, which I duly specify. The third UID identifies the DLL, and<br />

ECOM requires this to be present. Although this DLL is not a UI component, it still specifies<br />

a resource file 101F8B54.rss via the RESOURCE keyword. This file is central to making<br />

ECOM work:<br />

#include "RegistryInfo.rh"<br />

RESOURCE REGISTRY_INFO theInfo<br />

{<br />

dll_uid = 0x101F8B54;<br />

interfaces =<br />

{<br />

INTERFACE_INFO<br />

{<br />

interface_uid = 0x101F8B52;<br />

implementations =<br />

{<br />

IMPLEMENTATION_INFO<br />

{<br />

implementation_uid = 0x101F8B53;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!