A static interface DLL represents an interface which is defined to its clients by one or more headers for use at compile time, and an import library for use at link time.
When a executable that is a client of the DLL is loaded at run-time, the loader notes that it requires the static interface DLL to be available. The loader then either loads the DLL or, if it is loaded already, attaches the new client to it.
In Symbian OS, all static interface DLLs must have a
uid2
of 0x1000008d
. The particular static interface
DLL is then identified by name and by uid3
.
For example, if a DLL called helloview.dll
is built with
a uid3
of 0x10000252, then the name used in the import library for
ARM builds of Symbian OS is helloview[10000252]
. When the loader
loads the helloview.dll
, it checks that its UID is
0x10000252
. If the uid3
in the DLL does not match,
then the load fails.
A static interface DLL project file must specify the correct target type and UID:
Specify the TARGETTYPE
line as:
TARGETTYPE dll
This implicitly specifies UID1
correctly.
Specify the UID for the DLL in a UID
line:
> UID 0x1000008d <UID3>
An example of the mmp
project file for a static DLL is
given below:
TARGET CreateStaticDLL.dll
TARGETTYPE dll
UID 0x1000008d 0x10004268
SOURCEPATH .
SOURCE CreateStaticDLL.cpp
USERINCLUDE .
SYSTEMINCLUDE \Epoc32\include
LIBRARY euser.lib
EXPORTUNFROZEN