mmserv/sts/stsserver/src/stsserverexe.cpp
changeset 16 43d09473c595
parent 14 80975da52420
child 43 9894ed580e4a
equal deleted inserted replaced
14:80975da52420 16:43d09473c595
    13  *
    13  *
    14  * Description:
    14  * Description:
    15  * The file containt the main method of the STS Server.
    15  * The file containt the main method of the STS Server.
    16  */
    16  */
    17 
    17 
       
    18 #include <ecom/ecom.h>
    18 #include "stsserver.h"
    19 #include "stsserver.h"
    19 #include "stsclientservercommon.h"
       
    20 
    20 
    21 TInt E32Main()
    21 TInt E32Main()
    22     {
    22     {
       
    23     __UHEAP_MARK;
    23     TInt returnValue = KErrNoMemory;
    24     TInt returnValue = KErrNoMemory;
    24 
    25 
    25     RThread myThread;
    26     RThread myThread;
    26     myThread.SetPriority(EPriorityAbsoluteRealTime1);
    27     myThread.SetPriority(EPriorityAbsoluteRealTime1);
    27 
    28     myThread.Close();
    28     __UHEAP_MARK;
    29     
    29 
       
    30     CTrapCleanup* cleanup = CTrapCleanup::New();
    30     CTrapCleanup* cleanup = CTrapCleanup::New();
    31 
    31 
    32     if (cleanup)
    32     if (cleanup)
    33         {
    33         {
    34         // Run the server and request a process rendezvous.
    34         // Run the server and request a process rendezvous.
    35         TRAP( returnValue, CStsServer::RunServerL( ETrue ) );
    35         TRAP( returnValue, CStsServer::RunServerL() );
    36         delete cleanup;
    36         delete cleanup;
    37         }
    37         }
       
    38     REComSession::FinalClose();
    38     __UHEAP_MARKEND;
    39     __UHEAP_MARKEND;
    39 
    40 
    40     return returnValue;
    41     return returnValue;
    41     } // end E32Main
    42     } // end E32Main