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.

220 lines
4.8 KiB

  1. /**************************************************************************
  2. * TOOLPRIV.H
  3. *
  4. * Private header file for routines in the tool helper library
  5. *
  6. **************************************************************************/
  7. #ifndef TOOLPRIV_H
  8. #define TOOLPRIV_H
  9. #define BUILDDLL
  10. #include <windows.h>
  11. #include "toolhelp.h"
  12. /* ----- Symbols ----- */
  13. #define VERSION 1
  14. #ifndef NOEXPORT
  15. #define NOEXPORT static
  16. #endif
  17. #define TOOLHELPAPI WINAPI
  18. #define FAULT_ACTIVE 2
  19. #define NUM_EXCEPTIONS 3
  20. /* wTHFlag values */
  21. #define TH_KERNEL_286 1
  22. #define TH_KERNEL_386 2
  23. #define TH_WIN30 4
  24. #define TH_WIN30STDMODE 8 /* THWIN30STDMODE set if TH_WIN30 & Std mode */
  25. #define TH_GOODPTRACEHOOK 16
  26. #define TH_GOTOLDPTRACE 32
  27. /* ----- Code macros ----- */
  28. #define MAKEFARPTR(s, o) ((void FAR *)(((WORD)(o)) | \
  29. (((DWORD)(WORD)(s)) << 16)))
  30. /* ----- Types ----- */
  31. typedef struct tagNOTIFYSTRUCT
  32. {
  33. struct tagNOTIFYSTRUCT *pNext;
  34. HANDLE hTask;
  35. LPFNNOTIFYCALLBACK lpfn;
  36. WORD wFlags;
  37. } NOTIFYSTRUCT;
  38. typedef void (FAR PASCAL *LPFNCALLBACK)(void);
  39. typedef struct tagINTERRUPT
  40. {
  41. struct tagINTERRUPT *pNext;
  42. HANDLE hTask;
  43. LPFNCALLBACK lpfn;
  44. } INTERRUPT;
  45. typedef struct tagSIGNAL
  46. {
  47. struct tagSIGNAL *pNext;
  48. HANDLE hTask;
  49. LPFNCALLBACK lpfn;
  50. LPFNCALLBACK lpfnOld;
  51. } SIGNAL;
  52. typedef LONG (FAR PASCAL *LPFNUSUD)(
  53. WORD wID,
  54. WORD wParam,
  55. LONG lParam);
  56. /* ----- TOOLHELP global variables ----- */
  57. extern WORD segKernel;
  58. extern WORD wLibInstalled;
  59. extern HANDLE hMaster;
  60. extern WORD wTHFlags;
  61. extern HANDLE hUserHeap;
  62. extern HANDLE hGDIHeap;
  63. extern WORD NEAR *npwExeHead;
  64. extern WORD NEAR *npwTDBHead;
  65. extern WORD NEAR *npwTDBCur;
  66. extern DWORD NEAR *npdwSelTableStart;
  67. extern WORD NEAR *npwSelTableLen;
  68. extern WORD wNotifyInstalled;
  69. extern NOTIFYSTRUCT NEAR *npNotifyHead;
  70. extern WORD wIntInstalled;
  71. extern INTERRUPT NEAR *npIntHead;
  72. extern FARPROC lpfnGetUserLocalObjType;
  73. extern FARPROC lpfnFatalExitHook;
  74. extern FARPROC PASCAL lpfnPV;
  75. extern FARPROC lpfnNotifyHook;
  76. extern FARPROC lpfnGetFreeSystemResources;
  77. extern FARPROC lpfntimeGetTime;
  78. extern LPFNUSUD lpfnUserSeeUserDo;
  79. extern WORD wSignalInstalled;
  80. extern SIGNAL NEAR *npSignalHead;
  81. extern NOTIFYSTRUCT NEAR* npNotifyNext;
  82. extern WORD wLRUCount;
  83. /* ----- Private function prototypes ----- */
  84. void PASCAL KernelType(void);
  85. DWORD PASCAL Walk386First(
  86. WORD wFlags);
  87. WORD PASCAL Walk386Count(
  88. WORD wFlags);
  89. void PASCAL Walk386(
  90. DWORD dwBlock,
  91. GLOBALENTRY FAR *lpGlobal,
  92. WORD wFlags);
  93. DWORD PASCAL Walk386Handle(
  94. HANDLE hBlock);
  95. WORD PASCAL WalkLoc386Count(
  96. HANDLE hHeap);
  97. HANDLE PASCAL WalkLoc386First(
  98. HANDLE hHeap);
  99. void PASCAL WalkLoc386(
  100. WORD wBlock,
  101. LOCALENTRY FAR *lpLocal,
  102. HANDLE hHeap);
  103. DWORD PASCAL Walk286First(
  104. WORD wFlags);
  105. WORD PASCAL Walk286Count(
  106. WORD wFlags);
  107. void PASCAL Walk286(
  108. DWORD dwBlock,
  109. GLOBALENTRY FAR *lpGlobal,
  110. WORD wFlags);
  111. DWORD PASCAL Walk286Handle(
  112. HANDLE hBlock);
  113. WORD PASCAL WalkLoc286Count(
  114. HANDLE hHeap);
  115. HANDLE PASCAL WalkLoc286First(
  116. HANDLE hHeap);
  117. void PASCAL WalkLoc286(
  118. WORD wBlock,
  119. LOCALENTRY FAR *lpLocal,
  120. HANDLE hHeap);
  121. BOOL PASCAL TaskInfo(
  122. TASKENTRY FAR *lpTask,
  123. WORD wBlock);
  124. WORD PASCAL StackFrameFirst(
  125. STACKTRACEENTRY FAR *lpStack,
  126. HANDLE hTDB);
  127. BOOL PASCAL StackFrameNext(
  128. STACKTRACEENTRY FAR *lpStack);
  129. HANDLE PASCAL UserGdiDGROUP(
  130. HANDLE hModule);
  131. DWORD PASCAL UserGdiSpace(
  132. HANDLE hData);
  133. WORD PASCAL HelperVerifySeg(
  134. WORD wSeg,
  135. WORD wcb);
  136. WORD PASCAL HelperHandleToSel(
  137. HANDLE h);
  138. void PASCAL HelperGlobalType(
  139. GLOBALENTRY FAR *lpGlobal);
  140. WORD PASCAL HelperGrabSelector(void);
  141. void PASCAL HelperReleaseSelector(
  142. WORD wSelector);
  143. void PASCAL UserGdiType(
  144. LOCALENTRY FAR *lpLocal);
  145. BOOL PASCAL NotifyInit(void);
  146. void PASCAL NotifyUnInit(void);
  147. BOOL PASCAL NotifyIsHooked(
  148. HANDLE hTask);
  149. BOOL PASCAL InterruptInit(void);
  150. void PASCAL InterruptUnInit(void);
  151. BOOL PASCAL InterruptIsHooked(
  152. HANDLE hTask);
  153. BOOL PASCAL SignalRegister(
  154. HANDLE hTask);
  155. BOOL PASCAL SignalUnRegister(
  156. HANDLE hTask);
  157. void FAR PASCAL HelperSignalProc(void);
  158. DWORD PASCAL HelperSetSignalProc(
  159. HANDLE hTask,
  160. DWORD lpfn);
  161. BOOL PASCAL ClassInfo(
  162. CLASSENTRY FAR *lpClass,
  163. WORD wOffset);
  164. DWORD PASCAL HelperSegLen(
  165. WORD wSeg);
  166. #endif