Source code of Windows XP (NT5)
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.

173 lines
2.6 KiB

  1. #define MEM_LEAKS 1
  2. //#define EVENT_LEAKS 1
  3. #define KEY_LEAKS 1
  4. #ifdef MEM_LEAKS
  5. #undef LocalAlloc
  6. #undef LocalFree
  7. //WINBASEAPI
  8. HLOCAL
  9. WINAPI
  10. CheckLocalAlloc(
  11. UINT uFlags,
  12. UINT uBytes
  13. );
  14. //WINBASEAPI
  15. HLOCAL
  16. WINAPI
  17. CheckLocalFree(
  18. HLOCAL hMem
  19. );
  20. #define LocalAlloc CheckLocalAlloc
  21. #define LocalFree CheckLocalFree
  22. #endif // MEM_LEAKS
  23. #ifdef EVENT_LEAKS
  24. #undef CreateEventA
  25. #undef CreateEventW
  26. //WINBASEAPI
  27. HANDLE
  28. WINAPI
  29. CheckCreateEventA(
  30. LPSECURITY_ATTRIBUTES lpEventAttributes,
  31. BOOL bManualReset,
  32. BOOL bInitialState,
  33. LPCSTR lpName
  34. );
  35. //WINBASEAPI
  36. HANDLE
  37. WINAPI
  38. CheckCreateEventW(
  39. LPSECURITY_ATTRIBUTES lpEventAttributes,
  40. BOOL bManualReset,
  41. BOOL bInitialState,
  42. LPCWSTR lpName
  43. );
  44. #define CreateEventA CheckCreateEventA
  45. #define CreateEventW CheckCreateEventW
  46. #endif // EVENT_LEAKS
  47. #ifdef KEY_LEAKS
  48. //WINADVAPI
  49. LONG
  50. APIENTRY
  51. CheckRegOpenKeyA(
  52. HKEY hKey,
  53. LPCSTR lpSubKey,
  54. PHKEY phkResult
  55. );
  56. //WINADVAPI
  57. LONG
  58. APIENTRY
  59. CheckRegOpenKeyW(
  60. HKEY hKey,
  61. LPCWSTR lpSubKey,
  62. PHKEY phkResult
  63. );
  64. //WINADVAPI
  65. LONG
  66. APIENTRY
  67. CheckRegOpenKeyExA(
  68. HKEY hKey,
  69. LPCSTR lpSubKey,
  70. DWORD ulOptions,
  71. REGSAM samDesired,
  72. PHKEY phkResult
  73. );
  74. //WINADVAPI
  75. LONG
  76. APIENTRY
  77. CheckRegOpenKeyExW(
  78. HKEY hKey,
  79. LPCWSTR lpSubKey,
  80. DWORD ulOptions,
  81. REGSAM samDesired,
  82. PHKEY phkResult
  83. );
  84. //WINADVAPI
  85. LONG
  86. APIENTRY
  87. CheckRegCreateKeyA(
  88. HKEY hKey,
  89. LPCSTR lpSubKey,
  90. PHKEY phkResult
  91. );
  92. //WINADVAPI
  93. LONG
  94. APIENTRY
  95. CheckRegCreateKeyW(
  96. HKEY hKey,
  97. LPCWSTR lpSubKey,
  98. PHKEY phkResult
  99. );
  100. //WINADVAPI
  101. LONG
  102. APIENTRY
  103. CheckRegCreateKeyExA(
  104. HKEY hKey,
  105. LPCSTR lpSubKey,
  106. DWORD Reserved,
  107. LPSTR lpClass,
  108. DWORD dwOptions,
  109. REGSAM samDesired,
  110. LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  111. PHKEY phkResult,
  112. LPDWORD lpdwDisposition
  113. );
  114. //WINADVAPI
  115. LONG
  116. APIENTRY
  117. CheckRegCreateKeyExW(
  118. HKEY hKey,
  119. LPCWSTR lpSubKey,
  120. DWORD Reserved,
  121. LPSTR lpClass,
  122. DWORD dwOptions,
  123. REGSAM samDesired,
  124. LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  125. PHKEY phkResult,
  126. LPDWORD lpdwDisposition
  127. );
  128. //WINADVAPI
  129. LONG
  130. APIENTRY
  131. CheckRegCloseKey(
  132. HKEY hKey
  133. );
  134. #define RegOpenKeyA CheckRegOpenKeyA
  135. #define RegOpenKeyW CheckRegOpenKeyW
  136. #define RegOpenKeyExA CheckRegOpenKeyExA
  137. #define RegOpenKeyExW CheckRegOpenKeyExW
  138. #define RegCreateKeyA CheckRegCreateKeyA
  139. #define RegCreateKeyW CheckRegCreateKeyW
  140. #define RegCreateKeyExA CheckRegCreateKeyExA
  141. #define RegCreateKeyExW CheckRegCreateKeyExW
  142. #define RegCloseKey CheckRegCloseKey
  143. #endif // KEY_LEAKS