kerneltest/e32test/dll/t_dllwsd_dll.cpp
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #include "t_dllwsd_dll.h"
       
    19 
       
    20 
       
    21 int x = 42;
       
    22 int y;
       
    23 
       
    24 struct SGlobal
       
    25 	{
       
    26 	SGlobal()
       
    27 		{
       
    28 		iX = new TInt(x);
       
    29 		}
       
    30 	~SGlobal()
       
    31 		{
       
    32 		delete iX;
       
    33 		}
       
    34 	TInt* iX;
       
    35 	};
       
    36 	
       
    37 SGlobal g;
       
    38 
       
    39 EXPORT_C TInt WsdFuncX()
       
    40 	{
       
    41 	ASSERT(*g.iX == x);
       
    42 	(*g.iX)++;
       
    43 	return x++;
       
    44 	}
       
    45 
       
    46 EXPORT_C TInt WsdFuncY()
       
    47 	{
       
    48 	return y++;
       
    49 	}
       
    50 
       
    51 EXPORT_C TBuf<60000>& WsdBuf()
       
    52 	{
       
    53 	static TBuf<60000> buf;
       
    54 	return buf;
       
    55 	}
       
    56 	
       
    57 EXPORT_C TRequestStatus& WsdReq()
       
    58 	{
       
    59 	static TRequestStatus stat;
       
    60 	return stat;
       
    61 	}
       
    62