Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 1999 Intel Corporation
  3. Module Name: hellolib.c
  4. Abstract: This is an example EFI program
  5. Author:
  6. Revision History: 1.0
  7. --*/
  8. #include "efi.h"
  9. #include "efilib.h"
  10. EFI_STATUS
  11. InitializeHelloLibApplication (
  12. IN EFI_HANDLE ImageHandle,
  13. IN EFI_SYSTEM_TABLE *SystemTable
  14. )
  15. {
  16. /*
  17. * Initialize the Library. Set BS, RT, &ST globals
  18. * BS = Boot Services
  19. * RT = RunTime Services
  20. * ST = System Table
  21. */
  22. InitializeLib (ImageHandle, SystemTable);
  23. /*
  24. * Print a message to the console device using a library function.
  25. */
  26. Print(L"HelloLib application started\n");
  27. /*
  28. * Wait for a key to be pressed on the console device.
  29. */
  30. Print(L"\n\n\nHit any key to exit this image\n");
  31. WaitForSingleEvent (ST->ConIn->WaitForKey, 0);
  32. /*
  33. * Print a message to the console device using a protocol interface.
  34. */
  35. ST->ConOut->OutputString (ST->ConOut, L"\n\n");
  36. /*
  37. * Return control to the Shell.
  38. */
  39. return EFI_SUCCESS;
  40. }