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.

83 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. init.c
  5. Abstract:
  6. Declares initialization and termination functions for all utility sets
  7. that have been included.
  8. Author:
  9. Jim Schmidt (jimschm) 02-Aug-2001
  10. Revision History:
  11. <alias> <date> <comment>
  12. --*/
  13. HANDLE g_hHeap;
  14. HINSTANCE g_hInst;
  15. BOOL
  16. Initialize (
  17. VOID
  18. )
  19. {
  20. BOOL result = FALSE;
  21. __try {
  22. INITIALIZE_MEMORY_CODE
  23. INITIALIZE_LOG_CODE
  24. INITIALIZE_UNICODE_CODE
  25. INITIALIZE_STRMEM_CODE
  26. INITIALIZE_STRMAP_CODE
  27. INITIALIZE_HASH_CODE
  28. INITIALIZE_GROWBUF_CODE
  29. INITIALIZE_GROWLIST_CODE
  30. INITIALIZE_XML_CODE
  31. result = TRUE;
  32. }
  33. __finally {
  34. MYASSERT (TRUE); // debugger workaround
  35. }
  36. return result;
  37. }
  38. BOOL
  39. Terminate (
  40. VOID
  41. )
  42. {
  43. BOOL result = FALSE;
  44. __try {
  45. TERMINATE_GROWLIST_CODE
  46. TERMINATE_GROWBUF_CODE
  47. TERMINATE_HASH_CODE
  48. TERMINATE_STRMAP_CODE
  49. TERMINATE_STRMEM_CODE
  50. TERMINATE_UNICODE_CODE
  51. TERMINATE_LOG_CODE
  52. TERMINATE_MEMORY_CODE
  53. TERMINATE_XML_CODE
  54. result = TRUE;
  55. }
  56. __finally {
  57. MYASSERT (TRUE); // debugger workaround
  58. }
  59. return result;
  60. }