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_dll2.cpp
21 const TInt KHeapSize=0x2000;
26 TlsData() : iData(0xabcdabcd),iTest1(0),iTest2(0),iServer(0) {}
27 TInt Data() {return(iData);}
28 void SetData(TInt aValue) {iData=aValue;}
37 {return(*((TlsData*)Dll::Tls()));}
39 EXPORT_C TInt TestDll2::Data()
41 // Return the current TLS data value
48 EXPORT_C void TestDll2::SetData(TInt aValue)
50 // Return the current TLS data value
54 Tls().SetData(aValue);
57 EXPORT_C TUint TestDll2::Test1()
59 // Return the test1 result.
66 EXPORT_C TUint TestDll2::Test2()
68 // Return the test2 result.
75 EXPORT_C TUint TestDll2::Server()
77 // Return the server result.
81 return(Tls().iServer);
84 EXPORT_C RSemaphore TestDll2::Sem()
86 // Return the semaphore.
93 EXPORT_C TInt TestDll2::Attach(TBool aAttach)
101 __ASSERT_ALWAYS(r==KErrNone, User::Panic(_L("T_DLL2 att"),r));
106 r = Dll::SetTls(NULL);
107 __ASSERT_ALWAYS(r==KErrNone, User::Panic(_L("T_DLL2 det"),r));
113 EXPORT_C TInt TestDll2::GlobalAlloc(TInt )
115 return KErrNotSupported;
117 EXPORT_C TBool TestDll2::GlobalAllocated()
119 return KErrNotSupported;
121 EXPORT_C TInt TestDll2::GlobalRead(TInt ,TDes8 &)
123 return KErrNotSupported;
125 EXPORT_C TInt TestDll2::GlobalWrite(TInt ,const TDesC8 &)
127 return KErrNotSupported;