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.

112 lines
3.4 KiB

  1. #ifndef WINDOWS_HEAP_HPP
  2. #define WINDOWS_HEAP_HPP 1
  3. // Ruler
  4. // 1 2 3 4 5 6 7 8
  5. //345678901234567890123456789012345678901234567890123456789012345678901234567890
  6. /********************************************************************/
  7. /* */
  8. /* The standard layout. */
  9. /* */
  10. /* The standard layout for 'cpp' files in this code is as */
  11. /* follows: */
  12. /* */
  13. /* 1. Include files. */
  14. /* 2. Constants local to the class. */
  15. /* 3. Data structures local to the class. */
  16. /* 4. Data initializations. */
  17. /* 5. Static functions. */
  18. /* 6. Class functions. */
  19. /* */
  20. /* Any portion that is not required is simply omitted. */
  21. /* */
  22. /********************************************************************/
  23. #include "Windows.h"
  24. #include "WindowsHeap.hpp"
  25. /********************************************************************/
  26. /* */
  27. /* The shadow interface. */
  28. /* */
  29. /* The shadow interface closely resembles the NT heap interface */
  30. /* and so enables the easy porting of applications. */
  31. /* */
  32. /********************************************************************/
  33. extern "C" HANDLE WindowsHeapCreate
  34. (
  35. DWORD Flags,
  36. DWORD InitialSize,
  37. DWORD MaximumSize
  38. );
  39. extern "C" LPVOID WindowsHeapAlloc
  40. (
  41. HANDLE Heap,
  42. DWORD Flags,
  43. DWORD Size
  44. );
  45. extern "C" UINT WindowsHeapCompact
  46. (
  47. HANDLE Heap,
  48. DWORD Flags
  49. );
  50. extern "C" BOOL WindowsHeapFree
  51. (
  52. HANDLE Heap,
  53. DWORD Flags,
  54. LPVOID Memory
  55. );
  56. extern "C" BOOL WindowsHeapLock
  57. (
  58. HANDLE Heap
  59. );
  60. extern "C" LPVOID WindowsHeapReAlloc
  61. (
  62. HANDLE Heap,
  63. DWORD Flags,
  64. LPVOID Memory,
  65. DWORD Size
  66. );
  67. extern "C" VOID WindowsHeapReset
  68. (
  69. HANDLE Heap
  70. );
  71. extern "C" DWORD WindowsHeapSize
  72. (
  73. HANDLE Heap,
  74. DWORD Flags,
  75. LPVOID Memory
  76. );
  77. extern "C" BOOL WindowsHeapUnlock
  78. (
  79. HANDLE Heap
  80. );
  81. extern "C" BOOL WindowsHeapValidate
  82. (
  83. HANDLE Heap,
  84. DWORD Flags,
  85. LPVOID Memory
  86. );
  87. extern "C" BOOL WindowsHeapWalk
  88. (
  89. HANDLE Heap,
  90. LPPROCESS_HEAP_ENTRY Walk
  91. );
  92. extern "C" BOOL WindowsHeapDestroy
  93. (
  94. HANDLE Heap
  95. );
  96. #endif