diff -r ed40dc1bd883 -r 5f6e7f84c9d1 uifw/AknGlobalUI/AknCapServer/src/AknCapServerEntry.cpp --- a/uifw/AknGlobalUI/AknCapServer/src/AknCapServerEntry.cpp Wed Sep 29 10:43:28 2010 +0800 +++ b/uifw/AknGlobalUI/AknCapServer/src/AknCapServerEntry.cpp Fri Oct 01 17:27:56 2010 +0800 @@ -19,6 +19,7 @@ #include #include #endif +#include #include #include #include @@ -73,10 +74,6 @@ #include // for Transition effect enumerations #endif -#ifdef SYMBIAN_BUILD_GCE - #include -#endif - #ifdef RD_INTELLIGENT_TEXT_INPUT #include @@ -231,11 +228,33 @@ me->iEikSrv.Close(); // currently there is no use to keep this session alive. #ifdef SYMBIAN_BUILD_GCE - TRAP( err, CreateGOOMWatcherThreadL()); - if (err != KErrNone) - { - RDebug::Print(_L("Creating out of graphics mem thread failed with err %d"), err); - } + const TInt KOOMWatcherDllUid = 0x10282DBF; + _LIT(KOOMWatcherDll, "goommonitor.dll"); + + RLibrary lib; // we don't need to push to stack because there is no leaving in following operations. + TUidType uidType(KDynamicLibraryUid, KSharedLibraryUid, TUid::Uid(KOOMWatcherDllUid)); + + err = lib.Load(KOOMWatcherDll, uidType); + if (KErrNone == err) + { + TLibraryFunction func = lib.Lookup(2); /* CreateGOOMWatcherThreadL */ + if (func) + { + TRAP(err, (*func)()); + if (err != KErrNone) + { + RDebug::Print(_L("Creating out of graphics mem thread in capserver failed with err %d"), err); + } + } + else + { + RDebug::Print(_L("Lookup function entry in goommonitor.dll return NULL, the entry number may be wrong!")); + } + } + else + { + RDebug::Print(_L("Dynamically Loading goommonitor.dll failed with err %d, it's ok!"), err); + } #endif return err;