Improved display and layout code.
[wine.git] / include / imagehlp.h
blob3d42baa3618ed3beac64d393958e49f5c1606fe4
1 /*
2 * imagehlp.h - Declarations for IMAGEHLP
3 */
5 #ifndef __WINE_IMAGEHLP_H
6 #define __WINE_IMAGEHLP_H
8 #include "toolhelp.h"
9 #include "wintypes.h"
11 /***********************************************************************
12 * Types
15 #define ANYSIZE_ARRAY 1 /* FIXME: Move to wintypes.h */
17 typedef unsigned char UCHAR; /* FIXME: Move to wintypes.h */
18 typedef UCHAR *PUCHAR; /* FIXME: Move to wintypes.h */
19 typedef CHAR *PCHAR; /* FIXME: Move to wintypes.h */
20 typedef unsigned char boolean; /* FIXME: Move to wintypes.h */
21 typedef boolean BOOLEAN; /* FIXME: Move to wintypes.h */
22 typedef void *PVOID; /* FIXME: Move to wintypes.h */
23 typedef DWORD *PDWORD; /* FIXME: Move to wintypes.h */
24 typedef BYTE *PBYTE; /* FIXME: Move to wintypes.h */
25 typedef ULONG *PULONG; /* FIXME: Move to wintypes.h */
26 typedef unsigned short USHORT; /* FIXME: Move to wintypes.h */
27 typedef const void *PCVOID; /* FIXME: Move to wintypes.h */
28 typedef UINT32 *PUINT32; /* FIXME: Move to wintypes.h */
30 typedef struct _LIST_ENTRY32 {
31 struct _LIST_ENTRY32 *Flink;
32 struct _LIST_ENTRY32 *Blink;
33 } LIST_ENTRY32, *PLIST_ENTRY32; /* FIXME: Move to wintypes.h */
35 typedef struct _SINGLE_LIST_ENTRY32 {
36 struct _SINGLE_LIST_ENTRY32 *Next;
37 } SINGLE_LIST_ENTRY32, *PSINGLE_LIST_ENTRY32; /* FIXME: Move to wintypes.h */
39 /* FIXME: Move to wintypes.h */
40 #define FIELD_OFFSET(type, field) \
41 ((LONG)(INT32)&(((type *)0)->field))
43 /* FIXME: Move to wintypes.h */
44 #define CONTAINING_RECORD(address, type, field) \
45 ((type *)((PCHAR)(address) - (PCHAR)(&((type *)0)->field)))
47 typedef PVOID DIGEST_HANDLE32;
49 /***********************************************************************
50 * Enums/Defines
53 typedef enum _IMAGEHLP_STATUS_REASON32 {
54 BindOutOfMemory,
55 BindRvaToVaFailed,
56 BindNoRoomInImage,
57 BindImportModuleFailed,
58 BindImportProcedureFailed,
59 BindImportModule,
60 BindImportProcedure,
61 BindForwarder,
62 BindForwarderNOT,
63 BindImageModified,
64 BindExpandFileHeaders,
65 BindImageComplete,
66 BindMismatchedSymbols,
67 BindSymbolsNotUpdated
68 } IMAGEHLP_STATUS_REASON32;
70 #define BIND_NO_BOUND_IMPORTS 0x00000001
71 #define BIND_NO_UPDATE 0x00000002
72 #define BIND_ALL_IMAGES 0x00000004
73 #define BIND_CACHE_IMPORT_DLLS 0x00000008
75 #define CERT_PE_IMAGE_DIGEST_DEBUG_INFO 0x01
76 #define CERT_PE_IMAGE_DIGEST_RESOURCES 0x02
77 #define CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO 0x04
78 #define CERT_PE_IMAGE_DIGEST_NON_PE_INFO 0x08
80 #define CERT_SECTION_TYPE_ANY 0xFF
82 #define WIN_CERT_REVISION_1_0 0x0100
83 #define WIN_CERT_REVISION_2_0 0x0200
85 #define WIN_CERT_TYPE_X509 0x0001 /* X.509 Certificate */
86 #define WIN_CERT_TYPE_PKCS_SIGNED_DATA 0x0002 /* PKCS SignedData */
87 #define WIN_CERT_TYPE_RESERVED_1 0x0003 /* Reserved */
89 #define SPLITSYM_REMOVE_PRIVATE 0x00000001
90 #define SPLITSYM_EXTRACT_ALL 0x00000002
91 #define SPLITSYM_SYMBOLPATH_IS_SRC 0x00000004
93 #define IMAGE_DEBUG_TYPE_UNKNOWN 0
94 #define IMAGE_DEBUG_TYPE_COFF 1
95 #define IMAGE_DEBUG_TYPE_CODEVIEW 2
96 #define IMAGE_DEBUG_TYPE_FPO 3
97 #define IMAGE_DEBUG_TYPE_MISC 4
98 #define IMAGE_DEBUG_TYPE_EXCEPTION 5
99 #define IMAGE_DEBUG_TYPE_FIXUP 6
100 #define IMAGE_DEBUG_TYPE_OMAP_TO_SRC 7
101 #define IMAGE_DEBUG_TYPE_OMAP_FROM_SRC 8
102 #define IMAGE_DEBUG_TYPE_BORLAND 9
103 #define IMAGE_DEBUG_TYPE_RESERVED10 10
105 #define FRAME_FPO 0
106 #define FRAME_TRAP 1
107 #define FRAME_TSS 2
108 #define FRAME_NONFPO 3
110 #define CHECKSUM_SUCCESS 0
111 #define CHECKSUM_OPEN_FAILURE 1
112 #define CHECKSUM_MAP_FAILURE 2
113 #define CHECKSUM_MAPVIEW_FAILURE 3
114 #define CHECKSUM_UNICODE_FAILURE 4
116 typedef enum _ADRESS_MODE32 {
117 AddrMode1616,
118 AddrMode1632,
119 AddrModeReal,
120 AddrModeFlat
121 } ADDRESS_MODE32;
123 #define SYMOPT_CASE_INSENSITIVE 0x00000001
124 #define SYMOPT_UNDNAME 0x00000002
125 #define SYMOPT_DEFERRED_LOADS 0x00000004
126 #define SYMOPT_NO_CPP 0x00000008
127 #define SYMOPT_LOAD_LINES 0x00000010
128 #define SYMOPT_OMAP_FIND_NEAREST 0x00000020
130 #define SYMF_OMAP_GENERATED 0x00000001
131 #define SYMF_OMAP_MODIFIED 0x00000002
133 typedef enum _SYM_TYPE32 {
134 SymNone,
135 SymCoff,
136 SymCv,
137 SymPdb,
138 SymExport,
139 SymDeferred,
140 SymSym /* .sym file */
141 } SYM_TYPE32;
143 #define UNDNAME_COMPLETE 0x0000
144 #define UNDNAME_NO_LEADING_UNDERSCORES 0x0001
145 #define UNDNAME_NO_MS_KEYWORDS 0x0002
146 #define UNDNAME_NO_FUNCTION_RETURNS 0x0004
147 #define UNDNAME_NO_ALLOCATION_MODEL 0x0008
148 #define UNDNAME_NO_ALLOCATION_LANGUAGE 0x0010
149 #define UNDNAME_NO_MS_THISTYPE 0x0020
150 #define UNDNAME_NO_CV_THISTYPE 0x0040
151 #define UNDNAME_NO_THISTYPE 0x0060
152 #define UNDNAME_NO_ACCESS_SPECIFIERS 0x0080
153 #define UNDNAME_NO_THROW_SIGNATURES 0x0100
154 #define UNDNAME_NO_MEMBER_TYPE 0x0200
155 #define UNDNAME_NO_RETURN_UDT_MODEL 0x0400
156 #define UNDNAME_32_BIT_DECODE 0x0800
157 #define UNDNAME_NAME_ONLY 0x1000
158 #define UNDNAME_NO_ARGUMENTS 0x2000
159 #define UNDNAME_NO_SPECIAL_SYMS 0x4000
161 #define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001
162 #define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002
163 #define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003
164 #define CBA_SYMBOLS_UNLOADED 0x00000004
165 #define CBA_DUPLICATE_SYMBOL 0x00000005
167 #define IMAGE_DOS_SIGNATURE 0x5A4D /* MZ */
168 #define IMAGE_OS2_SIGNATURE 0x454E /* NE */
169 #define IMAGE_OS2_SIGNATURE_LE 0x454C /* LE */
170 #define IMAGE_VXD_SIGNATURE 0x454C /* LE */
171 #define IMAGE_NT_SIGNATURE 0x00004550 /* PE00 */
173 /***********************************************************************
174 * Structures
177 typedef struct _IMAGE_DATA_DIRECTORY32 {
178 DWORD VirtualAddress;
179 DWORD Size;
180 } IMAGE_DATA_DIRECTORY32, *PIMAGE_DATA_DIRECTORY32;
182 #define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
184 typedef struct _IMAGE_OPTIONAL_HEADER32 {
186 /* Standard fields */
188 WORD Magic;
189 BYTE MajorLinkerVersion;
190 BYTE MinorLinkerVersion;
191 DWORD SizeOfCode;
192 DWORD SizeOfInitializedData;
193 DWORD SizeOfUninitializedData;
194 DWORD AddressOfEntryPoint;
195 DWORD BaseOfCode;
196 DWORD BaseOfData;
198 /* NT additional fields */
200 DWORD ImageBase;
201 DWORD SectionAlignment;
202 DWORD FileAlignment;
203 WORD MajorOperatingSystemVersion;
204 WORD MinorOperatingSystemVersion;
205 WORD MajorImageVersion;
206 WORD MinorImageVersion;
207 WORD MajorSubsystemVersion;
208 WORD MinorSubsystemVersion;
209 DWORD Win32VersionValue;
210 DWORD SizeOfImage;
211 DWORD SizeOfHeaders;
212 DWORD CheckSum;
213 WORD Subsystem;
214 WORD DllCharacteristics;
215 DWORD SizeOfStackReserve;
216 DWORD SizeOfStackCommit;
217 DWORD SizeOfHeapReserve;
218 DWORD SizeOfHeapCommit;
219 DWORD LoaderFlags;
220 DWORD NumberOfRvaAndSizes;
221 IMAGE_DATA_DIRECTORY32 DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
222 } IMAGE_OPTIONAL_HEADER32, *PIMAGE_OPTIONAL_HEADER32;
224 typedef struct _IMAGE_FILE_HEADER32 {
225 WORD Machine;
226 WORD NumberOfSections;
227 DWORD TimeDateStamp;
228 DWORD PointerToSymbolTable;
229 DWORD NumberOfSymbols;
230 WORD SizeOfOptionalHeader;
231 WORD Characteristics;
232 } IMAGE_FILE_HEADER32, *PIMAGE_FILE_HEADER32;
234 typedef struct _IMAGE_NT_HEADERS32 {
235 DWORD Signature;
236 IMAGE_FILE_HEADER32 FileHeader;
237 IMAGE_OPTIONAL_HEADER32 OptionalHeader;
238 } IMAGE_NT_HEADERS32, *PIMAGE_NT_HEADERS32;
240 #define IMAGE_SIZEOF_SHORT_NAME 8
242 typedef struct _IMAGE_SECTION_HEADER32 {
243 BYTE Name[IMAGE_SIZEOF_SHORT_NAME];
244 union {
245 DWORD PhysicalAddress;
246 DWORD VirtualSize;
247 } Misc;
248 DWORD VirtualAddress;
249 DWORD SizeOfRawData;
250 DWORD PointerToRawData;
251 DWORD PointerToRelocations;
252 DWORD PointerToLinenumbers;
253 WORD NumberOfRelocations;
254 WORD NumberOfLinenumbers;
255 DWORD Characteristics;
256 } IMAGE_SECTION_HEADER32, *PIMAGE_SECTION_HEADER32;
258 typedef struct _LOADED_IMAGE32 {
259 LPSTR ModuleName;
260 HANDLE32 hFile;
261 PUCHAR MappedAddress;
262 PIMAGE_NT_HEADERS32 FileHeader;
263 PIMAGE_SECTION_HEADER32 LastRvaSection;
264 ULONG NumberOfSections;
265 PIMAGE_SECTION_HEADER32 Sections;
266 ULONG Characteristics;
267 BOOLEAN fSystemImage;
268 BOOLEAN fDOSImage;
269 LIST_ENTRY32 Links;
270 ULONG SizeOfImage;
271 } LOADED_IMAGE32, *PLOADED_IMAGE32;
273 typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY32 {
274 DWORD Characteristics;
275 DWORD TimeDateStamp;
276 WORD MajorVersion;
277 WORD MinorVersion;
278 DWORD GlobalFlagsClear;
279 DWORD GlobalFlagsSet;
280 DWORD CriticalSectionDefaultTimeout;
281 DWORD DeCommitFreeBlockThreshold;
282 DWORD DeCommitTotalFreeThreshold;
283 PVOID LockPrefixTable;
284 DWORD MaximumAllocationSize;
285 DWORD VirtualMemoryThreshold;
286 DWORD ProcessHeapFlags;
287 DWORD ProcessAffinityMask;
288 WORD CSDVersion;
289 WORD Reserved1;
290 PVOID EditList;
291 DWORD Reserved[1];
292 } IMAGE_LOAD_CONFIG_DIRECTORY32, *PIMAGE_LOAD_CONFIG_DIRECTORY32;
294 typedef struct _WIN_CERTIFICATE32 {
295 DWORD dwLength;
296 WORD wRevision; /* WIN_CERT_REVISON_xxx */
297 WORD wCertificateType; /* WIN_CERT_TYPE_xxx */
298 BYTE bCertificate[ANYSIZE_ARRAY];
299 } WIN_CERTIFICATE32, *PWIN_CERTIFICATE32;
301 typedef struct _API_VERSION32 {
302 USHORT MajorVersion;
303 USHORT MinorVersion;
304 USHORT Revision;
305 USHORT Reserved;
306 } API_VERSION32, *PAPI_VERSION32;
308 typedef struct _IMAGE_FUNCTION_ENTRY32 {
309 DWORD StartingAddress;
310 DWORD EndingAddress;
311 DWORD EndOfPrologue;
312 } IMAGE_FUNCTION_ENTRY32, *PIMAGE_FUNCTION_ENTRY32;
314 typedef struct _IMAGE_DEBUG_DIRECTORY32 {
315 DWORD Characteristics;
316 DWORD TimeDateStamp;
317 WORD MajorVersion;
318 WORD MinorVersion;
319 DWORD Type;
320 DWORD SizeOfData;
321 DWORD AddressOfRawData;
322 DWORD PointerToRawData;
323 } IMAGE_DEBUG_DIRECTORY32, *PIMAGE_DEBUG_DIRECTORY32;
325 typedef struct _IMAGE_COFF_SYMBOLS_HEADER32 {
326 DWORD NumberOfSymbols;
327 DWORD LvaToFirstSymbol;
328 DWORD NumberOfLinenumbers;
329 DWORD LvaToFirstLinenumber;
330 DWORD RvaToFirstByteOfCode;
331 DWORD RvaToLastByteOfCode;
332 DWORD RvaToFirstByteOfData;
333 DWORD RvaToLastByteOfData;
334 } IMAGE_COFF_SYMBOLS_HEADER32, *PIMAGE_COFF_SYMBOLS_HEADER32;
336 typedef struct _FPO_DATA32 {
337 DWORD ulOffStart;
338 DWORD cbProcSize;
339 DWORD cdwLocals;
340 WORD cdwParams;
341 WORD cbProlog : 8;
342 WORD cbRegs : 3;
343 WORD fHasSEH : 1;
344 WORD fUseBP : 1;
345 WORD reserved : 1;
346 WORD cbFrame : 2;
347 } FPO_DATA32, *PFPO_DATA32;
349 typedef struct _IMAGE_DEBUG_INFORMATION32 {
350 LIST_ENTRY32 List;
351 DWORD Size;
352 PVOID MappedBase;
353 USHORT Machine;
354 USHORT Characteristics;
355 DWORD CheckSum;
356 DWORD ImageBase;
357 DWORD SizeOfImage;
359 DWORD NumberOfSections;
360 PIMAGE_SECTION_HEADER32 Sections;
362 DWORD ExportedNamesSize;
363 LPSTR ExportedNames;
365 DWORD NumberOfFunctionTableEntries;
366 PIMAGE_FUNCTION_ENTRY32 FunctionTableEntries;
367 DWORD LowestFunctionStartingAddress;
368 DWORD HighestFunctionEndingAddress;
370 DWORD NumberOfFpoTableEntries;
371 PFPO_DATA32 FpoTableEntries;
373 DWORD SizeOfCoffSymbols;
374 PIMAGE_COFF_SYMBOLS_HEADER32 CoffSymbols;
376 DWORD SizeOfCodeViewSymbols;
377 PVOID CodeViewSymbols;
379 LPSTR ImageFilePath;
380 LPSTR ImageFileName;
381 LPSTR DebugFilePath;
383 DWORD TimeDateStamp;
385 BOOL32 RomImage;
386 PIMAGE_DEBUG_DIRECTORY32 DebugDirectory;
387 DWORD NumberOfDebugDirectories;
389 DWORD Reserved[3];
390 } IMAGE_DEBUG_INFORMATION32, *PIMAGE_DEBUG_INFORMATION32;
392 typedef struct _ADDRESS32 {
393 DWORD Offset;
394 WORD Segment;
395 ADDRESS_MODE32 Mode;
396 } ADDRESS32, *PADDRESS32;
398 typedef struct _KDHELP32 {
399 DWORD Thread;
400 DWORD ThCallbackStack;
401 DWORD NextCallback;
402 DWORD FramePointer;
403 DWORD KiCallUserMode;
404 DWORD KeUserCallbackDispatcher;
405 DWORD SystemRangeStart;
406 } KDHELP32, *PKDHELP32;
408 typedef struct _STACKFRAME32 {
409 ADDRESS32 AddrPC;
410 ADDRESS32 AddrReturn;
411 ADDRESS32 AddrFrame;
412 ADDRESS32 AddrStack;
413 PVOID FuncTableEntry;
414 DWORD Params[4];
415 BOOL32 Far;
416 BOOL32 Virtual;
417 DWORD Reserved[3];
418 KDHELP32 KdHelp;
419 } STACKFRAME32, *PSTACKFRAME32;
421 typedef struct _IMAGEHLP_SYMBOL32 {
422 DWORD SizeOfStruct;
423 DWORD Address;
424 DWORD Size;
425 DWORD Flags;
426 DWORD MaxNameLength;
427 CHAR Name[ANYSIZE_ARRAY];
428 } IMAGEHLP_SYMBOL32, *PIMAGEHLP_SYMBOL32;
430 typedef struct _IMAGEHLP_MODULE32 {
431 DWORD SizeOfStruct;
432 DWORD BaseOfImage;
433 DWORD ImageSize;
434 DWORD TimeDateStamp;
435 DWORD CheckSum;
436 DWORD NumSyms;
437 SYM_TYPE32 SymType;
438 CHAR ModuleName[32];
439 CHAR ImageName[256];
440 CHAR LoadedImageName[256];
441 } IMAGEHLP_MODULE32, *PIMAGEHLP_MODULE32;
443 typedef struct _IMAGEHLP_LINE32 {
444 DWORD SizeOfStruct;
445 DWORD Key;
446 DWORD LineNumber;
447 PCHAR FileName;
448 DWORD Address;
449 } IMAGEHLP_LINE32, *PIMAGEHLP_LINE32;
451 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD32 {
452 DWORD SizeOfStruct;
453 DWORD BaseOfImage;
454 DWORD CheckSum;
455 DWORD TimeDateStamp;
456 CHAR FileName[MAX_PATH];
457 BOOLEAN Reparse;
458 } IMAGEHLP_DEFERRED_SYMBOL_LOAD32, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD32;
460 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL32 {
461 DWORD SizeOfStruct;
462 DWORD NumberOfDups;
463 PIMAGEHLP_SYMBOL32 Symbol;
464 ULONG SelectedSymbol;
465 } IMAGEHLP_DUPLICATE_SYMBOL32, *PIMAGEHLP_DUPLICATE_SYMBOL32;
467 typedef struct _IMAGE_DOS_HEADER32 {
468 WORD e_magic;
469 WORD e_cblp;
470 WORD e_cp;
471 WORD e_crlc;
472 WORD e_cparhdr;
473 WORD e_minalloc;
474 WORD e_maxalloc;
475 WORD e_ss;
476 WORD e_sp;
477 WORD e_csum;
478 WORD e_ip;
479 WORD e_cs;
480 WORD e_lfarlc;
481 WORD e_ovno;
482 WORD e_res[4];
483 WORD e_oemid;
484 WORD e_oeminfo;
485 WORD e_res2[10];
486 LONG e_lfanew;
487 } IMAGE_DOS_HEADER32, *PIMAGE_DOS_HEADER32;
489 typedef struct _IMAGE_OS2_HEADER32 {
490 WORD ne_magic;
491 CHAR ne_ver;
492 CHAR ne_rev;
493 WORD ne_enttab;
494 WORD ne_cbenttab;
495 LONG ne_crc;
496 WORD ne_flags;
497 WORD ne_autodata;
498 WORD ne_heap;
499 WORD ne_stack;
500 LONG ne_csip;
501 LONG ne_sssp;
502 WORD ne_cseg;
503 WORD ne_cmod;
504 WORD ne_cbnrestab;
505 WORD ne_segtab;
506 WORD ne_rsrctab;
507 WORD ne_restab;
508 WORD ne_modtab;
509 WORD ne_imptab;
510 LONG ne_nrestab;
511 WORD ne_cmovent;
512 WORD ne_align;
513 WORD ne_cres;
514 BYTE ne_exetyp;
515 BYTE ne_flagsothers;
516 WORD ne_pretthunks;
517 WORD ne_psegrefbytes;
518 WORD ne_swaparea;
519 WORD ne_expver;
520 } IMAGE_OS2_HEADER32, *PIMAGE_OS2_HEADER32;
522 typedef struct _IMAGE_VXD_HEADER32 {
523 WORD e32_magic;
524 BYTE e32_border;
525 BYTE e32_worder;
526 DWORD e32_level;
527 WORD e32_cpu;
528 WORD e32_os;
529 DWORD e32_ver;
530 DWORD e32_mflags;
531 DWORD e32_mpages;
532 DWORD e32_startobj;
533 DWORD e32_eip;
534 DWORD e32_stackobj;
535 DWORD e32_esp;
536 DWORD e32_pagesize;
537 DWORD e32_lastpagesize;
538 DWORD e32_fixupsize;
539 DWORD e32_fixupsum;
540 DWORD e32_ldrsize;
541 DWORD e32_ldrsum;
542 DWORD e32_objtab;
543 DWORD e32_objcnt;
544 DWORD e32_objmap;
545 DWORD e32_itermap;
546 DWORD e32_rsrctab;
547 DWORD e32_rsrccnt;
548 DWORD e32_restab;
549 DWORD e32_enttab;
550 DWORD e32_dirtab;
551 DWORD e32_dircnt;
552 DWORD e32_fpagetab;
553 DWORD e32_frectab;
554 DWORD e32_impmod;
555 DWORD e32_impmodcnt;
556 DWORD e32_impproc;
557 DWORD e32_pagesum;
558 DWORD e32_datapage;
559 DWORD e32_preload;
560 DWORD e32_nrestab;
561 DWORD e32_cbnrestab;
562 DWORD e32_nressum;
563 DWORD e32_autodata;
564 DWORD e32_debuginfo;
565 DWORD e32_debuglen;
566 DWORD e32_instpreload;
567 DWORD e32_instdemand;
568 DWORD e32_heapsize;
569 BYTE e32_res3[12];
570 DWORD e32_winresoff;
571 DWORD e32_winreslen;
572 WORD e32_devid;
573 WORD e32_ddkver;
574 } IMAGE_VXD_HEADER32, *PIMAGE_VXD_HEADER32;
576 /***********************************************************************
577 * Callbacks
580 typedef BOOL32 (CALLBACK *PIMAGEHLP_STATUS_ROUTINE32)(
581 IMAGEHLP_STATUS_REASON32 Reason, LPSTR ImageName, LPSTR DllName,
582 ULONG Va, ULONG Parameter
585 typedef BOOL32 (CALLBACK *PSYM_ENUMMODULES_CALLBACK32)(
586 LPSTR ModuleName, ULONG BaseOfDll, PVOID UserContext
589 typedef BOOL32 (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK32)(
590 LPSTR SymbolName, ULONG SymbolAddress, ULONG SymbolSize,
591 PVOID UserContext
594 typedef BOOL32 (CALLBACK *PENUMLOADED_MODULES_CALLBACK32)(
595 LPSTR ModuleName, ULONG ModuleBase, ULONG ModuleSize,
596 PVOID UserContext
599 typedef BOOL32 (CALLBACK *PSYMBOL_REGISTERED_CALLBACK32)(
600 HANDLE32 hProcess, ULONG ActionCode, PVOID CallbackData,
601 PVOID UserContext
604 typedef BOOL32 (CALLBACK *DIGEST_FUNCTION32)(
605 DIGEST_HANDLE32 refdata, PBYTE pData, DWORD dwLength
608 typedef BOOL32 (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE32)(
609 HANDLE32 hProcess, PCVOID lpBaseAddress, PVOID lpBuffer,
610 DWORD nSize, PDWORD lpNumberOfBytesRead
613 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE32)(
614 HANDLE32 hProcess, DWORD AddrBase
617 typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE32)(
618 HANDLE32 hProcess, DWORD ReturnAddress);
620 typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE32)(
621 HANDLE32 hProcess, HANDLE32 hThread, PADDRESS32 lpaddr
624 /***********************************************************************
625 * Functions
628 BOOL32 WINAPI BindImage32(
629 LPSTR ImageName, LPSTR DllPath, LPSTR SymbolPath
631 BOOL32 WINAPI BindImageEx32(
632 DWORD Flags, LPSTR ImageName, LPSTR DllPath, LPSTR SymbolPath,
633 PIMAGEHLP_STATUS_ROUTINE32 StatusRoutine
635 PIMAGE_NT_HEADERS32 WINAPI CheckSumMappedFile32(
636 LPVOID BaseAddress, DWORD FileLength,
637 LPDWORD HeaderSum, LPDWORD CheckSum
639 BOOL32 WINAPI EnumerateLoadedModules32(
640 HANDLE32 hProcess,
641 PENUMLOADED_MODULES_CALLBACK32 EnumLoadedModulesCallback,
642 PVOID UserContext
644 HANDLE32 WINAPI FindDebugInfoFile32(
645 LPSTR FileName, LPSTR SymbolPath, LPSTR DebugFilePath
647 HANDLE32 WINAPI FindExecutableImage32(
648 LPSTR FileName, LPSTR SymbolPath, LPSTR ImageFilePath
650 BOOL32 WINAPI GetImageConfigInformation32(
651 PLOADED_IMAGE32 LoadedImage,
652 PIMAGE_LOAD_CONFIG_DIRECTORY32 ImageConfigInformation
654 DWORD WINAPI GetImageUnusedHeaderBytes32(
655 PLOADED_IMAGE32 LoadedImage,
656 LPDWORD SizeUnusedHeaderBytes
658 DWORD WINAPI GetTimestampForLoadedLibrary32(
659 HMODULE32 Module
661 BOOL32 WINAPI ImageAddCertificate32(
662 HANDLE32 FileHandle, PWIN_CERTIFICATE32 Certificate, PDWORD Index
664 PVOID WINAPI ImageDirectoryEntryToData32(
665 PVOID Base, BOOLEAN MappedAsImage, USHORT DirectoryEntry, PULONG Size
667 BOOL32 WINAPI ImageEnumerateCertificates32(
668 HANDLE32 FileHandle, WORD TypeFilter, PDWORD CertificateCount,
669 PDWORD Indices, DWORD IndexCount
671 BOOL32 WINAPI ImageGetCertificateData32(
672 HANDLE32 FileHandle, DWORD CertificateIndex,
673 PWIN_CERTIFICATE32 Certificate, PDWORD RequiredLength
675 BOOL32 WINAPI ImageGetCertificateHeader32(
676 HANDLE32 FileHandle, DWORD CertificateIndex,
677 PWIN_CERTIFICATE32 Certificateheader
679 BOOL32 WINAPI ImageGetDigestStream32(
680 HANDLE32 FileHandle, DWORD DigestLevel,
681 DIGEST_FUNCTION32 DigestFunction, DIGEST_HANDLE32 DigestHandle
683 PLOADED_IMAGE32 WINAPI ImageLoad32(
684 LPSTR DllName, LPSTR DllPath
686 PIMAGE_NT_HEADERS32 WINAPI ImageNtHeader32(
687 PVOID Base
689 BOOL32 WINAPI ImageRemoveCertificate32(
690 HANDLE32 FileHandle, DWORD Index
692 PIMAGE_SECTION_HEADER32 WINAPI ImageRvaToSection32(
693 PIMAGE_NT_HEADERS32 NtHeaders, PVOID Base, ULONG Rva
695 PVOID WINAPI ImageRvaToVa32(
696 PIMAGE_NT_HEADERS32 NtHeaders, PVOID Base, ULONG Rva,
697 PIMAGE_SECTION_HEADER32 *LastRvaSection
699 BOOL32 WINAPI ImageUnload32(
700 PLOADED_IMAGE32 LoadedImage
702 PAPI_VERSION32 WINAPI ImagehlpApiVersion32(
704 PAPI_VERSION32 WINAPI ImagehlpApiVersionEx32(
705 PAPI_VERSION32 AppVersion
707 BOOL32 WINAPI MakeSureDirectoryPathExists32(
708 LPCSTR DirPath
710 BOOL32 WINAPI MapAndLoad32(
711 LPSTR ImageName, LPSTR DllPath, PLOADED_IMAGE32 LoadedImage,
712 BOOL32 DotDll, BOOL32 ReadOnly
714 PIMAGE_DEBUG_INFORMATION32 WINAPI MapDebugInformation32(
715 HANDLE32 FileHandle, LPSTR FileName,
716 LPSTR SymbolPath, DWORD ImageBase
718 DWORD WINAPI MapFileAndCheckSum32A(
719 LPSTR Filename, LPDWORD HeaderSum, LPDWORD CheckSum
721 DWORD WINAPI MapFileAndCheckSum32W(
722 LPWSTR Filename, LPDWORD HeaderSum, LPDWORD CheckSum
724 BOOL32 WINAPI ReBaseImage32(
725 LPSTR CurrentImageName, LPSTR SymbolPath, BOOL32 fReBase,
726 BOOL32 fRebaseSysfileOk, BOOL32 fGoingDown, ULONG CheckImageSize,
727 ULONG *OldImageSize, ULONG *OldImageBase, ULONG *NewImageSize,
728 ULONG *NewImageBase, ULONG TimeStamp
730 BOOL32 WINAPI RemovePrivateCvSymbolic32(
731 PCHAR DebugData, PCHAR *NewDebugData, ULONG *NewDebugSize
733 VOID WINAPI RemoveRelocations32(
734 PCHAR ImageName
736 BOOL32 WINAPI SearchTreeForFile32(
737 LPSTR RootPath, LPSTR InputPathName, LPSTR OutputPathBuffer
739 BOOL32 WINAPI SetImageConfigInformation32(
740 PLOADED_IMAGE32 LoadedImage,
741 PIMAGE_LOAD_CONFIG_DIRECTORY32 ImageConfigInformation
743 BOOL32 WINAPI SplitSymbols32(
744 LPSTR ImageName, LPSTR SymbolsPath,
745 LPSTR SymbolFilePath, DWORD Flags
747 BOOL32 WINAPI StackWalk32(
748 DWORD MachineType, HANDLE32 hProcess, HANDLE32 hThread,
749 PSTACKFRAME32 StackFrame, PVOID ContextRecord,
750 PREAD_PROCESS_MEMORY_ROUTINE32 ReadMemoryRoutine,
751 PFUNCTION_TABLE_ACCESS_ROUTINE32 FunctionTableAccessRoutine,
752 PGET_MODULE_BASE_ROUTINE32 GetModuleBaseRoutine,
753 PTRANSLATE_ADDRESS_ROUTINE32 TranslateAddress
755 BOOL32 WINAPI SymCleanup32(
756 HANDLE32 hProcess
758 BOOL32 WINAPI SymEnumerateModules32(
759 HANDLE32 hProcess, PSYM_ENUMMODULES_CALLBACK32 EnumModulesCallback,
760 PVOID UserContext
762 BOOL32 WINAPI SymEnumerateSymbols32(
763 HANDLE32 hProcess, DWORD BaseOfDll,
764 PSYM_ENUMSYMBOLS_CALLBACK32 EnumSymbolsCallback, PVOID UserContext
766 PVOID WINAPI SymFunctionTableAccess32(
767 HANDLE32 hProcess, DWORD AddrBase
769 DWORD WINAPI SymGetModuleBase32(
770 HANDLE32 hProcess, DWORD dwAddr
772 BOOL32 WINAPI SymGetModuleInfo32(
773 HANDLE32 hProcess, DWORD dwAddr,
774 PIMAGEHLP_MODULE32 ModuleInfo
776 DWORD WINAPI SymGetOptions32(
778 BOOL32 WINAPI SymGetSearchPath32(
779 HANDLE32 hProcess, LPSTR szSearchPath, DWORD SearchPathLength
781 BOOL32 WINAPI SymGetSymFromAddr32(
782 HANDLE32 hProcess, DWORD dwAddr,
783 PDWORD pdwDisplacement, PIMAGEHLP_SYMBOL32 Symbol
785 BOOL32 WINAPI SymGetSymFromName32(
786 HANDLE32 hProcess, LPSTR Name, PIMAGEHLP_SYMBOL32 Symbol
788 BOOL32 WINAPI SymGetSymNext32(
789 HANDLE32 hProcess, PIMAGEHLP_SYMBOL32 Symbol
791 BOOL32 WINAPI SymGetSymPrev32(
792 HANDLE32 hProcess, PIMAGEHLP_SYMBOL32 Symbol
794 BOOL32 WINAPI SymInitialize32(
795 HANDLE32 hProcess, LPSTR UserSearchPath, BOOL32 fInvadeProcess
797 BOOL32 WINAPI SymLoadModule32(
798 HANDLE32 hProcess, HANDLE32 hFile, LPSTR ImageName, LPSTR ModuleName,
799 DWORD BaseOfDll, DWORD SizeOfDll
801 BOOL32 WINAPI SymRegisterCallback32(
802 HANDLE32 hProcess, PSYMBOL_REGISTERED_CALLBACK32 CallbackFunction,
803 PVOID UserContext
805 DWORD WINAPI SymSetOptions32(
806 DWORD SymOptions
808 BOOL32 WINAPI SymSetSearchPath32(
809 HANDLE32 hProcess, LPSTR szSearchPath
811 BOOL32 WINAPI SymUnDName32(
812 PIMAGEHLP_SYMBOL32 sym, LPSTR UnDecName, DWORD UnDecNameLength
814 BOOL32 WINAPI SymUnloadModule32(
815 HANDLE32 hProcess, DWORD BaseOfDll
817 BOOL32 WINAPI TouchFileTimes32(
818 HANDLE32 FileHandle, LPSYSTEMTIME lpSystemTime
820 DWORD WINAPI UnDecorateSymbolName32(
821 LPCSTR DecoratedName, LPSTR UnDecoratedName,
822 DWORD UndecoratedLength, DWORD Flags
824 BOOL32 WINAPI UnMapAndLoad32(
825 PLOADED_IMAGE32 LoadedImage
827 BOOL32 WINAPI UnmapDebugInformation32(
828 PIMAGE_DEBUG_INFORMATION32 DebugInfo
830 BOOL32 WINAPI UpdateDebugInfoFile32(
831 LPSTR ImageFileName, LPSTR SymbolPath,
832 LPSTR DebugFilePath, PIMAGE_NT_HEADERS32 NtHeaders
834 BOOL32 WINAPI UpdateDebugInfoFileEx32(
835 LPSTR ImageFileName, LPSTR SymbolPath, LPSTR DebugFilePath,
836 PIMAGE_NT_HEADERS32 NtHeaders, DWORD OldChecksum
839 /***********************************************************************
840 * Wine specific
843 extern HANDLE32 IMAGEHLP_hHeap32;
845 #endif /* __WINE_IMAGEHLP_H */