GetShortPathName: always erase characters at the end of the new
[wine/multimedia.git] / include / imagehlp.h
blob4ef83fa8c262407a40cf19c844d563bbc6026d4a
1 /*
2 * imagehlp.h - Declarations for IMAGEHLP
3 */
5 #ifndef __WINE_IMAGEHLP_H
6 #define __WINE_IMAGEHLP_H
8 #include "windef.h"
9 #include "winbase.h"
11 #ifdef __cplusplus
12 extern "C" {
13 #endif /* defined(__cplusplus) */
15 /***********************************************************************
16 * Types
19 typedef PVOID DIGEST_HANDLE;
21 /***********************************************************************
22 * Enums/Defines
25 typedef enum _IMAGEHLP_STATUS_REASON {
26 BindOutOfMemory,
27 BindRvaToVaFailed,
28 BindNoRoomInImage,
29 BindImportModuleFailed,
30 BindImportProcedureFailed,
31 BindImportModule,
32 BindImportProcedure,
33 BindForwarder,
34 BindForwarderNOT,
35 BindImageModified,
36 BindExpandFileHeaders,
37 BindImageComplete,
38 BindMismatchedSymbols,
39 BindSymbolsNotUpdated
40 } IMAGEHLP_STATUS_REASON;
42 #define BIND_NO_BOUND_IMPORTS 0x00000001
43 #define BIND_NO_UPDATE 0x00000002
44 #define BIND_ALL_IMAGES 0x00000004
45 #define BIND_CACHE_IMPORT_DLLS 0x00000008
47 #define CERT_PE_IMAGE_DIGEST_DEBUG_INFO 0x01
48 #define CERT_PE_IMAGE_DIGEST_RESOURCES 0x02
49 #define CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO 0x04
50 #define CERT_PE_IMAGE_DIGEST_NON_PE_INFO 0x08
52 #define CERT_SECTION_TYPE_ANY 0xFF
54 #define WIN_CERT_REVISION_1_0 0x0100
55 #define WIN_CERT_REVISION_2_0 0x0200
57 #define WIN_CERT_TYPE_X509 0x0001 /* X.509 Certificate */
58 #define WIN_CERT_TYPE_PKCS_SIGNED_DATA 0x0002 /* PKCS SignedData */
59 #define WIN_CERT_TYPE_RESERVED_1 0x0003 /* Reserved */
61 #define SPLITSYM_REMOVE_PRIVATE 0x00000001
62 #define SPLITSYM_EXTRACT_ALL 0x00000002
63 #define SPLITSYM_SYMBOLPATH_IS_SRC 0x00000004
65 #define IMAGE_DEBUG_TYPE_UNKNOWN 0
66 #define IMAGE_DEBUG_TYPE_COFF 1
67 #define IMAGE_DEBUG_TYPE_CODEVIEW 2
68 #define IMAGE_DEBUG_TYPE_FPO 3
69 #define IMAGE_DEBUG_TYPE_MISC 4
70 #define IMAGE_DEBUG_TYPE_EXCEPTION 5
71 #define IMAGE_DEBUG_TYPE_FIXUP 6
72 #define IMAGE_DEBUG_TYPE_OMAP_TO_SRC 7
73 #define IMAGE_DEBUG_TYPE_OMAP_FROM_SRC 8
74 #define IMAGE_DEBUG_TYPE_BORLAND 9
75 #define IMAGE_DEBUG_TYPE_RESERVED10 10
77 #define FRAME_FPO 0
78 #define FRAME_TRAP 1
79 #define FRAME_TSS 2
80 #define FRAME_NONFPO 3
82 #define CHECKSUM_SUCCESS 0
83 #define CHECKSUM_OPEN_FAILURE 1
84 #define CHECKSUM_MAP_FAILURE 2
85 #define CHECKSUM_MAPVIEW_FAILURE 3
86 #define CHECKSUM_UNICODE_FAILURE 4
88 typedef enum _ADRESS_MODE {
89 AddrMode1616,
90 AddrMode1632,
91 AddrModeReal,
92 AddrModeFlat
93 } ADDRESS_MODE;
95 #define SYMOPT_CASE_INSENSITIVE 0x00000001
96 #define SYMOPT_UNDNAME 0x00000002
97 #define SYMOPT_DEFERRED_LOADS 0x00000004
98 #define SYMOPT_NO_CPP 0x00000008
99 #define SYMOPT_LOAD_LINES 0x00000010
100 #define SYMOPT_OMAP_FIND_NEAREST 0x00000020
102 #define SYMF_OMAP_GENERATED 0x00000001
103 #define SYMF_OMAP_MODIFIED 0x00000002
105 typedef enum _SYM_TYPE {
106 SymNone,
107 SymCoff,
108 SymCv,
109 SymPdb,
110 SymExport,
111 SymDeferred,
112 SymSym /* .sym file */
113 } SYM_TYPE32;
115 #define UNDNAME_COMPLETE 0x0000
116 #define UNDNAME_NO_LEADING_UNDERSCORES 0x0001
117 #define UNDNAME_NO_MS_KEYWORDS 0x0002
118 #define UNDNAME_NO_FUNCTION_RETURNS 0x0004
119 #define UNDNAME_NO_ALLOCATION_MODEL 0x0008
120 #define UNDNAME_NO_ALLOCATION_LANGUAGE 0x0010
121 #define UNDNAME_NO_MS_THISTYPE 0x0020
122 #define UNDNAME_NO_CV_THISTYPE 0x0040
123 #define UNDNAME_NO_THISTYPE 0x0060
124 #define UNDNAME_NO_ACCESS_SPECIFIERS 0x0080
125 #define UNDNAME_NO_THROW_SIGNATURES 0x0100
126 #define UNDNAME_NO_MEMBER_TYPE 0x0200
127 #define UNDNAME_NO_RETURN_UDT_MODEL 0x0400
128 #define UNDNAME_32_BIT_DECODE 0x0800
129 #define UNDNAME_NAME_ONLY 0x1000
130 #define UNDNAME_NO_ARGUMENTS 0x2000
131 #define UNDNAME_NO_SPECIAL_SYMS 0x4000
133 #define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001
134 #define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002
135 #define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003
136 #define CBA_SYMBOLS_UNLOADED 0x00000004
137 #define CBA_DUPLICATE_SYMBOL 0x00000005
139 #define IMAGE_DOS_SIGNATURE 0x5A4D /* MZ */
140 #define IMAGE_OS2_SIGNATURE 0x454E /* NE */
141 #define IMAGE_OS2_SIGNATURE_LE 0x454C /* LE */
142 #define IMAGE_VXD_SIGNATURE 0x454C /* LE */
143 #define IMAGE_NT_SIGNATURE 0x00004550 /* PE00 */
145 /***********************************************************************
146 * Structures
149 typedef struct _IMAGE_DATA_DIRECTORY {
150 DWORD VirtualAddress;
151 DWORD Size;
152 } IMAGE_DATA_DIRECTORY, *PIMAGE_DATA_DIRECTORY;
154 #define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
156 typedef struct _IMAGE_OPTIONAL_HEADER {
158 /* Standard fields */
160 WORD Magic;
161 BYTE MajorLinkerVersion;
162 BYTE MinorLinkerVersion;
163 DWORD SizeOfCode;
164 DWORD SizeOfInitializedData;
165 DWORD SizeOfUninitializedData;
166 DWORD AddressOfEntryPoint;
167 DWORD BaseOfCode;
168 DWORD BaseOfData;
170 /* NT additional fields */
172 DWORD ImageBase;
173 DWORD SectionAlignment;
174 DWORD FileAlignment;
175 WORD MajorOperatingSystemVersion;
176 WORD MinorOperatingSystemVersion;
177 WORD MajorImageVersion;
178 WORD MinorImageVersion;
179 WORD MajorSubsystemVersion;
180 WORD MinorSubsystemVersion;
181 DWORD Win32VersionValue;
182 DWORD SizeOfImage;
183 DWORD SizeOfHeaders;
184 DWORD CheckSum;
185 WORD Subsystem;
186 WORD DllCharacteristics;
187 DWORD SizeOfStackReserve;
188 DWORD SizeOfStackCommit;
189 DWORD SizeOfHeapReserve;
190 DWORD SizeOfHeapCommit;
191 DWORD LoaderFlags;
192 DWORD NumberOfRvaAndSizes;
193 IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES];
194 } IMAGE_OPTIONAL_HEADER, *PIMAGE_OPTIONAL_HEADER;
196 typedef struct _IMAGE_FILE_HEADER {
197 WORD Machine;
198 WORD NumberOfSections;
199 DWORD TimeDateStamp;
200 DWORD PointerToSymbolTable;
201 DWORD NumberOfSymbols;
202 WORD SizeOfOptionalHeader;
203 WORD Characteristics;
204 } IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;
206 typedef struct _IMAGE_NT_HEADERS {
207 DWORD Signature;
208 IMAGE_FILE_HEADER FileHeader;
209 IMAGE_OPTIONAL_HEADER OptionalHeader;
210 } IMAGE_NT_HEADERS, *PIMAGE_NT_HEADERS;
212 #define IMAGE_SIZEOF_SHORT_NAME 8
214 typedef struct _IMAGE_SECTION_HEADER {
215 BYTE Name[IMAGE_SIZEOF_SHORT_NAME];
216 union {
217 DWORD PhysicalAddress;
218 DWORD VirtualSize;
219 } Misc;
220 DWORD VirtualAddress;
221 DWORD SizeOfRawData;
222 DWORD PointerToRawData;
223 DWORD PointerToRelocations;
224 DWORD PointerToLinenumbers;
225 WORD NumberOfRelocations;
226 WORD NumberOfLinenumbers;
227 DWORD Characteristics;
228 } IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER;
230 typedef struct _LOADED_IMAGE {
231 LPSTR ModuleName;
232 HANDLE hFile;
233 PUCHAR MappedAddress;
234 PIMAGE_NT_HEADERS FileHeader;
235 PIMAGE_SECTION_HEADER LastRvaSection;
236 ULONG NumberOfSections;
237 PIMAGE_SECTION_HEADER Sections;
238 ULONG Characteristics;
239 BOOLEAN fSystemImage;
240 BOOLEAN fDOSImage;
241 LIST_ENTRY Links;
242 ULONG SizeOfImage;
243 } LOADED_IMAGE, *PLOADED_IMAGE;
245 typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY {
246 DWORD Characteristics;
247 DWORD TimeDateStamp;
248 WORD MajorVersion;
249 WORD MinorVersion;
250 DWORD GlobalFlagsClear;
251 DWORD GlobalFlagsSet;
252 DWORD CriticalSectionDefaultTimeout;
253 DWORD DeCommitFreeBlockThreshold;
254 DWORD DeCommitTotalFreeThreshold;
255 PVOID LockPrefixTable;
256 DWORD MaximumAllocationSize;
257 DWORD VirtualMemoryThreshold;
258 DWORD ProcessHeapFlags;
259 DWORD ProcessAffinityMask;
260 WORD CSDVersion;
261 WORD Reserved1;
262 PVOID EditList;
263 DWORD Reserved[1];
264 } IMAGE_LOAD_CONFIG_DIRECTORY, *PIMAGE_LOAD_CONFIG_DIRECTORY;
266 typedef struct _WIN_CERTIFICATE {
267 DWORD dwLength;
268 WORD wRevision; /* WIN_CERT_REVISON_xxx */
269 WORD wCertificateType; /* WIN_CERT_TYPE_xxx */
270 BYTE bCertificate[ANYSIZE_ARRAY];
271 } WIN_CERTIFICATE, *PWIN_CERTIFICATE;
273 typedef struct _API_VERSION {
274 USHORT MajorVersion;
275 USHORT MinorVersion;
276 USHORT Revision;
277 USHORT Reserved;
278 } API_VERSION, *PAPI_VERSION;
280 typedef struct _IMAGE_FUNCTION_ENTRY {
281 DWORD StartingAddress;
282 DWORD EndingAddress;
283 DWORD EndOfPrologue;
284 } IMAGE_FUNCTION_ENTRY, *PIMAGE_FUNCTION_ENTRY;
286 typedef struct _IMAGE_DEBUG_DIRECTORY {
287 DWORD Characteristics;
288 DWORD TimeDateStamp;
289 WORD MajorVersion;
290 WORD MinorVersion;
291 DWORD Type;
292 DWORD SizeOfData;
293 DWORD AddressOfRawData;
294 DWORD PointerToRawData;
295 } IMAGE_DEBUG_DIRECTORY, *PIMAGE_DEBUG_DIRECTORY;
297 typedef struct _IMAGE_COFF_SYMBOLS_HEADER {
298 DWORD NumberOfSymbols;
299 DWORD LvaToFirstSymbol;
300 DWORD NumberOfLinenumbers;
301 DWORD LvaToFirstLinenumber;
302 DWORD RvaToFirstByteOfCode;
303 DWORD RvaToLastByteOfCode;
304 DWORD RvaToFirstByteOfData;
305 DWORD RvaToLastByteOfData;
306 } IMAGE_COFF_SYMBOLS_HEADER, *PIMAGE_COFF_SYMBOLS_HEADER;
308 typedef struct _FPO_DATA {
309 DWORD ulOffStart;
310 DWORD cbProcSize;
311 DWORD cdwLocals;
312 WORD cdwParams;
313 unsigned cbProlog : 8;
314 unsigned cbRegs : 3;
315 unsigned fHasSEH : 1;
316 unsigned fUseBP : 1;
317 unsigned reserved : 1;
318 unsigned cbFrame : 2;
319 } FPO_DATA, *PFPO_DATA;
321 typedef struct _IMAGE_DEBUG_INFORMATION {
322 LIST_ENTRY List;
323 DWORD Size;
324 PVOID MappedBase;
325 USHORT Machine;
326 USHORT Characteristics;
327 DWORD CheckSum;
328 DWORD ImageBase;
329 DWORD SizeOfImage;
331 DWORD NumberOfSections;
332 PIMAGE_SECTION_HEADER Sections;
334 DWORD ExportedNamesSize;
335 LPSTR ExportedNames;
337 DWORD NumberOfFunctionTableEntries;
338 PIMAGE_FUNCTION_ENTRY FunctionTableEntries;
339 DWORD LowestFunctionStartingAddress;
340 DWORD HighestFunctionEndingAddress;
342 DWORD NumberOfFpoTableEntries;
343 PFPO_DATA FpoTableEntries;
345 DWORD SizeOfCoffSymbols;
346 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols;
348 DWORD SizeOfCodeViewSymbols;
349 PVOID CodeViewSymbols;
351 LPSTR ImageFilePath;
352 LPSTR ImageFileName;
353 LPSTR DebugFilePath;
355 DWORD TimeDateStamp;
357 BOOL RomImage;
358 PIMAGE_DEBUG_DIRECTORY DebugDirectory;
359 DWORD NumberOfDebugDirectories;
361 DWORD Reserved[3];
362 } IMAGE_DEBUG_INFORMATION, *PIMAGE_DEBUG_INFORMATION;
364 typedef struct _ADDRESS {
365 DWORD Offset;
366 WORD Segment;
367 ADDRESS_MODE Mode;
368 } ADDRESS, *PADDRESS;
370 typedef struct _KDHELP {
371 DWORD Thread;
372 DWORD ThCallbackStack;
373 DWORD NextCallback;
374 DWORD FramePointer;
375 DWORD KiCallUserMode;
376 DWORD KeUserCallbackDispatcher;
377 DWORD SystemRangeStart;
378 } KDHELP, *PKDHELP;
380 typedef struct _STACKFRAME {
381 ADDRESS AddrPC;
382 ADDRESS AddrReturn;
383 ADDRESS AddrFrame;
384 ADDRESS AddrStack;
385 PVOID FuncTableEntry;
386 DWORD Params[4];
387 BOOL Far;
388 BOOL Virtual;
389 DWORD Reserved[3];
390 KDHELP KdHelp;
391 } STACKFRAME, *PSTACKFRAME;
393 typedef struct _IMAGEHLP_SYMBOL {
394 DWORD SizeOfStruct;
395 DWORD Address;
396 DWORD Size;
397 DWORD Flags;
398 DWORD MaxNameLength;
399 CHAR Name[ANYSIZE_ARRAY];
400 } IMAGEHLP_SYMBOL, *PIMAGEHLP_SYMBOL;
402 typedef struct _IMAGEHLP_MODULE {
403 DWORD SizeOfStruct;
404 DWORD BaseOfImage;
405 DWORD ImageSize;
406 DWORD TimeDateStamp;
407 DWORD CheckSum;
408 DWORD NumSyms;
409 SYM_TYPE32 SymType;
410 CHAR ModuleName[32];
411 CHAR ImageName[256];
412 CHAR LoadedImageName[256];
413 } IMAGEHLP_MODULE, *PIMAGEHLP_MODULE;
415 typedef struct _IMAGEHLP_LINE {
416 DWORD SizeOfStruct;
417 DWORD Key;
418 DWORD LineNumber;
419 PCHAR FileName;
420 DWORD Address;
421 } IMAGEHLP_LINE, *PIMAGEHLP_LINE;
423 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD {
424 DWORD SizeOfStruct;
425 DWORD BaseOfImage;
426 DWORD CheckSum;
427 DWORD TimeDateStamp;
428 CHAR FileName[MAX_PATH];
429 BOOLEAN Reparse;
430 } IMAGEHLP_DEFERRED_SYMBOL_LOAD, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
432 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL {
433 DWORD SizeOfStruct;
434 DWORD NumberOfDups;
435 PIMAGEHLP_SYMBOL Symbol;
436 ULONG SelectedSymbol;
437 } IMAGEHLP_DUPLICATE_SYMBOL, *PIMAGEHLP_DUPLICATE_SYMBOL;
439 typedef struct _IMAGE_DOS_HEADER {
440 WORD e_magic;
441 WORD e_cblp;
442 WORD e_cp;
443 WORD e_crlc;
444 WORD e_cparhdr;
445 WORD e_minalloc;
446 WORD e_maxalloc;
447 WORD e_ss;
448 WORD e_sp;
449 WORD e_csum;
450 WORD e_ip;
451 WORD e_cs;
452 WORD e_lfarlc;
453 WORD e_ovno;
454 WORD e_res[4];
455 WORD e_oemid;
456 WORD e_oeminfo;
457 WORD e_res2[10];
458 LONG e_lfanew;
459 } IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;
461 typedef struct _IMAGE_OS2_HEADER {
462 WORD ne_magic;
463 CHAR ne_ver;
464 CHAR ne_rev;
465 WORD ne_enttab;
466 WORD ne_cbenttab;
467 LONG ne_crc;
468 WORD ne_flags;
469 WORD ne_autodata;
470 WORD ne_heap;
471 WORD ne_stack;
472 LONG ne_csip;
473 LONG ne_sssp;
474 WORD ne_cseg;
475 WORD ne_cmod;
476 WORD ne_cbnrestab;
477 WORD ne_segtab;
478 WORD ne_rsrctab;
479 WORD ne_restab;
480 WORD ne_modtab;
481 WORD ne_imptab;
482 LONG ne_nrestab;
483 WORD ne_cmovent;
484 WORD ne_align;
485 WORD ne_cres;
486 BYTE ne_exetyp;
487 BYTE ne_flagsothers;
488 WORD ne_pretthunks;
489 WORD ne_psegrefbytes;
490 WORD ne_swaparea;
491 WORD ne_expver;
492 } IMAGE_OS2_HEADER, *PIMAGE_OS2_HEADER;
494 typedef struct _IMAGE_VXD_HEADER {
495 WORD e32_magic;
496 BYTE e32_border;
497 BYTE e32_worder;
498 DWORD e32_level;
499 WORD e32_cpu;
500 WORD e32_os;
501 DWORD e32_ver;
502 DWORD e32_mflags;
503 DWORD e32_mpages;
504 DWORD e32_startobj;
505 DWORD e32_eip;
506 DWORD e32_stackobj;
507 DWORD e32_esp;
508 DWORD e32_pagesize;
509 DWORD e32_lastpagesize;
510 DWORD e32_fixupsize;
511 DWORD e32_fixupsum;
512 DWORD e32_ldrsize;
513 DWORD e32_ldrsum;
514 DWORD e32_objtab;
515 DWORD e32_objcnt;
516 DWORD e32_objmap;
517 DWORD e32_itermap;
518 DWORD e32_rsrctab;
519 DWORD e32_rsrccnt;
520 DWORD e32_restab;
521 DWORD e32_enttab;
522 DWORD e32_dirtab;
523 DWORD e32_dircnt;
524 DWORD e32_fpagetab;
525 DWORD e32_frectab;
526 DWORD e32_impmod;
527 DWORD e32_impmodcnt;
528 DWORD e32_impproc;
529 DWORD e32_pagesum;
530 DWORD e32_datapage;
531 DWORD e32_preload;
532 DWORD e32_nrestab;
533 DWORD e32_cbnrestab;
534 DWORD e32_nressum;
535 DWORD e32_autodata;
536 DWORD e32_debuginfo;
537 DWORD e32_debuglen;
538 DWORD e32_instpreload;
539 DWORD e32_instdemand;
540 DWORD e32_heapsize;
541 BYTE e32_res3[12];
542 DWORD e32_winresoff;
543 DWORD e32_winreslen;
544 WORD e32_devid;
545 WORD e32_ddkver;
546 } IMAGE_VXD_HEADER, *PIMAGE_VXD_HEADER;
548 /***********************************************************************
549 * Callbacks
552 typedef BOOL (CALLBACK *PIMAGEHLP_STATUS_ROUTINE)(
553 IMAGEHLP_STATUS_REASON Reason, LPSTR ImageName, LPSTR DllName,
554 ULONG Va, ULONG Parameter
557 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(
558 LPSTR ModuleName, ULONG BaseOfDll, PVOID UserContext
561 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(
562 LPSTR SymbolName, ULONG SymbolAddress, ULONG SymbolSize,
563 PVOID UserContext
566 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(
567 LPSTR ModuleName, ULONG ModuleBase, ULONG ModuleSize,
568 PVOID UserContext
571 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(
572 HANDLE hProcess, ULONG ActionCode, PVOID CallbackData,
573 PVOID UserContext
576 typedef BOOL (CALLBACK *DIGEST_FUNCTION)(
577 DIGEST_HANDLE refdata, PBYTE pData, DWORD dwLength
580 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)(
581 HANDLE hProcess, PCVOID lpBaseAddress, PVOID lpBuffer,
582 DWORD nSize, PDWORD lpNumberOfBytesRead
585 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(
586 HANDLE hProcess, DWORD AddrBase
589 typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE)(
590 HANDLE hProcess, DWORD ReturnAddress);
592 typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(
593 HANDLE hProcess, HANDLE hThread, PADDRESS lpaddr
596 /***********************************************************************
597 * Functions
600 BOOL WINAPI BindImage(
601 LPSTR ImageName, LPSTR DllPath, LPSTR SymbolPath
603 BOOL WINAPI BindImageEx(
604 DWORD Flags, LPSTR ImageName, LPSTR DllPath, LPSTR SymbolPath,
605 PIMAGEHLP_STATUS_ROUTINE StatusRoutine
607 PIMAGE_NT_HEADERS WINAPI CheckSumMappedFile(
608 LPVOID BaseAddress, DWORD FileLength,
609 LPDWORD HeaderSum, LPDWORD CheckSum
611 BOOL WINAPI EnumerateLoadedModules(
612 HANDLE hProcess,
613 PENUMLOADED_MODULES_CALLBACK EnumLoadedModulesCallback,
614 PVOID UserContext
616 HANDLE WINAPI FindDebugInfoFile(
617 LPSTR FileName, LPSTR SymbolPath, LPSTR DebugFilePath
619 HANDLE WINAPI FindExecutableImage(
620 LPSTR FileName, LPSTR SymbolPath, LPSTR ImageFilePath
622 BOOL WINAPI GetImageConfigInformation(
623 PLOADED_IMAGE LoadedImage,
624 PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation
626 DWORD WINAPI GetImageUnusedHeaderBytes(
627 PLOADED_IMAGE LoadedImage,
628 LPDWORD SizeUnusedHeaderBytes
630 DWORD WINAPI GetTimestampForLoadedLibrary(
631 HMODULE Module
633 BOOL WINAPI ImageAddCertificate(
634 HANDLE FileHandle, PWIN_CERTIFICATE Certificate, PDWORD Index
636 PVOID WINAPI ImageDirectoryEntryToData(
637 PVOID Base, BOOLEAN MappedAsImage, USHORT DirectoryEntry, PULONG Size
639 BOOL WINAPI ImageEnumerateCertificates(
640 HANDLE FileHandle, WORD TypeFilter, PDWORD CertificateCount,
641 PDWORD Indices, DWORD IndexCount
643 BOOL WINAPI ImageGetCertificateData(
644 HANDLE FileHandle, DWORD CertificateIndex,
645 PWIN_CERTIFICATE Certificate, PDWORD RequiredLength
647 BOOL WINAPI ImageGetCertificateHeader(
648 HANDLE FileHandle, DWORD CertificateIndex,
649 PWIN_CERTIFICATE Certificateheader
651 BOOL WINAPI ImageGetDigestStream(
652 HANDLE FileHandle, DWORD DigestLevel,
653 DIGEST_FUNCTION DigestFunction, DIGEST_HANDLE DigestHandle
655 PLOADED_IMAGE WINAPI ImageLoad(
656 LPSTR DllName, LPSTR DllPath
658 PIMAGE_NT_HEADERS WINAPI ImageNtHeader(
659 PVOID Base
661 BOOL WINAPI ImageRemoveCertificate(
662 HANDLE FileHandle, DWORD Index
664 PIMAGE_SECTION_HEADER WINAPI ImageRvaToSection(
665 PIMAGE_NT_HEADERS NtHeaders, PVOID Base, ULONG Rva
667 PVOID WINAPI ImageRvaToVa(
668 PIMAGE_NT_HEADERS NtHeaders, PVOID Base, ULONG Rva,
669 PIMAGE_SECTION_HEADER *LastRvaSection
671 BOOL WINAPI ImageUnload(
672 PLOADED_IMAGE LoadedImage
674 PAPI_VERSION WINAPI ImagehlpApiVersion(
675 void
677 PAPI_VERSION WINAPI ImagehlpApiVersionEx(
678 PAPI_VERSION AppVersion
680 BOOL WINAPI MakeSureDirectoryPathExists(
681 LPCSTR DirPath
683 BOOL WINAPI MapAndLoad(
684 LPSTR ImageName, LPSTR DllPath, PLOADED_IMAGE LoadedImage,
685 BOOL DotDll, BOOL ReadOnly
687 PIMAGE_DEBUG_INFORMATION WINAPI MapDebugInformation(
688 HANDLE FileHandle, LPSTR FileName,
689 LPSTR SymbolPath, DWORD ImageBase
691 DWORD WINAPI MapFileAndCheckSumA(
692 LPSTR Filename, LPDWORD HeaderSum, LPDWORD CheckSum
694 DWORD WINAPI MapFileAndCheckSumW(
695 LPWSTR Filename, LPDWORD HeaderSum, LPDWORD CheckSum
697 BOOL WINAPI ReBaseImage(
698 LPSTR CurrentImageName, LPSTR SymbolPath, BOOL fReBase,
699 BOOL fRebaseSysfileOk, BOOL fGoingDown, ULONG CheckImageSize,
700 ULONG *OldImageSize, ULONG *OldImageBase, ULONG *NewImageSize,
701 ULONG *NewImageBase, ULONG TimeStamp
703 BOOL WINAPI RemovePrivateCvSymbolic(
704 PCHAR DebugData, PCHAR *NewDebugData, ULONG *NewDebugSize
706 VOID WINAPI RemoveRelocations(
707 PCHAR ImageName
709 BOOL WINAPI SearchTreeForFile(
710 LPSTR RootPath, LPSTR InputPathName, LPSTR OutputPathBuffer
712 BOOL WINAPI SetImageConfigInformation(
713 PLOADED_IMAGE LoadedImage,
714 PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation
716 BOOL WINAPI SplitSymbols(
717 LPSTR ImageName, LPSTR SymbolsPath,
718 LPSTR SymbolFilePath, DWORD Flags
720 BOOL WINAPI StackWalk(
721 DWORD MachineType, HANDLE hProcess, HANDLE hThread,
722 PSTACKFRAME StackFrame, PVOID ContextRecord,
723 PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine,
724 PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,
725 PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine,
726 PTRANSLATE_ADDRESS_ROUTINE TranslateAddress
728 BOOL WINAPI SymCleanup(
729 HANDLE hProcess
731 BOOL WINAPI SymEnumerateModules(
732 HANDLE hProcess, PSYM_ENUMMODULES_CALLBACK EnumModulesCallback,
733 PVOID UserContext
735 BOOL WINAPI SymEnumerateSymbols(
736 HANDLE hProcess, DWORD BaseOfDll,
737 PSYM_ENUMSYMBOLS_CALLBACK EnumSymbolsCallback, PVOID UserContext
739 PVOID WINAPI SymFunctionTableAccess(
740 HANDLE hProcess, DWORD AddrBase
742 DWORD WINAPI SymGetModuleBase(
743 HANDLE hProcess, DWORD dwAddr
745 BOOL WINAPI SymGetModuleInfo(
746 HANDLE hProcess, DWORD dwAddr,
747 PIMAGEHLP_MODULE ModuleInfo
749 DWORD WINAPI SymGetOptions(
750 void
752 BOOL WINAPI SymGetSearchPath(
753 HANDLE hProcess, LPSTR szSearchPath, DWORD SearchPathLength
755 BOOL WINAPI SymGetSymFromAddr(
756 HANDLE hProcess, DWORD dwAddr,
757 PDWORD pdwDisplacement, PIMAGEHLP_SYMBOL Symbol
759 BOOL WINAPI SymGetSymFromName(
760 HANDLE hProcess, LPSTR Name, PIMAGEHLP_SYMBOL Symbol
762 BOOL WINAPI SymGetSymNext(
763 HANDLE hProcess, PIMAGEHLP_SYMBOL Symbol
765 BOOL WINAPI SymGetSymPrev(
766 HANDLE hProcess, PIMAGEHLP_SYMBOL Symbol
768 BOOL WINAPI SymInitialize(
769 HANDLE hProcess, LPSTR UserSearchPath, BOOL fInvadeProcess
771 BOOL WINAPI SymLoadModule(
772 HANDLE hProcess, HANDLE hFile, LPSTR ImageName, LPSTR ModuleName,
773 DWORD BaseOfDll, DWORD SizeOfDll
775 BOOL WINAPI SymRegisterCallback(
776 HANDLE hProcess, PSYMBOL_REGISTERED_CALLBACK CallbackFunction,
777 PVOID UserContext
779 DWORD WINAPI SymSetOptions(
780 DWORD SymOptions
782 BOOL WINAPI SymSetSearchPath(
783 HANDLE hProcess, LPSTR szSearchPath
785 BOOL WINAPI SymUnDName(
786 PIMAGEHLP_SYMBOL sym, LPSTR UnDecName, DWORD UnDecNameLength
788 BOOL WINAPI SymUnloadModule(
789 HANDLE hProcess, DWORD BaseOfDll
791 BOOL WINAPI TouchFileTimes(
792 HANDLE FileHandle, LPSYSTEMTIME lpSystemTime
794 DWORD WINAPI UnDecorateSymbolName(
795 LPCSTR DecoratedName, LPSTR UnDecoratedName,
796 DWORD UndecoratedLength, DWORD Flags
798 BOOL WINAPI UnMapAndLoad(
799 PLOADED_IMAGE LoadedImage
801 BOOL WINAPI UnmapDebugInformation(
802 PIMAGE_DEBUG_INFORMATION DebugInfo
804 BOOL WINAPI UpdateDebugInfoFile(
805 LPSTR ImageFileName, LPSTR SymbolPath,
806 LPSTR DebugFilePath, PIMAGE_NT_HEADERS NtHeaders
808 BOOL WINAPI UpdateDebugInfoFileEx(
809 LPSTR ImageFileName, LPSTR SymbolPath, LPSTR DebugFilePath,
810 PIMAGE_NT_HEADERS NtHeaders, DWORD OldChecksum
813 /***********************************************************************
814 * Wine specific
817 extern HANDLE IMAGEHLP_hHeap;
819 #ifdef __cplusplus
820 } /* extern "C" */
821 #endif /* defined(__cplusplus) */
823 #endif /* __WINE_IMAGEHLP_H */