|
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-7572B1F0-66CD-53B8-A479-4A078C9CB28A" xml:lang="en"><title>Module |
|
13 definition file</title><shortdesc>Module definition file contains the list of exported functions |
|
14 of a Polymorphic DLL.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
15 <p>In conventional systems, DLLs may export by name or by ordinal. Symbian |
|
16 platform only supports exporting by ordinal. Exporting by ordinal reduces |
|
17 the time taken to find the item in the DLL export table and also reduces the |
|
18 size of the DLL as names need not be stored. Ordinals are used for accessing |
|
19 the address of a function in the <keyword>DLL export table</keyword>.</p> |
|
20 <p>The only item which should be exported from a polymorphic interface DLL |
|
21 is a function which returns an instance of the object supplied by the DLL; |
|
22 this should be exported at ordinal 1.</p> |
|
23 <p>Once a user program has created an instance of the object supplied by the |
|
24 DLL, other DLL functions may be accessed using the virtual function table; |
|
25 such functions do not need to be exported.</p> |
|
26 <p>A <keyword>module definition file</keyword> (<filepath>.def</filepath>) |
|
27 is a text file which lists the <keyword>exported</keyword> functions of a |
|
28 DLL; it is used in an <keyword>ordinal build</keyword> to insert ordinal information |
|
29 into the DLL export table.</p> |
|
30 <p>It is only necessary to create this file for a polymorphic interface DLL; |
|
31 static interface DLLs use an <keyword>import library</keyword> to obtain relevant |
|
32 information about exported functions.</p> |
|
33 </conbody></concept> |