A polymorphic DLL is loaded by calling one of the Load() member functions of an RLibrary object.
Load() has three overloaded variants but they all behave in a similar way. They are prototyped:
TInt Load(const TDesC& aFileName,const TDesC& aPath,const TUidType& aType); TInt Load(const TDesC& aFileName,const TUidType& aType); TInt Load(const TDesC& aFileName,const TDesC& aPath=KNullDesC);
The arguments determine how the DLL is to be found. The rules are summarised as follows:
If aFileName is a fully defined filename, i.e. it includes a path specification, then the contents of aPath are ignored and an attempt is made to load aFileName , if specified; if this DLL cannot be found, then the load operation fails and no further searching is done.
if aFileName does not have an extension, an extension of .DLL is assumed.
If aFileName contains a file name but does not include a path specification (e.g. EULIBDR1.DLL ), then a search is done in the following locations in the order given:
If aType is specified, then the UIDType of the loaded DLL must match aType . If aType is KNullUid , or the variant of Load() that does not take aType is called, then the loaded DLL will have the name aFileName and may have any UIDType.
Note that in WINS debug mode, the system path is \epoc32\release\wins\udeb\ on the current PC drive; in WINS release mode, the system path is \epoc32\release\wins\urel\ on the current PC drive. For WINSCW, the paths are the same as for WINS, except that wins\ becomes winscw\ .
Note also that, in contrast with the usual convention, aPath specifies a list of directories, each one separated by a semicolon.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.