This example demonstrates:
How to handle global variables within the library code
How to use WSD (Writable Static Data) in dll
Click on the following link to download the example: handleglobalvar.zip
Click: browse to view the example code.
The following sections provide information about the implementation of the example.
Capabilities
The program capabilities are defined inglobalvarex.mmp
: CAPABILITY
NONE
. Libwsddll library capabilities are defined inlibwsddll.mmp
file: CAPABILITY
ALL -TCB
. Application Launching
The application can be launched by executing globalvarex from eshell.libwsd library
This library is used to get/set dll global Data. It demonstrates how to handle WSD (Writable Static Data).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 in the library mmp file. wsddll.h and wsddll.cpp implement the concept of how to handle WSD data in Dll.