First public contribution.
1 // Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\dll\t_dll1.cpp
20 const TInt KHeapSize=0x2000;
25 TlsData() : iData(0x12345678),iTest1(0),iTest2(0),iServer(0) {}
26 TInt Data() {return(iData);}
27 void SetData(TInt aValue) {iData=aValue;}
36 {return(*((TlsData*)Dll::Tls()));}
38 EXPORT_C TInt TestDll1::Data()
40 // Return the current TLS data value
47 EXPORT_C void TestDll1::SetData(TInt aValue)
49 // Return the current TLS data value
53 Tls().SetData(aValue);
56 EXPORT_C TUint TestDll1::Test1()
58 // Return the test1 result.
65 EXPORT_C TUint TestDll1::Test2()
67 // Return the test2 result.
74 EXPORT_C TUint TestDll1::Server()
76 // Return the server result.
80 return(Tls().iServer);
83 EXPORT_C RSemaphore TestDll1::Sem()
85 // Return the semaphore.
92 EXPORT_C TInt TestDll1::Attach(TBool aAttach)
100 __ASSERT_ALWAYS(r==KErrNone, User::Panic(_L("T_DLL1 att"),r));
105 r = Dll::SetTls(NULL);
106 __ASSERT_ALWAYS(r==KErrNone, User::Panic(_L("T_DLL1 det"),r));
113 EXPORT_C TInt TestDll1::GlobalAlloc(TInt )
117 EXPORT_C TBool TestDll1::GlobalAllocated()
121 EXPORT_C TInt TestDll1::GlobalRead(TInt ,TDes8 &)
125 EXPORT_C TInt TestDll1::GlobalWrite(TInt ,const TDesC8 &)