Symbian3/PDK/Source/GUID-38CF8A8E-4778-5374-8AC6-5F9486A2B7FB.dita
changeset 1 25a17d01db0c
child 3 46218c8b8afa
equal deleted inserted replaced
0:89d6a7a84779 1:25a17d01db0c
       
     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-38CF8A8E-4778-5374-8AC6-5F9486A2B7FB" xml:lang="en"><title>The polymorphic
       
    13 interface DLL</title><shortdesc>A polymorphic interface DLL is one which is written to implement
       
    14 a programming interface defined elsewhere; for example, a device driver, an
       
    15 application or an OPL extension.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    16 <p>The API is defined in terms of a single abstract class whose functions
       
    17 are declared as pure virtual. The DLL <i>implements</i> the API by defining
       
    18 and implementing a concrete class derived from that abstract class. The DLL
       
    19 exports a single function whose sole purpose is to create an object of the
       
    20 derived class type; this is always the function at ordinal 1 within the DLL.
       
    21 All other functions in the DLL are called through the virtual table mechanism
       
    22 (the pointer to the vtable is set up by the constructor in the normal C++
       
    23 way).</p>
       
    24 <p>At compilation time, application code includes the header file(s) which
       
    25 define(s) the API. At link time, the application includes the DLL's module
       
    26 definition file, which allows the address of the DLL function to be accessed
       
    27 by specifying its ordinal.</p>
       
    28 <p>When the application's executable runs, it loads the DLL at the time it
       
    29 is required. The address of the single function exported by the DLL is accessed
       
    30 indirectly by specifying its ordinal.</p>
       
    31 <p>For a given interface, there may be many DLLs which obey the protocol imposed
       
    32 by that interface each of which provides a different implementation.</p>
       
    33 <p>A DLL of this type is often referred to as a dynamically loaded DLL.</p>
       
    34 <p>The user of a dynamically loaded DLL uses an <codeph>RLibrary</codeph> type
       
    35 object to load the DLL. The <codeph>RLibrary</codeph> object encapsulates
       
    36 a handle to the DLL and must remain in existence while the DLL is in use;
       
    37 typically this is for the life of the object provided by the DLL.</p>
       
    38 </conbody></concept>