Symbian3/SDK/Source/GUID-4FFA793B-9E57-5D59-B9A7-528F11C4852E.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
parent 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?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-4FFA793B-9E57-5D59-B9A7-528F11C4852E" xml:lang="en"><title>Locating
a DLL</title><shortdesc>A polymorphic DLL is loaded by calling one of the <codeph>Load()</codeph> member
functions of an <codeph>RLibrary</codeph> object.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p> <codeph>Load()</codeph> has three overloaded variants but they all behave
in a similar way. They are prototyped: </p>
<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);
TInt Load(const TDesC&amp; aFileName,const TUidType&amp; aType);
TInt Load(const TDesC&amp; aFileName,const TDesC&amp; aPath=KNullDesC);</codeblock>
<p>The arguments determine how the DLL is to be found. The rules are summarised
as follows: </p>
<ul>
<li id="GUID-36D6A634-8CB3-57E9-BAB9-5C70C7EF106A"><p>If <codeph>aFileName</codeph> is
a fully defined filename, i.e. it includes a path specification, then the
contents of <codeph>aPath</codeph> are ignored and an attempt is made to load <codeph>aFileName</codeph>,
if specified; if this DLL cannot be found, then the load operation fails and
no further searching is done. </p> </li>
<li id="GUID-50FBE6FD-5AD3-5732-8A24-91A0B0B5ABB1"><p>if <codeph>aFileName</codeph> does
not have an extension, an extension of <filepath>.DLL</filepath> is assumed. </p> </li>
<li id="GUID-61547446-A954-5EF2-A77C-D0C4B2D0B4EB"><p>If <codeph>aFileName</codeph> contains
a file name but does <i>not</i> include a path specification (e.g. <filepath>EULIBDR1.DLL</filepath>),
then a search is done in the following locations in the order given: </p> <ul>
<li id="GUID-C0A63546-FE94-5B06-824D-83A4B77583BE"><p>the path defined in <codeph>aPath</codeph>,
if specified </p> </li>
<li id="GUID-72315ED1-4593-5D69-90DD-CE813A091F4B"><p>the system path <filepath>\sys\bin\</filepath> on
each attached drive. Drives are searched in the order: <filepath>C:</filepath> (the
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
finally, drive <filepath>Z:</filepath> (the ROM). </p> </li>
</ul> </li>
<li id="GUID-2EBA5162-3E09-510A-B65F-024CC5FF011E"><p>If <codeph>aType</codeph> is
specified, then the UIDType of the loaded DLL must match <codeph>aType</codeph>.
If <codeph>aType</codeph> is <codeph>KNullUid</codeph>, or the variant of <codeph>Load()</codeph> that
does not take <codeph>aType</codeph> is called, then the loaded DLL will have
the name <codeph>aFileName</codeph> and may have any UIDType. </p> </li>
</ul>
<p>Note that in WINS debug mode, the system path is <filepath>\epoc32\release\wins\udeb\</filepath> on
the current PC drive; in WINS release mode, the system path is <filepath>\epoc32\release\wins\urel\</filepath> on
the current PC drive. For WINSCW, the paths are the same as for WINS, except
that <filepath>wins\</filepath> becomes <filepath>winscw\</filepath>. </p>
<p>Note also that, in contrast with the usual convention, <codeph>aPath</codeph> specifies
a list of directories, each one separated by a semicolon. </p>
<p>See also: </p>
<ul>
<li id="GUID-2B04DF55-F0A3-5755-905D-8BB243A6BC36"><p> <xref href="GUID-98CC1E75-D2DE-3700-928C-7D530237ECBA.dita"><apiname>TFindFile</apiname></xref> </p> </li>
</ul>
</conbody></concept>