diff -r e8c1ea2c6496 -r 8758140453c0 localisation/apparchitecture/apsexe/APSMAIN.CPP --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/localisation/apparchitecture/apsexe/APSMAIN.CPP Thu Jan 21 12:53:44 2010 +0000 @@ -0,0 +1,63 @@ +// 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(&ApaServThreadStart); + } + +GLDEF_C TInt E32Dll(TDllReason /*aReason*/) +// +// DLL entry point +// + { + return(KErrNone); + } + +#else + +TInt E32Main() +// +// EXE entry point +// + { + return ApaServThreadStart(NULL); + } + +#endif