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.

80 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 1994-1997 Microsoft Corporation
  3. Module Name:
  4. tshrutil.cxx
  5. Abstract:
  6. Contains the class implementation of UTILITY classes and other utility
  7. functions.
  8. Author:
  9. Madan Appiah (madana) 25-Aug-1997
  10. Environment:
  11. User Mode - Win32
  12. Revision History:
  13. --*/
  14. #include <tshrcom.hxx>
  15. #include <ctype.h>
  16. //
  17. // alloc globals here.
  18. //
  19. #define INITIAL_HEAP_SIZE 0xFFFF // 64K
  20. HANDLE g_hTShareHeap;
  21. //*************************************************************
  22. //
  23. // TSUtilInit()
  24. //
  25. // Purpose: Creates util objects
  26. //
  27. // History: 09-10-97 BrianTa Reworked
  28. //
  29. //*************************************************************
  30. DWORD
  31. TSUtilInit(VOID)
  32. {
  33. DWORD dwError;
  34. NTSTATUS ntStatus;
  35. dwError = ERROR_SUCCESS;
  36. g_hTShareHeap = HeapCreate(0, INITIAL_HEAP_SIZE, 0);
  37. if (g_hTShareHeap == NULL)
  38. dwError = GetLastError();
  39. return (dwError);
  40. }
  41. //*************************************************************
  42. //
  43. // TSUtilCleanup()
  44. //
  45. // Purpose: Deletes the util objects
  46. //
  47. // History: 09-10-97 BrianTa Reworked
  48. //
  49. //*************************************************************
  50. VOID
  51. TSUtilCleanup(VOID)
  52. {
  53. HeapDestroy(g_hTShareHeap);
  54. }