LOCAL_C void callExampleL() { // Initialize and call the example code under cleanup stack. _LIT(KMsgExampleCode,"Symbian OS Example Code"); console = Console::NewL(KMsgExampleCode,TSize(KConsFullScreen,KConsFullScreen)); // Put console onto the cleanup stack. CleanupStack::PushL(console); // Perform the example function under the protection of a // TRAP harness. TRAPD(error,doExampleL()); _LIT(KMsgOK,"ok"); _LIT(KFormat2,"failed: leave code = %d"); if (error) console->Printf(KFormat2,error); else console->Printf(KMsgOK); // Continue _LIT(KMsgPressAnyKey," [press any key]"); console->Printf(KMsgPressAnyKey); console->Getch(); // Remove the console object from the cleanupstack // and destroy it. CleanupStack::PopAndDestroy(); }
LOCAL_C void callExampleL() // initialize and call example code under cleanup stack { TRAPD(error,doExampleL()); // perform example function if (error) test.Printf(KFormatFailed, error); else test.Printf(KTxtOK); test.Printf(KTxtPressAnyKey); test.Getch(); // get and ignore character }