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.

355 lines
11 KiB

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