1 #ifndef __WINE_TOOLHELP_H
2 #define __WINE_TOOLHELP_H
5 #include "wine/windef16.h"
8 #define MAX_MODULE_NAME 9
10 #define MAX_CLASSNAME 255
41 /* GlobalFirst()/GlobalNext() flags */
57 #define GT_BURGERMASTER 10
60 #define GD_USERDEFINED 0
61 #define GD_CURSORCOMPONENT 1
63 #define GD_ICONCOMPONENT 3
69 #define GD_ACCELERATORS 9
71 #define GD_ERRTABLE 11
74 #define GD_NAMETABLE 15
75 #define GD_MAX_RESOURCE 15
78 #define GF_PDB_OWNER 0x0100 /* Low byte is KERNEL flags */
80 WORD WINAPI
GlobalHandleToSel16( HGLOBAL16 handle
);
81 BOOL16 WINAPI
GlobalInfo16( GLOBALINFO
*pInfo
);
82 BOOL16 WINAPI
GlobalFirst16( GLOBALENTRY
*pGlobal
, WORD wFlags
);
83 BOOL16 WINAPI
GlobalNext16( GLOBALENTRY
*pGlobal
, WORD wFlags
) ;
84 BOOL16 WINAPI
GlobalEntryHandle16( GLOBALENTRY
*pGlobal
, HGLOBAL16 hItem
);
85 BOOL16 WINAPI
GlobalEntryModule16( GLOBALENTRY
*pGlobal
, HMODULE16 hModule
,
110 /* wHeapType values */
111 #define NORMAL_HEAP 0
118 #define LF_MOVEABLE 4
123 #define LT_GDI_PEN 1 /* LT_GDI_* is for GDI's heap */
124 #define LT_GDI_BRUSH 2
125 #define LT_GDI_FONT 3
126 #define LT_GDI_PALETTE 4
127 #define LT_GDI_BITMAP 5
130 #define LT_GDI_DISABLED_DC 8
131 #define LT_GDI_METADC 9
132 #define LT_GDI_METAFILE 10
133 #define LT_GDI_MAX LT_GDI_METAFILE
134 #define LT_USER_CLASS 1 /* LT_USER_* is for USER's heap */
135 #define LT_USER_WND 2
136 #define LT_USER_STRING 3
137 #define LT_USER_MENU 4
138 #define LT_USER_CLIP 5
139 #define LT_USER_CBOX 6
140 #define LT_USER_PALETTE 7
142 #define LT_USER_BWL 9
143 #define LT_USER_OWNERDRAW 10
144 #define LT_USER_SPB 11
145 #define LT_USER_CHECKPOINT 12
146 #define LT_USER_DCE 13
147 #define LT_USER_MWP 14
148 #define LT_USER_PROP 15
149 #define LT_USER_LBIV 16
150 #define LT_USER_MISC 17
151 #define LT_USER_ATOMS 18
152 #define LT_USER_LOCKINPUTSTATE 19
153 #define LT_USER_HOOKLIST 20
154 #define LT_USER_USERSEEUSERDOALLOC 21
155 #define LT_USER_HOTKEYLIST 22
156 #define LT_USER_POPUPMENU 23
157 #define LT_USER_HANDLETABLE 32
158 #define LT_USER_MAX LT_USER_HANDLETABLE
160 BOOL16 WINAPI
LocalInfo16( LOCALINFO
*pLocalInfo
, HGLOBAL16 handle
);
161 BOOL16 WINAPI
LocalFirst16( LOCALENTRY
*pLocalEntry
, HGLOBAL16 handle
);
162 BOOL16 WINAPI
LocalNext16( LOCALENTRY
*pLocalEntry
);
164 /* Local 32-bit heap */
168 DWORD dwSize
; /* 00 */
169 DWORD dwMemReserved
; /* 04 */
170 DWORD dwMemCommitted
; /* 08 */
171 DWORD dwTotalFree
; /* 0C */
172 DWORD dwLargestFreeBlock
; /* 10 */
173 DWORD dwcFreeHandles
; /* 14 */
178 DWORD dwSize
; /* 00 */
179 WORD hHandle
; /* 04 */
180 DWORD dwAddress
; /* 06 */
181 DWORD dwSizeBlock
; /* 0A */
182 WORD wFlags
; /* 0E */
185 WORD wHeapType
; /* 14 */
186 DWORD dwNext
; /* 16 */
187 DWORD dwNextAlt
; /* 1A */
190 /* LOCAL32ENTRY.wHeapType flags same as LOCALENTRY.wHeapType flags */
191 /* LOCAL32ENTRY.wFlags same as LOCALENTRY.wFlags */
192 /* LOCAL32ENTRY.wType same as LOCALENTRY.wType */
194 BOOL16 WINAPI
Local32Info16( LOCAL32INFO
*pLocal32Info
, HGLOBAL16 handle
);
195 BOOL16 WINAPI
Local32First16( LOCAL32ENTRY
*pLocal32Entry
, HGLOBAL16 handle
);
196 BOOL16 WINAPI
Local32Next16( LOCAL32ENTRY
*pLocal32Entry
);
204 char szModule
[MAX_MODULE_NAME
+ 1];
207 char szExePath
[MAX_PATH16
+ 1];
209 } MODULEENTRY
, *LPMODULEENTRY
;
211 BOOL16 WINAPI
ModuleFirst16(MODULEENTRY
*lpModule
);
212 BOOL16 WINAPI
ModuleNext16(MODULEENTRY
*lpModule
);
213 BOOL16 WINAPI
ModuleFindName16(MODULEENTRY
*lpModule
, LPCSTR lpstrName
);
214 BOOL16 WINAPI
ModuleFindHandle16(MODULEENTRY
*lpModule
, HMODULE16 hModule
);
232 char szModule
[MAX_MODULE_NAME
+ 1];
235 } TASKENTRY
, *LPTASKENTRY
;
237 BOOL16 WINAPI
TaskFirst16(LPTASKENTRY lpTask
);
238 BOOL16 WINAPI
TaskNext16(LPTASKENTRY lpTask
);
239 BOOL16 WINAPI
TaskFindHandle16(LPTASKENTRY lpTask
, HTASK16 hTask
);
240 DWORD WINAPI
TaskSetCSIP(HTASK16 hTask
, WORD wCS
, WORD wIP
);
241 DWORD WINAPI
TaskGetCSIP(HTASK16 hTask
);
242 BOOL16 WINAPI
TaskSwitch(HTASK16 hTask
, DWORD dwNewCSIP
);
244 /* flag for TerminateApp16() */
249 typedef struct tagMEMMANINFO
{
251 DWORD dwLargestFreeBlock
;
252 DWORD dwMaxPagesAvailable
;
253 DWORD dwMaxPagesLockable
;
254 DWORD dwTotalLinearSpace
;
255 DWORD dwTotalUnlockedPages
;
258 DWORD dwFreeLinearSpace
;
259 DWORD dwSwapFilePages
;
262 typedef MEMMANINFO
*LPMEMMANINFO
;
267 WORD wUserFreePercent
;
268 WORD wGDIFreePercent
;
269 HGLOBAL16 hUserSegment
;
270 HGLOBAL16 hGDISegment
;
273 BOOL16 WINAPI
MemManInfo16(LPMEMMANINFO lpEnhMode
);
274 BOOL16 WINAPI
SystemHeapInfo16( SYSHEAPINFO
*pHeapInfo
);
278 typedef struct tagTIMERINFO
{
280 DWORD dwmsSinceStart
;
284 BOOL16 WINAPI
TimerCount16( TIMERINFO
*pTimerInfo
);
291 HMODULE16 hInst
; /* This is really an hModule */
292 char szClassName
[MAX_CLASSNAME
+ 1];
296 BOOL16 WINAPI
ClassFirst16( CLASSENTRY
*pClassEntry
);
297 BOOL16 WINAPI
ClassNext16( CLASSENTRY
*pClassEntry
);
300 /* Memory read/write */
302 DWORD WINAPI
MemoryRead16( WORD sel
, DWORD offset
, void *buffer
, DWORD count
);
303 DWORD WINAPI
MemoryWrite16( WORD sel
, DWORD offset
, void *buffer
, DWORD count
);
305 /* flags to NotifyRegister() */
306 #define NF_NORMAL 0 /* everything except taskswitches, debugerrors,
309 #define NF_TASKSWITCH 1 /* get taskswitch information */
310 #define NF_RIP 2 /* get debugerrors of system */
312 BOOL16 WINAPI
NotifyRegister16(HTASK16 htask
,FARPROC16 lpfnCallback
,WORD wFlags
);
314 #define NFY_UNKNOWN 0
315 #define NFY_LOADSEG 1
316 /* DATA is a pointer to following struct: */
321 WORD wType
; /* bit 0 set if this is a code segment */
322 WORD wcInstance
; /* only valid for data segment */
324 /* called when freeing a segment. LOWORD(dwData) is the freed selector */
325 #define NFY_FREESEG 2
327 /* called when loading/starting a DLL */
328 #define NFY_STARTDLL 3
336 /* called when starting a task. dwData is CS:IP */
337 #define NFY_STARTTASK 4
339 /* called when a task terminates. dwData is the return code */
340 #define NFY_EXITTASK 5
342 /* called when module is removed. LOWORD(dwData) is the handle */
343 #define NFY_DELMODULE 6
345 /* RIP? debugevent */
356 /* called before (after?) switching to a task
357 * no data, callback should call GetCurrentTask
361 /* called before(after?) switching from a task
362 * no data, callback should call GetCurrentTask
364 #define NFY_TASKOUT 9
366 /* returns ASCII input value, dwData not set */
367 #define NFY_INCHAR 10
369 /* output debugstring (pointed to by dwData) */
370 #define NFY_OUTSTRING 11
373 #define NFY_LOGERROR 12
377 VOID
*lpInfo
; /* depends on wErrCode */
380 /* called for parameter errors? */
381 #define NFY_LOGPARAMERROR 13
385 FARPROC16 lpfnErrorAddr
;
403 #endif /* __WINE_TOOLHELP_H */