pbeexe.cpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2007 by contributors of the Free Pascal Compiler
  4. pbeexe.cpp
  5. This file is part of the Pascal interface for the c++ API on Symbian OS
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************/
  12. #include <e32std.h>
  13. #include <e32base.h>
  14. extern "C"
  15. {
  16. /* Pascal Entry point declaration */
  17. long int Pascal_E32Main();
  18. /*******************************************************************
  19. * File e32std.h
  20. *******************************************************************/
  21. /*******************************************************************
  22. * Class User
  23. *******************************************************************/
  24. /*******************************************************************
  25. * User::InfoPrint
  26. *******************************************************************/
  27. TInt User_InfoPrint(const char* aString)
  28. {
  29. TPtrC8 pStr(reinterpret_cast<const TUint8*>(aString));
  30. HBufC* buf = HBufC::New(pStr.Length());
  31. if (buf == NULL)
  32. {
  33. return KErrNoMemory;
  34. }
  35. buf->Des().Copy(pStr);
  36. User::InfoPrint(*buf);
  37. return KErrNone;
  38. }
  39. } /* extern "C" */
  40. /*******************************************************************
  41. * Symbian OS Entry Point
  42. *******************************************************************/
  43. TInt E32Main()
  44. {
  45. return Pascal_E32Main();
  46. }