|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-1FE5D4D5-B2BF-4090-9F69-D538B2220DA3" xml:lang="en"><title>Handle |
|
13 Global Variable Example</title><shortdesc>This example demonstrates: </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p>How to handle global variables within the library code </p> |
|
15 <p>How to use WSD (Writable Static Data) in dll</p> |
|
16 <section id="GUID-026FD8D6-6C4A-5958-B289-775D4AE1E756-GENID-1-10-1-12-1-1-5-1-3-1-11-1-11-1-3-3"><title>Download</title> <p>Click |
|
17 on the following link to download the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-723e559a-ab8e-435f-a34c-78b7a32f1fb9.zip" scope="external"> handleglobalvar.zip</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-723e559a-ab8e-435f-a34c-78b7a32f1fb9.html" scope="peer">browse</xref> to view the example code. </p> </section> |
|
18 <section id="GUID-7E7C4564-B10E-41F9-8A9D-D8A6C5E9C51C-GENID-1-10-1-12-1-1-5-1-3-1-11-1-11-1-3-4"><title>Design and |
|
19 Implementation</title> <p>The following sections provide information about |
|
20 the implementation of the example.</p> <p><b>Capabilities</b> </p>The |
|
21 program capabilities are defined in <filepath>globalvarex.mmp</filepath>:<codeph> CAPABILITY |
|
22 NONE</codeph>. Libwsddll library capabilities are defined in<filepath>libwsddll.mmp</filepath> file: <codeph>CAPABILITY |
|
23 ALL -TCB</codeph>. <p><b> Application Launching</b> </p>The application can |
|
24 be launched by executing globalvarex from eshell. <p><b>libwsd library </b></p>This |
|
25 library is used to get/set dll global Data. It demonstrates how to handle |
|
26 WSD (Writable Static Data).<p><b>How to handle WSD in dll</b></p>Collect all |
|
27 global variables within the structure TWsdData and creat the instance whenever |
|
28 it's required. For target release, use global variables and add EPOCALLOWDLLDATA |
|
29 in the library mmp file. wsddll.h and wsddll.cpp implement the concept of |
|
30 how to handle WSD data in Dll. </section> |
|
31 <section id="GUID-67A72761-1D92-46D1-B1C9-7455978BDE4E-GENID-1-10-1-12-1-1-5-1-3-1-11-1-11-1-3-5"><title>Building and |
|
32 Using</title> To build the handleglobalvar example application, go to the |
|
33 handleglobalvar\group directory and build the application. The definition |
|
34 for the whole application can be found in the bld.inf file in the group subdirectory |
|
35 of the applications main directory. </section> |
|
36 </conbody></concept> |