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.

292 lines
8.3 KiB

  1. ;**************************************************************************
  2. ;* TOOLHELP.INC
  3. ;*
  4. ;* Assembly-language public include file for TOOLHELP.DLL
  5. ;*
  6. ;**************************************************************************
  7. ;** General symbol values
  8. MAX_DATA EQU 11
  9. MAX_PATH EQU 255
  10. MAX_MODULE_NAME EQU 8 + 1 ;Leave room for the zero and padding
  11. MAX_CLASSNAME EQU 255
  12. ; ----- Global heap walking -----
  13. GLOBALENTRY STRUC
  14. ge_dwSize DD ? ;Structure version
  15. ge_dwAddress DD ? ;This block's address
  16. ge_dwBlockSize DD ? ;This block's size
  17. ge_hBlock DW ? ;This block's handle
  18. ge_wcLock DW ? ;Lock count
  19. ge_wcPageLock DW ? ;Page lock count
  20. ge_wFlags DW ? ;Block flags
  21. ge_wHeapPresent DW ? ;Size of available local heap
  22. ge_hOwner DW ? ;Owner handle
  23. ge_wType DW ? ;Block type
  24. ge_wData DW ? ;Type-specific data
  25. ge_dwNext DD ? ;Pointer to next block
  26. ge_dwNextAlt DD ? ;Next free/LRU block in chain
  27. GLOBALENTRY ENDS
  28. ; ** GlobalFirst()/GlobalNext() flags
  29. GLOBAL_ALL EQU 0
  30. GLOBAL_LRU EQU 1
  31. GLOBAL_FREE EQU 2
  32. ; ** GLOBALENTRY.ge_wType entries
  33. GT_UNKNOWN EQU 0
  34. GT_DGROUP EQU 1
  35. GT_DATA EQU 2
  36. GT_CODE EQU 3
  37. GT_TASK EQU 4
  38. GT_RESOURCE EQU 5
  39. GT_MODULE EQU 6
  40. GT_FREE EQU 7
  41. GT_INTERNAL EQU 8
  42. GT_SENTINEL EQU 9
  43. GT_BURGERMASTER EQU 10
  44. ; ** if GLOBALENTRY.wType==GT_RESOURCE, the following is GLOBALENTRY.wData:
  45. GD_USERDEFINED EQU 0
  46. GD_CURSORCOMPONENT EQU 1
  47. GD_BITMAP EQU 2
  48. GD_ICONCOMPONENT EQU 3
  49. GD_MENU EQU 4
  50. GD_DIALOG EQU 5
  51. GD_STRING EQU 6
  52. GD_FONTDIR EQU 7
  53. GD_FONT EQU 8
  54. GD_ACCELERATORS EQU 9
  55. GD_RCDATA EQU 10
  56. GD_ERRTABLE EQU 11
  57. GD_CURSOR EQU 12
  58. GD_ICON EQU 14
  59. GD_NAMETABLE EQU 15
  60. GD_MAX_RESOURCE EQU 15
  61. ;** GLOBALENTRY.wFlags
  62. GF_PDB_OWNER EQU 100h ;Low byte is KERNEL flags
  63. ; ----- Local heap walking -----
  64. LOCALENTRY STRUC
  65. le_dwSize DD ?
  66. le_hHandle DW ?
  67. le_wAddress DW ?
  68. le_wSize DW ?
  69. le_wFlags DW ?
  70. le_wcLock DW ?
  71. le_wType DW ?
  72. le_hHeap DW ?
  73. le_wHeapType DW ?
  74. le_wNext DW ?
  75. LOCALENTRY ENDS
  76. ; ** LOCALENTRY.wHeapType flags
  77. NORMAL_HEAP EQU 0
  78. USER_HEAP EQU 1
  79. GDI_HEAP EQU 2
  80. ;** LOCALENTRY.wFlags
  81. LF_FIXED EQU 1
  82. LF_FREE EQU 2
  83. LF_MOVEABLE EQU 4
  84. ;** LOCALENTRY.wType
  85. LT_NORMAL EQU 0
  86. LT_GDI_PEN EQU 1
  87. LT_GDI_BRUSH EQU 2
  88. LT_GDI_FONT EQU 3
  89. LT_GDI_PALETTE EQU 4
  90. LT_GDI_BITMAP EQU 5
  91. LT_GDI_RGN EQU 6
  92. LT_GDI_DC EQU 7
  93. LT_GDI_DISABLED_DC EQU 8
  94. LT_GDI_METADC EQU 9
  95. LT_GDI_METAFILE EQU 10
  96. LT_GDI_MAX EQU LT_GDI_METAFILE
  97. LT_FREE EQU 0ffh
  98. ; ----- Stack tracing -----
  99. STACKTRACEENTRY STRUC
  100. st_dwSize DD ?
  101. st_hTask DW ?
  102. st_wSS DW ?
  103. st_wBP DW ?
  104. st_wCS DW ?
  105. st_wIP DW ?
  106. st_hModule DW ?
  107. st_wSegment DW ?
  108. st_wFlags DW ?
  109. STACKTRACEENTRY ENDS
  110. ;** STACKTRACEENTRY.wFlags values
  111. FRAME_FAR EQU 0
  112. FRAME_NEAR EQU 1
  113. ; ----- Module list walking -----
  114. MODULEENTRY STRUC
  115. me_dwSize DD ?
  116. me_szModule DB MAX_MODULE_NAME + 1 DUP(?)
  117. me_hModule DW ?
  118. me_wcUsage DW ?
  119. me_szExePath DB MAX_PATH + 1 + 1 DUP(?)
  120. me_wNext DW ?
  121. MODULEENTRY ENDS
  122. ; ----- Task list walking -----
  123. TASKENTRY STRUC
  124. te_dwSize DD ?
  125. te_hTask DW ?
  126. te_hTaskParent DW ?
  127. te_hInst DW ?
  128. te_hModule DW ?
  129. te_wSS DW ?
  130. te_wSP DW ?
  131. te_wStackTop DW ?
  132. te_wStackMinimum DW ?
  133. te_wStackBottom DW ?
  134. te_wcEvents DW ?
  135. te_hQueue DW ?
  136. te_szModule DB MAX_MODULE_NAME + 1 DUP(?)
  137. te_wPSPOffset DW ?
  138. te_hNext DW ?
  139. TASKENTRY ENDS
  140. ;** TaskSwitch() return values
  141. TS_ERROR EQU 0
  142. TS_NEW EQU 1
  143. TS_OLD EQU 2
  144. ; ----- Window Class enumeration -----
  145. CLASSENTRY STRUC
  146. ce_dwSize DD ?
  147. ce_hInst DW ?
  148. ce_szClassName DB MAX_CLASSNAME + 1 DUP(?)
  149. ce_wNext DW ?
  150. CLASSENTRY ENDS
  151. ; ----- Information functions -----
  152. VMEMMANINFO STRUC
  153. vmm_dwSize DD ?
  154. vmm_dwLargestFreeBlock DD ?
  155. vmm_dwMaxPagesAvailable DD ?
  156. vmm_dwMaxPagesLockable DD ?
  157. vmm_dwTotalLinearSpace DD ?
  158. vmm_dwTotalUnlockedPages DD ?
  159. vmm_dwFreePages DD ?
  160. vmm_dwTotalPages DD ?
  161. vmm_dwFreeLinearSpace DD ?
  162. vmm_dwSwapFilePages DD ?
  163. vmm_wPageSize DW ?
  164. VMEMMANINFO ENDS
  165. SYSHEAPINFO STRUC
  166. si_dwSize DD ?
  167. si_wUserFreePercent DW ?
  168. si_wGDIFreePercent DW ?
  169. si_hUserSegment DW ?
  170. si_hGDISegment DW ?
  171. SYSHEAPINFO ENDS
  172. ; ----- Notifications -----
  173. ;* NFY_UNKNOWN: An unknown notification has been returned from KERNEL. Apps
  174. ;* should ignore these.
  175. ;*
  176. NFY_UNKNOWN EQU 0
  177. ;** NFY_LOADSEG: dwData points to a NFYLOADSEG structure
  178. NFY_LOADSEG EQU 1
  179. NFYLOADSEG STRUC
  180. nls_dwSize DD ?
  181. nls_wSelector DW ?
  182. nls_wSegNum DW ?
  183. nls_wType DW ? ;Low bit set for DATA, clear for CODE
  184. nls_wcInstance DW ? ;Instance count ONLY VALID FOR DATA!
  185. nls_lpstrModuleName DD ?
  186. NFYLOADSEG ENDS
  187. ;** NFY_FREESEG: LOWORD(dwData) is the selector of the segment being freed
  188. NFY_FREESEG EQU 2
  189. ;** NFY_STARTDLL: dwData points to a NFYSTARTDLL structure
  190. NFY_STARTDLL EQU 3
  191. NFYSTARTDLL STRUC
  192. nsd_dwSize DD ?
  193. nsd_hModule DW ?
  194. nsd_wCS DW ?
  195. nsd_wIP DW ?
  196. NFYSTARTDLL ENDS
  197. ;** NFY_STARTTASK: dwData is the CS:IP of the task start address
  198. NFY_STARTTASK EQU 4
  199. ;** NFY_EXITTASK: The low byte of dwData contains the program exit code
  200. NFY_EXITTASK EQU 5
  201. ;** NFY_DELMODULE: LOWORD(dwData) is the handle of the module to be freed
  202. NFY_DELMODULE EQU 6
  203. ;** NFY_RIP: LOWORD(dwData) is the fatal exit code
  204. ;** NFY_RIP: dwData points to a NFYRIP structure
  205. NFY_RIP EQU 7
  206. NFYRIP STRUC
  207. nrp_dwSize DD ?
  208. nrp_wIP DW ?
  209. nrp_wCS DW ?
  210. nrp_wSS DW ?
  211. nrp_wBP DW ?
  212. nrp_wExitCode DW ?
  213. NFYRIP ENDS
  214. ;** NFY_TASKIN: No data. Callback should do GetCurrentTask()
  215. NFY_TASKIN EQU 8
  216. ;** NFY_TASKOUT: No data. Callback should do GetCurrentTask()
  217. NFY_TASKOUT EQU 9
  218. ;** NFY_INCHAR: Return value of callback is used. If FALSE, mapped to 'i'
  219. NFY_INCHAR EQU 10
  220. ;** NFY_OUTSTR: dwData points to the string to be displayed
  221. NFY_OUTSTR EQU 11
  222. ;** NFY_LOGERROR: dwData points to a NFYLOGERROR struct
  223. NFY_LOGERROR EQU 12
  224. NFYLOGERROR STRUC
  225. nle_dwSize DD ?
  226. nle_wErrCode DW ?
  227. nle_lpInfo DD ? ;Error-code dependent
  228. NFYLOGERROR ENDS
  229. ;** NFY_LOGPARAMERROR: dwData points to a NFYLOGPARAMERROR struct
  230. NFY_LOGPARAMERROR EQU 13
  231. NFYLOGPARAMERROR STRUC
  232. nlp_dwSize DD ?
  233. nlp_wErrCode DW ?
  234. nlp_lpfnErrorAddr DD ?
  235. nlp_lpBadParam DD ?
  236. NFYLOGPARAMERROR ENDS
  237. ;** NotifyRegister() flags
  238. NF_NORMAL EQU 0
  239. NF_TASKSWITCH EQU 1
  240. NF_RIP EQU 2
  241. ;** TerminateApp() flag values
  242. UAE_BOX EQU 0
  243. NO_UAE_BOX EQU 1
  244. TIMERINFO STRUC
  245. ti_dwSize DD ?
  246. ti_dwmsSinceStart DD ?
  247. ti_dwmsThisVM DD ?
  248. TIMERINFO ENDS