localisation/apparchitecture/apsexe/APSMAIN.CPP
author Maciej Seroka <maciejs@symbian.org>
Thu, 21 Jan 2010 12:53:44 +0000
branchSymbian2
changeset 1 8758140453c0
child 6 c108117318cb
permissions -rw-r--r--
Added Symbian2 smoketests from FBF at changeset bde28f2b1d99

// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of the License "Symbian Foundation License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
// The main startup of the AppArc server
// 
//

#include "APASVST.H"


#ifdef APA_SERVER_IN_THREAD
// The server binary is an "EPOCEXE" target type
// Thus the server parameter passing and startup code for WINS and EPOC are
// significantly different.
//
// In EKA1 WINS, the EPOCEXE target is a DLL with an entry point called WinsMain,
// taking no parameters and returning TInt. This is not really valid as a thread
// function which takes a TAny* parameter which we need.
//
// So the DLL entry-point WinsMain() is used to return a TInt representing the
// real thread function within the DLL. This is good as long as
// sizeof(TInt)>=sizeof(ApaServThreadStart).
//

IMPORT_C TInt WinsMain();
EXPORT_C TInt WinsMain()
//
// WINS DLL entry-point. Just return the real thread function 
// cast to TInt
//
	{
	return reinterpret_cast<TInt>(&ApaServThreadStart);
	}

GLDEF_C TInt E32Dll(TDllReason /*aReason*/)
//
//	DLL entry point
//
	{
	return(KErrNone);
	}

#else

TInt E32Main()
//
//	EXE entry point
//
	{
	return ApaServThreadStart(NULL);
	}
	
#endif