Nokia N97 SDK
Example Applications Guide

Dll Usage Example Application

1. About this Example
2. Prerequisites
3. Design and Implementation


1. About this Example

This gives an example of
  1. How to handle global variables within the library code.
  2. How to solve WSD (Writable Static Data) problem.


2. Prerequisites

This example requires a familiarity with POSIX standard C APIs, and access to Open C documentation.


3. Design and Implementation

3.1 Capabilities

The program capabilities are defined in %globalvarex.mmp file: CAPABILITY NONE. Libwsddll library capabilities are defined in libwsddll.mmp file: CAPABILITY ALL -TCB.

3.2 Application Launching

The application can be launched by:

  1. Executing globalvarex from eshell.

3.2.1 libwsd library

This library is used to get/set dll global Data. This demonstrate
  1. How to handle WSD (Writable Static Data)

3.2.1.1 How to handle WSD in dll

Collect all global variables within the structure TWsdData and creat the instance whenever it's required. For target release, use global variables and add EPOCALLOWDLLDATA within the library mmp file. wsddll.h and wsddll.cpp implement the concept of how to handle WSD data in Dll.

© Nokia 2009

Back to top