Symbian3/PDK/Source/GUID-FF312AAD-E40B-5238-A31C-B34AFD892D5A.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Fri, 22 Jan 2010 18:26:19 +0000
changeset 1 25a17d01db0c
child 3 46218c8b8afa
permissions -rw-r--r--
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-FF312AAD-E40B-5238-A31C-B34AFD892D5A" xml:lang="en"><title>Static
interface DLLs</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>A static interface DLL represents an interface which is defined to its
clients by one or more headers for use at compile time, and an import library
for use at link time. </p>
<p>When a executable that is a client of the DLL is loaded at run-time, the
loader notes that it requires the static interface DLL to be available. The
loader then either loads the DLL or, if it is loaded already, attaches the
new client to it. </p>
<p>In Symbian platform, all static interface DLLs must have a <codeph>uid2</codeph> of <codeph>0x1000008d</codeph>.
The particular static interface DLL is then identified by name and by <codeph>uid3</codeph>. </p>
<p>For example, if a DLL called <filepath>helloview.dll</filepath> is built
with a <codeph>uid3</codeph> of 0x10000252, then the name used in the import
library for ARM builds of Symbian platform is <filepath>helloview[10000252]</filepath>.
When the loader loads the <filepath>helloview.dll</filepath>, it checks that
its UID is <codeph>0x10000252</codeph>. If the <codeph>uid3</codeph> in the
DLL does not match, then the load fails. </p>
<section><title>mmp project specification</title><p>A static interface DLL
project file must specify the correct target type and UID:</p><ul>
<li id="GUID-EBD5092A-1F8F-5715-AFB4-A8183263028C"><p>Specify the <codeph>TARGETTYPE</codeph> line
as: </p> <codeblock id="GUID-0BF51E79-4F88-58FC-9608-C57F1C8F6FF0" xml:space="preserve">TARGETTYPE dll</codeblock> <p>This
implicitly specifies <codeph>UID1</codeph> correctly. </p> </li>
<li id="GUID-2FB86A73-A3D3-5289-B5C3-5D3CE68EE68C"><p>Specify the UID for
the DLL in a <codeph>UID</codeph> line: </p> <p><userinput>UID 0x1000008d
&lt;UID3&gt;</userinput> </p> </li>
</ul> </section>
<example><p>An example of the <filepath>mmp</filepath> project file for a
static DLL is given below: </p><codeblock id="GUID-0690A3DC-3FF4-5FA1-9532-7ED2A0E65C1B" xml:space="preserve">TARGET        CreateStaticDLL.dll
TARGETTYPE    dll
UID           0x1000008d 0x10004268
SOURCEPATH    .
SOURCE        CreateStaticDLL.cpp
USERINCLUDE   .
SYSTEMINCLUDE \Epoc32\include
LIBRARY       euser.lib
EXPORTUNFROZEN</codeblock></example>
</conbody></concept>