1 #ifndef __WINE_TOOLHELP_H
2 #define __WINE_TOOLHELP_H
7 #define MAX_MODULE_NAME 9
9 #define MAX_CLASSNAME 255
40 /* GlobalFirst()/GlobalNext() flags */
56 #define GT_BURGERMASTER 10
59 #define GD_USERDEFINED 0
60 #define GD_CURSORCOMPONENT 1
62 #define GD_ICONCOMPONENT 3
68 #define GD_ACCELERATORS 9
70 #define GD_ERRTABLE 11
73 #define GD_NAMETABLE 15
74 #define GD_MAX_RESOURCE 15
77 #define GF_PDB_OWNER 0x0100 /* Low byte is KERNEL flags */
79 WORD WINAPI
GlobalHandleToSel16( HGLOBAL16 handle
);
80 BOOL16 WINAPI
GlobalInfo16( GLOBALINFO
*pInfo
);
81 BOOL16 WINAPI
GlobalFirst16( GLOBALENTRY
*pGlobal
, WORD wFlags
);
82 BOOL16 WINAPI
GlobalNext16( GLOBALENTRY
*pGlobal
, WORD wFlags
) ;
83 BOOL16 WINAPI
GlobalEntryHandle16( GLOBALENTRY
*pGlobal
, HGLOBAL16 hItem
);
84 BOOL16 WINAPI
GlobalEntryModule16( GLOBALENTRY
*pGlobal
, HMODULE16 hModule
,
109 /* wHeapType values */
110 #define NORMAL_HEAP 0
117 #define LF_MOVEABLE 4
122 #define LT_GDI_PEN 1 /* LT_GDI_* is for GDI's heap */
123 #define LT_GDI_BRUSH 2
124 #define LT_GDI_FONT 3
125 #define LT_GDI_PALETTE 4
126 #define LT_GDI_BITMAP 5
129 #define LT_GDI_DISABLED_DC 8
130 #define LT_GDI_METADC 9
131 #define LT_GDI_METAFILE 10
132 #define LT_GDI_MAX LT_GDI_METAFILE
133 #define LT_USER_CLASS 1 /* LT_USER_* is for USER's heap */
134 #define LT_USER_WND 2
135 #define LT_USER_STRING 3
136 #define LT_USER_MENU 4
137 #define LT_USER_CLIP 5
138 #define LT_USER_CBOX 6
139 #define LT_USER_PALETTE 7
141 #define LT_USER_BWL 9
142 #define LT_USER_OWNERDRAW 10
143 #define LT_USER_SPB 11
144 #define LT_USER_CHECKPOINT 12
145 #define LT_USER_DCE 13
146 #define LT_USER_MWP 14
147 #define LT_USER_PROP 15
148 #define LT_USER_LBIV 16
149 #define LT_USER_MISC 17
150 #define LT_USER_ATOMS 18
151 #define LT_USER_LOCKINPUTSTATE 19
152 #define LT_USER_HOOKLIST 20
153 #define LT_USER_USERSEEUSERDOALLOC 21
154 #define LT_USER_HOTKEYLIST 22
155 #define LT_USER_POPUPMENU 23
156 #define LT_USER_HANDLETABLE 32
157 #define LT_USER_MAX LT_USER_HANDLETABLE
159 BOOL16 WINAPI
LocalInfo16( LOCALINFO
*pLocalInfo
, HGLOBAL16 handle
);
160 BOOL16 WINAPI
LocalFirst16( LOCALENTRY
*pLocalEntry
, HGLOBAL16 handle
);
161 BOOL16 WINAPI
LocalNext16( LOCALENTRY
*pLocalEntry
);
163 /* Local 32-bit heap */
167 DWORD dwSize
; /* 00 */
168 DWORD dwMemReserved
; /* 04 */
169 DWORD dwMemCommitted
; /* 08 */
170 DWORD dwTotalFree
; /* 0C */
171 DWORD dwLargestFreeBlock
; /* 10 */
172 DWORD dwcFreeHandles
; /* 14 */
177 DWORD dwSize
; /* 00 */
178 WORD hHandle
; /* 04 */
179 DWORD dwAddress
; /* 06 */
180 DWORD dwSizeBlock
; /* 0A */
181 WORD wFlags
; /* 0E */
184 WORD wHeapType
; /* 14 */
185 DWORD dwNext
; /* 16 */
186 DWORD dwNextAlt
; /* 1A */
189 /* LOCAL32ENTRY.wHeapType flags same as LOCALENTRY.wHeapType flags */
190 /* LOCAL32ENTRY.wFlags same as LOCALENTRY.wFlags */
191 /* LOCAL32ENTRY.wType same as LOCALENTRY.wType */
193 BOOL16 WINAPI
Local32Info16( LOCAL32INFO
*pLocal32Info
, HGLOBAL16 handle
);
194 BOOL16 WINAPI
Local32First16( LOCAL32ENTRY
*pLocal32Entry
, HGLOBAL16 handle
);
195 BOOL16 WINAPI
Local32Next16( LOCAL32ENTRY
*pLocal32Entry
);
203 char szModule
[MAX_MODULE_NAME
+ 1];
206 char szExePath
[MAX_PATH16
+ 1];
208 } MODULEENTRY
, *LPMODULEENTRY
;
210 BOOL16 WINAPI
ModuleFirst16(MODULEENTRY
*lpModule
);
211 BOOL16 WINAPI
ModuleNext16(MODULEENTRY
*lpModule
);
212 BOOL16 WINAPI
ModuleFindName16(MODULEENTRY
*lpModule
, LPCSTR lpstrName
);
213 BOOL16 WINAPI
ModuleFindHandle16(MODULEENTRY
*lpModule
, HMODULE16 hModule
);
231 char szModule
[MAX_MODULE_NAME
+ 1];
234 } TASKENTRY
, *LPTASKENTRY
;
236 BOOL16 WINAPI
TaskFirst16(LPTASKENTRY lpTask
);
237 BOOL16 WINAPI
TaskNext16(LPTASKENTRY lpTask
);
238 BOOL16 WINAPI
TaskFindHandle16(LPTASKENTRY lpTask
, HTASK16 hTask
);
239 DWORD WINAPI
TaskSetCSIP(HTASK16 hTask
, WORD wCS
, WORD wIP
);
240 DWORD WINAPI
TaskGetCSIP(HTASK16 hTask
);
241 BOOL16 WINAPI
TaskSwitch(HTASK16 hTask
, DWORD dwNewCSIP
);
245 typedef struct tagMEMMANINFO
{
247 DWORD dwLargestFreeBlock
;
248 DWORD dwMaxPagesAvailable
;
249 DWORD dwMaxPagesLockable
;
250 DWORD dwTotalLinearSpace
;
251 DWORD dwTotalUnlockedPages
;
254 DWORD dwFreeLinearSpace
;
255 DWORD dwSwapFilePages
;
258 typedef MEMMANINFO
*LPMEMMANINFO
;
263 WORD wUserFreePercent
;
264 WORD wGDIFreePercent
;
265 HGLOBAL16 hUserSegment
;
266 HGLOBAL16 hGDISegment
;
269 BOOL16 WINAPI
MemManInfo16(LPMEMMANINFO lpEnhMode
);
270 BOOL16 WINAPI
SystemHeapInfo16( SYSHEAPINFO
*pHeapInfo
);
274 typedef struct tagTIMERINFO
{
276 DWORD dwmsSinceStart
;
280 BOOL16 WINAPI
TimerCount16( TIMERINFO
*pTimerInfo
);
287 HMODULE16 hInst
; /* This is really an hModule */
288 char szClassName
[MAX_CLASSNAME
+ 1];
292 BOOL16 WINAPI
ClassFirst16( CLASSENTRY
*pClassEntry
);
293 BOOL16 WINAPI
ClassNext16( CLASSENTRY
*pClassEntry
);
296 /* Memory read/write */
298 DWORD WINAPI
MemoryRead16( WORD sel
, DWORD offset
, void *buffer
, DWORD count
);
299 DWORD WINAPI
MemoryWrite16( WORD sel
, DWORD offset
, void *buffer
, DWORD count
);
301 /* flags to NotifyRegister() */
302 #define NF_NORMAL 0 /* everything except taskswitches, debugerrors,
305 #define NF_TASKSWITCH 1 /* get taskswitch information */
306 #define NF_RIP 2 /* get debugerrors of system */
308 BOOL16 WINAPI
NotifyRegister16(HTASK16 htask
,FARPROC16 lpfnCallback
,WORD wFlags
);
310 #define NFY_UNKNOWN 0
311 #define NFY_LOADSEG 1
312 /* DATA is a pointer to following struct: */
317 WORD wType
; /* bit 0 set if this is a code segment */
318 WORD wcInstance
; /* only valid for data segment */
320 /* called when freeing a segment. LOWORD(dwData) is the freed selector */
321 #define NFY_FREESEG 2
323 /* called when loading/starting a DLL */
324 #define NFY_STARTDLL 3
332 /* called when starting a task. dwData is CS:IP */
333 #define NFY_STARTTASK 4
335 /* called when a task terminates. dwData is the return code */
336 #define NFY_EXITTASK 5
338 /* called when module is removed. LOWORD(dwData) is the handle */
339 #define NFY_DELMODULE 6
341 /* RIP? debugevent */
352 /* called before (after?) switching to a task
353 * no data, callback should call GetCurrentTask
357 /* called before(after?) switching from a task
358 * no data, callback should call GetCurrentTask
360 #define NFY_TASKOUT 9
362 /* returns ASCII input value, dwData not set */
363 #define NFY_INCHAR 10
365 /* output debugstring (pointed to by dwData) */
366 #define NFY_OUTSTRING 11
369 #define NFY_LOGERROR 12
373 VOID
*lpInfo
; /* depends on wErrCode */
376 /* called for parameter errors? */
377 #define NFY_LOGPARAMERROR 13
381 FARPROC16 lpfnErrorAddr
;
399 #endif /* __WINE_TOOLHELP_H */