Symbian3/PDK/Source/GUID-4FFA793B-9E57-5D59-B9A7-528F11C4852E.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-4FFA793B-9E57-5D59-B9A7-528F11C4852E" xml:lang="en"><title>Locating
       
    13 a DLL</title><shortdesc>A polymorphic DLL is loaded by calling one of the <codeph>Load()</codeph> member
       
    14 functions of an <codeph>RLibrary</codeph> object.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <p> <codeph>Load()</codeph> has three overloaded variants but they all behave
       
    16 in a similar way. They are prototyped: </p>
       
    17 <codeblock id="GUID-4A689563-CCC7-5C98-B75A-7A0E8DF31BBA" xml:space="preserve">TInt Load(const TDesC&amp; aFileName,const TDesC&amp; aPath,const TUidType&amp; aType);
       
    18 TInt Load(const TDesC&amp; aFileName,const TUidType&amp; aType);
       
    19 TInt Load(const TDesC&amp; aFileName,const TDesC&amp; aPath=KNullDesC);</codeblock>
       
    20 <p>The arguments determine how the DLL is to be found. The rules are summarised
       
    21 as follows: </p>
       
    22 <ul>
       
    23 <li id="GUID-36D6A634-8CB3-57E9-BAB9-5C70C7EF106A"><p>If <codeph>aFileName</codeph> is
       
    24 a fully defined filename, i.e. it includes a path specification, then the
       
    25 contents of <codeph>aPath</codeph> are ignored and an attempt is made to load <codeph>aFileName</codeph>,
       
    26 if specified; if this DLL cannot be found, then the load operation fails and
       
    27 no further searching is done. </p> </li>
       
    28 <li id="GUID-50FBE6FD-5AD3-5732-8A24-91A0B0B5ABB1"><p>if <codeph>aFileName</codeph> does
       
    29 not have an extension, an extension of <filepath>.DLL</filepath> is assumed. </p> </li>
       
    30 <li id="GUID-61547446-A954-5EF2-A77C-D0C4B2D0B4EB"><p>If <codeph>aFileName</codeph> contains
       
    31 a file name but does <i>not</i> include a path specification (e.g. <filepath>EULIBDR1.DLL</filepath>),
       
    32 then a search is done in the following locations in the order given: </p> <ul>
       
    33 <li id="GUID-C0A63546-FE94-5B06-824D-83A4B77583BE"><p>the path defined in <codeph>aPath</codeph>,
       
    34 if specified </p> </li>
       
    35 <li id="GUID-72315ED1-4593-5D69-90DD-CE813A091F4B"><p>the system path <filepath>\sys\bin\</filepath> on
       
    36 each attached drive. Drives are searched in the order: <filepath>C:</filepath> (the
       
    37 device's main internal drive), then <filepath>Y:</filepath>, <filepath>X:</filepath>, <filepath>W:</filepath>, <filepath>V:</filepath>, <filepath>U:</filepath>, ..., <filepath>D:</filepath>, <filepath>B:</filepath>, <filepath>A:</filepath> and
       
    38 finally, drive <filepath>Z:</filepath> (the ROM). </p> </li>
       
    39 </ul> </li>
       
    40 <li id="GUID-2EBA5162-3E09-510A-B65F-024CC5FF011E"><p>If <codeph>aType</codeph> is
       
    41 specified, then the UIDType of the loaded DLL must match <codeph>aType</codeph>.
       
    42 If <codeph>aType</codeph> is <codeph>KNullUid</codeph>, or the variant of <codeph>Load()</codeph> that
       
    43 does not take <codeph>aType</codeph> is called, then the loaded DLL will have
       
    44 the name <codeph>aFileName</codeph> and may have any UIDType. </p> </li>
       
    45 </ul>
       
    46 <p>Note that in WINS debug mode, the system path is <filepath>\epoc32\release\wins\udeb\</filepath> on
       
    47 the current PC drive; in WINS release mode, the system path is <filepath>\epoc32\release\wins\urel\</filepath> on
       
    48 the current PC drive. For WINSCW, the paths are the same as for WINS, except
       
    49 that <filepath>wins\</filepath> becomes <filepath>winscw\</filepath>. </p>
       
    50 <p>Note also that, in contrast with the usual convention, <codeph>aPath</codeph> specifies
       
    51 a list of directories, each one separated by a semicolon. </p>
       
    52 <p>See also: </p>
       
    53 <ul>
       
    54 <li id="GUID-2B04DF55-F0A3-5755-905D-8BB243A6BC36"><p> <xref href="GUID-98CC1E75-D2DE-3700-928C-7D530237ECBA.dita"><apiname>TFindFile</apiname></xref> </p> </li>
       
    55 </ul>
       
    56 </conbody></concept>