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