include: Add MFTOPOLOGY_DXVA_MODE enum definition.
[wine.git] / include / imagehlp.h
blob3c7bb90b511a60a9edba7a1279cba7f58e78694f
1 /*
2 * Declarations for IMAGEHLP
4 * Copyright (C) 1998 Patrik Stridvall
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_IMAGEHLP_H
22 #define __WINE_IMAGEHLP_H
24 #include <wintrust.h>
25 #include <minidumpapiset.h>
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* defined(__cplusplus) */
31 #ifdef _IMAGEHLP_SOURCE_
32 #define IMAGEAPI WINAPI
33 #else
34 #define IMAGEAPI DECLSPEC_IMPORT WINAPI
35 #endif
37 #define DBHLPAPI IMAGEAPI
39 #define API_VERSION_NUMBER 7 /* 7 is the default */
41 /***********************************************************************
42 * Types
45 typedef PVOID DIGEST_HANDLE;
47 /***********************************************************************
48 * Enums/Defines
51 typedef enum _IMAGEHLP_STATUS_REASON {
52 BindOutOfMemory,
53 BindRvaToVaFailed,
54 BindNoRoomInImage,
55 BindImportModuleFailed,
56 BindImportProcedureFailed,
57 BindImportModule,
58 BindImportProcedure,
59 BindForwarder,
60 BindForwarderNOT,
61 BindImageModified,
62 BindExpandFileHeaders,
63 BindImageComplete,
64 BindMismatchedSymbols,
65 BindSymbolsNotUpdated
66 } IMAGEHLP_STATUS_REASON;
68 #define BIND_NO_BOUND_IMPORTS 0x00000001
69 #define BIND_NO_UPDATE 0x00000002
70 #define BIND_ALL_IMAGES 0x00000004
71 #define BIND_CACHE_IMPORT_DLLS 0x00000008
73 #define CERT_PE_IMAGE_DIGEST_DEBUG_INFO 0x01
74 #define CERT_PE_IMAGE_DIGEST_RESOURCES 0x02
75 #define CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO 0x04
76 #define CERT_PE_IMAGE_DIGEST_NON_PE_INFO 0x08
78 #define CERT_SECTION_TYPE_ANY 0xFF
80 #define SPLITSYM_REMOVE_PRIVATE 0x00000001
81 #define SPLITSYM_EXTRACT_ALL 0x00000002
82 #define SPLITSYM_SYMBOLPATH_IS_SRC 0x00000004
84 #define FRAME_FPO 0
85 #define FRAME_TRAP 1
86 #define FRAME_TSS 2
87 #define FRAME_NONFPO 3
89 #define CHECKSUM_SUCCESS 0
90 #define CHECKSUM_OPEN_FAILURE 1
91 #define CHECKSUM_MAP_FAILURE 2
92 #define CHECKSUM_MAPVIEW_FAILURE 3
93 #define CHECKSUM_UNICODE_FAILURE 4
95 typedef enum _ADDRESS_MODE {
96 AddrMode1616,
97 AddrMode1632,
98 AddrModeReal,
99 AddrModeFlat
100 } ADDRESS_MODE;
102 #define SYMOPT_CASE_INSENSITIVE 0x00000001
103 #define SYMOPT_UNDNAME 0x00000002
104 #define SYMOPT_DEFERRED_LOADS 0x00000004
105 #define SYMOPT_NO_CPP 0x00000008
106 #define SYMOPT_LOAD_LINES 0x00000010
107 #define SYMOPT_OMAP_FIND_NEAREST 0x00000020
109 #define SYMF_OMAP_GENERATED 0x00000001
110 #define SYMF_OMAP_MODIFIED 0x00000002
111 /* 0x00000004 has been obsoleted */
112 #define SYMF_REGISTER 0x00000008
113 #define SYMF_REGREL 0x00000010
114 #define SYMF_FRAMEREL 0x00000020
115 #define SYMF_PARAMETER 0x00000040
116 #define SYMF_LOCAL 0x00000080
117 #define SYMF_CONSTANT 0x00000100
118 #define SYMF_EXPORT 0x00000200
119 #define SYMF_FORWARDER 0x00000400
120 #define SYMF_FUNCTION 0x00000800
122 typedef enum {
123 SymNone,
124 SymCoff,
125 SymCv,
126 SymPdb,
127 SymExport,
128 SymDeferred,
129 SymSym,
130 SymDia,
131 SymVirtual,
132 NumSymTypes
133 } SYM_TYPE;
135 #define UNDNAME_COMPLETE (0x0000)
136 #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001)
137 #define UNDNAME_NO_MS_KEYWORDS (0x0002)
138 #define UNDNAME_NO_FUNCTION_RETURNS (0x0004)
139 #define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
140 #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
141 #define UNDNAME_NO_MS_THISTYPE (0x0020)
142 #define UNDNAME_NO_CV_THISTYPE (0x0040)
143 #define UNDNAME_NO_THISTYPE (0x0060)
144 #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080)
145 #define UNDNAME_NO_THROW_SIGNATURES (0x0100)
146 #define UNDNAME_NO_MEMBER_TYPE (0x0200)
147 #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
148 #define UNDNAME_32_BIT_DECODE (0x0800)
149 #define UNDNAME_NAME_ONLY (0x1000)
150 #define UNDNAME_NO_ARGUMENTS (0x2000)
151 #define UNDNAME_NO_SPECIAL_SYMS (0x4000)
153 #define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001
154 #define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002
155 #define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003
156 #define CBA_SYMBOLS_UNLOADED 0x00000004
157 #define CBA_DUPLICATE_SYMBOL 0x00000005
159 /***********************************************************************
160 * Structures
163 typedef struct _LOADED_IMAGE
165 PSTR ModuleName;
166 HANDLE hFile;
167 PUCHAR MappedAddress;
168 PIMAGE_NT_HEADERS FileHeader;
169 PIMAGE_SECTION_HEADER LastRvaSection;
170 ULONG NumberOfSections;
171 PIMAGE_SECTION_HEADER Sections;
172 ULONG Characteristics;
173 BOOLEAN fSystemImage;
174 BOOLEAN fDOSImage;
175 BOOLEAN fReadOnly;
176 UCHAR Version;
177 LIST_ENTRY Links;
178 ULONG SizeOfImage;
179 } LOADED_IMAGE, *PLOADED_IMAGE;
181 typedef struct _API_VERSION {
182 USHORT MajorVersion;
183 USHORT MinorVersion;
184 USHORT Revision;
185 USHORT Reserved;
186 } API_VERSION, *LPAPI_VERSION;
188 #ifndef _WIN64
189 typedef struct _IMAGE_DEBUG_INFORMATION {
190 LIST_ENTRY List;
191 DWORD Size;
192 PVOID MappedBase;
193 USHORT Machine;
194 USHORT Characteristics;
195 DWORD CheckSum;
196 DWORD ImageBase;
197 DWORD SizeOfImage;
199 DWORD NumberOfSections;
200 PIMAGE_SECTION_HEADER Sections;
202 DWORD ExportedNamesSize;
203 PSTR ExportedNames;
205 DWORD NumberOfFunctionTableEntries;
206 PIMAGE_FUNCTION_ENTRY FunctionTableEntries;
207 DWORD LowestFunctionStartingAddress;
208 DWORD HighestFunctionEndingAddress;
210 DWORD NumberOfFpoTableEntries;
211 PFPO_DATA FpoTableEntries;
213 DWORD SizeOfCoffSymbols;
214 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols;
216 DWORD SizeOfCodeViewSymbols;
217 PVOID CodeViewSymbols;
219 PSTR ImageFilePath;
220 PSTR ImageFileName;
221 PSTR DebugFilePath;
223 DWORD TimeDateStamp;
225 BOOL RomImage;
226 PIMAGE_DEBUG_DIRECTORY DebugDirectory;
227 DWORD NumberOfDebugDirectories;
229 DWORD Reserved[3];
230 } IMAGE_DEBUG_INFORMATION, *PIMAGE_DEBUG_INFORMATION;
232 PIMAGE_DEBUG_INFORMATION IMAGEAPI MapDebugInformation(HANDLE FileHandle, PCSTR FileName, PCSTR SymbolPath, ULONG ImageBase);
233 BOOL IMAGEAPI UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION DebugInfo);
234 #endif
236 typedef struct _ADDRESS {
237 DWORD Offset;
238 WORD Segment;
239 ADDRESS_MODE Mode;
240 } ADDRESS, *LPADDRESS;
242 typedef struct _ADDRESS64 {
243 DWORD64 Offset;
244 WORD Segment;
245 ADDRESS_MODE Mode;
246 } ADDRESS64, *LPADDRESS64;
248 typedef struct _KDHELP {
249 DWORD Thread;
250 DWORD ThCallbackStack;
251 DWORD NextCallback;
252 DWORD FramePointer;
253 DWORD KiCallUserMode;
254 DWORD KeUserCallbackDispatcher;
255 DWORD SystemRangeStart;
256 } KDHELP, *PKDHELP;
258 typedef struct _KDHELP64 {
259 DWORD64 Thread;
260 DWORD ThCallbackStack;
261 DWORD ThCallbackBStore;
262 DWORD NextCallback;
263 DWORD FramePointer;
264 DWORD64 KiCallUserMode;
265 DWORD64 KeUserCallbackDispatcher;
266 DWORD64 SystemRangeStart;
267 DWORD64 Reserved[8];
268 } KDHELP64, *PKDHELP64;
270 typedef struct _STACKFRAME {
271 ADDRESS AddrPC;
272 ADDRESS AddrReturn;
273 ADDRESS AddrFrame;
274 ADDRESS AddrStack;
275 PVOID FuncTableEntry;
276 DWORD Params[4];
277 BOOL Far;
278 BOOL Virtual;
279 DWORD Reserved[3];
280 KDHELP KdHelp;
281 } STACKFRAME, *LPSTACKFRAME;
283 typedef struct _STACKFRAME64 {
284 ADDRESS64 AddrPC;
285 ADDRESS64 AddrReturn;
286 ADDRESS64 AddrFrame;
287 ADDRESS64 AddrStack;
288 ADDRESS64 AddrBStore;
289 PVOID FuncTableEntry;
290 DWORD64 Params[4];
291 BOOL Far;
292 BOOL Virtual;
293 DWORD64 Reserved[3];
294 KDHELP64 KdHelp;
295 } STACKFRAME64, *LPSTACKFRAME64;
297 typedef struct _SOURCEFILE {
298 DWORD64 ModBase;
299 PCHAR FileName;
300 } SOURCEFILE, *PSOURCEFILE;
302 typedef struct _SOURCEFILEW
304 DWORD64 ModBase;
305 PWSTR FileName;
306 } SOURCEFILEW, *PSOURCEFILEW;
308 typedef struct _IMAGEHLP_STACK_FRAME
310 DWORD InstructionOffset;
311 DWORD ReturnOffset;
312 DWORD FrameOffset;
313 DWORD StackOffset;
314 DWORD BackingStoreOffset;
315 DWORD FuncTableEntry;
316 DWORD Params[4];
317 DWORD Reserved[5];
318 DWORD Virtual;
319 DWORD Reserved2;
320 } IMAGEHLP_STACK_FRAME, *PIMAGEHLP_STACK_FRAME;
322 typedef VOID IMAGEHLP_CONTEXT, *PIMAGEHLP_CONTEXT;
324 typedef struct _IMAGEHLP_SYMBOL {
325 DWORD SizeOfStruct;
326 DWORD Address;
327 DWORD Size;
328 DWORD Flags;
329 DWORD MaxNameLength;
330 CHAR Name[ANYSIZE_ARRAY];
331 } IMAGEHLP_SYMBOL, *PIMAGEHLP_SYMBOL;
333 typedef struct _IMAGEHLP_SYMBOLW {
334 DWORD SizeOfStruct;
335 DWORD Address;
336 DWORD Size;
337 DWORD Flags;
338 DWORD MaxNameLength;
339 WCHAR Name[ANYSIZE_ARRAY];
340 } IMAGEHLP_SYMBOLW, *PIMAGEHLP_SYMBOLW;
342 typedef struct _IMAGEHLP_SYMBOL64
344 DWORD SizeOfStruct;
345 DWORD64 Address;
346 DWORD Size;
347 DWORD Flags;
348 DWORD MaxNameLength;
349 CHAR Name[1];
350 } IMAGEHLP_SYMBOL64, *PIMAGEHLP_SYMBOL64;
352 typedef struct _IMAGEHLP_SYMBOLW64
354 DWORD SizeOfStruct;
355 DWORD64 Address;
356 DWORD Size;
357 DWORD Flags;
358 DWORD MaxNameLength;
359 WCHAR Name[1];
360 } IMAGEHLP_SYMBOLW64, *PIMAGEHLP_SYMBOLW64;
362 typedef struct _IMAGEHLP_MODULE {
363 DWORD SizeOfStruct;
364 DWORD BaseOfImage;
365 DWORD ImageSize;
366 DWORD TimeDateStamp;
367 DWORD CheckSum;
368 DWORD NumSyms;
369 SYM_TYPE SymType;
370 CHAR ModuleName[32];
371 CHAR ImageName[256];
372 CHAR LoadedImageName[256];
373 } IMAGEHLP_MODULE, *PIMAGEHLP_MODULE;
375 typedef struct _IMAGEHLP_MODULEW {
376 DWORD SizeOfStruct;
377 DWORD BaseOfImage;
378 DWORD ImageSize;
379 DWORD TimeDateStamp;
380 DWORD CheckSum;
381 DWORD NumSyms;
382 SYM_TYPE SymType;
383 WCHAR ModuleName[32];
384 WCHAR ImageName[256];
385 WCHAR LoadedImageName[256];
386 } IMAGEHLP_MODULEW, *PIMAGEHLP_MODULEW;
388 typedef struct _IMAGEHLP_MODULE64
390 DWORD SizeOfStruct;
391 DWORD64 BaseOfImage;
392 DWORD ImageSize;
393 DWORD TimeDateStamp;
394 DWORD CheckSum;
395 DWORD NumSyms;
396 SYM_TYPE SymType;
397 CHAR ModuleName[32];
398 CHAR ImageName[256];
399 CHAR LoadedImageName[256];
400 CHAR LoadedPdbName[256];
401 DWORD CVSig;
402 CHAR CVData[MAX_PATH*3];
403 DWORD PdbSig;
404 GUID PdbSig70;
405 DWORD PdbAge;
406 BOOL PdbUnmatched;
407 BOOL DbgUnmatched;
408 BOOL LineNumbers;
409 BOOL GlobalSymbols;
410 BOOL TypeInfo;
411 BOOL SourceIndexed;
412 BOOL Publics;
413 DWORD MachineType;
414 DWORD Reserved;
415 } IMAGEHLP_MODULE64, *PIMAGEHLP_MODULE64;
417 typedef struct _IMAGEHLP_MODULEW64
419 DWORD SizeOfStruct;
420 DWORD64 BaseOfImage;
421 DWORD ImageSize;
422 DWORD TimeDateStamp;
423 DWORD CheckSum;
424 DWORD NumSyms;
425 SYM_TYPE SymType;
426 WCHAR ModuleName[32];
427 WCHAR ImageName[256];
428 WCHAR LoadedImageName[256];
429 WCHAR LoadedPdbName[256];
430 DWORD CVSig;
431 WCHAR CVData[MAX_PATH*3];
432 DWORD PdbSig;
433 GUID PdbSig70;
434 DWORD PdbAge;
435 BOOL PdbUnmatched;
436 BOOL DbgUnmatched;
437 BOOL LineNumbers;
438 BOOL GlobalSymbols;
439 BOOL TypeInfo;
440 BOOL SourceIndexed;
441 BOOL Publics;
442 DWORD MachineType;
443 DWORD Reserved;
444 } IMAGEHLP_MODULEW64, *PIMAGEHLP_MODULEW64;
446 typedef struct _IMAGEHLP_LINE {
447 DWORD SizeOfStruct;
448 PVOID Key;
449 DWORD LineNumber;
450 PCHAR FileName;
451 DWORD Address;
452 } IMAGEHLP_LINE, *PIMAGEHLP_LINE;
454 typedef struct _IMAGEHLP_LINEW {
455 DWORD SizeOfStruct;
456 PVOID Key;
457 DWORD LineNumber;
458 PWSTR FileName;
459 DWORD Address;
460 } IMAGEHLP_LINEW, *PIMAGEHLP_LINEW;
462 typedef struct _IMAGEHLP_LINE64 {
463 DWORD SizeOfStruct;
464 PVOID Key;
465 DWORD LineNumber;
466 PCHAR FileName;
467 DWORD64 Address;
468 } IMAGEHLP_LINE64, *PIMAGEHLP_LINE64;
470 typedef struct _IMAGEHLP_LINEW64 {
471 DWORD SizeOfStruct;
472 PVOID Key;
473 DWORD LineNumber;
474 PWSTR FileName;
475 DWORD64 Address;
476 } IMAGEHLP_LINEW64, *PIMAGEHLP_LINEW64;
478 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD {
479 DWORD SizeOfStruct;
480 DWORD BaseOfImage;
481 DWORD CheckSum;
482 DWORD TimeDateStamp;
483 CHAR FileName[MAX_PATH];
484 BOOLEAN Reparse;
485 } IMAGEHLP_DEFERRED_SYMBOL_LOAD, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
487 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL {
488 DWORD SizeOfStruct;
489 DWORD NumberOfDups;
490 PIMAGEHLP_SYMBOL Symbol;
491 ULONG SelectedSymbol;
492 } IMAGEHLP_DUPLICATE_SYMBOL, *PIMAGEHLP_DUPLICATE_SYMBOL;
494 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO
496 TI_GET_SYMTAG,
497 TI_GET_SYMNAME,
498 TI_GET_LENGTH,
499 TI_GET_TYPE,
500 TI_GET_TYPEID,
501 TI_GET_BASETYPE,
502 TI_GET_ARRAYINDEXTYPEID,
503 TI_FINDCHILDREN,
504 TI_GET_DATAKIND,
505 TI_GET_ADDRESSOFFSET,
506 TI_GET_OFFSET,
507 TI_GET_VALUE,
508 TI_GET_COUNT,
509 TI_GET_CHILDRENCOUNT,
510 TI_GET_BITPOSITION,
511 TI_GET_VIRTUALBASECLASS,
512 TI_GET_VIRTUALTABLESHAPEID,
513 TI_GET_VIRTUALBASEPOINTEROFFSET,
514 TI_GET_CLASSPARENTID,
515 TI_GET_NESTED,
516 TI_GET_SYMINDEX,
517 TI_GET_LEXICALPARENT,
518 TI_GET_ADDRESS,
519 TI_GET_THISADJUST,
520 TI_GET_UDTKIND,
521 TI_IS_EQUIV_TO,
522 TI_GET_CALLING_CONVENTION,
523 } IMAGEHLP_SYMBOL_TYPE_INFO;
525 #define IMAGEHLP_GET_TYPE_INFO_UNCACHED 0x00000001
526 #define IMAGEHLP_GET_TYPE_INFO_CHILDREN 0x00000002
527 typedef struct _IMAGEHLP_GET_TYPE_INFO_PARAMS
529 ULONG SizeOfStruct;
530 ULONG Flags;
531 ULONG NumIds;
532 PULONG TypeIds;
533 ULONG64 TagFilter;
534 ULONG NumReqs;
535 IMAGEHLP_SYMBOL_TYPE_INFO* ReqKinds;
536 PULONG_PTR ReqOffsets;
537 PULONG ReqSizes;
538 ULONG_PTR ReqStride;
539 ULONG_PTR BufferSize;
540 PVOID Buffer;
541 ULONG EntriesMatched;
542 ULONG EntriesFilled;
543 ULONG64 TagsFound;
544 ULONG64 AllReqsValid;
545 ULONG NumReqsValid;
546 PULONG64 ReqsValid;
547 } IMAGEHLP_GET_TYPE_INFO_PARAMS, *PIMAGEHLP_GET_TYPE_INFO_PARAMS;
549 #define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
550 #define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER
551 #define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL
552 #define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL
553 #define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER
554 #define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL
555 #define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT
556 #define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION
558 #define MAX_SYM_NAME 2000
560 typedef struct _SYMBOL_INFO {
561 ULONG SizeOfStruct;
562 ULONG TypeIndex;
563 ULONG64 Reserved[2];
564 ULONG info;
565 ULONG Size;
566 ULONG64 ModBase;
567 ULONG Flags;
568 ULONG64 Value;
569 ULONG64 Address;
570 ULONG Register;
571 ULONG Scope;
572 ULONG Tag;
573 ULONG NameLen;
574 ULONG MaxNameLen;
575 CHAR Name[1];
576 } SYMBOL_INFO, *PSYMBOL_INFO;
578 typedef struct _SYMBOL_INFOW
580 ULONG SizeOfStruct;
581 ULONG TypeIndex;
582 ULONG64 Reserved[2];
583 ULONG Index;
584 ULONG Size;
585 ULONG64 ModBase;
586 ULONG Flags;
587 ULONG64 Value;
588 ULONG64 Address;
589 ULONG Register;
590 ULONG Scope;
591 ULONG Tag;
592 ULONG NameLen;
593 ULONG MaxNameLen;
594 WCHAR Name[1];
595 } SYMBOL_INFOW, *PSYMBOL_INFOW;
597 typedef struct _SYMBOL_INFO_PACKAGE
599 SYMBOL_INFO si;
600 CHAR name[MAX_SYM_NAME+1];
601 } SYMBOL_INFO_PACKAGE, *PSYMBOL_INFO_PACKAGE;
603 typedef struct _SYMBOL_INFO_PACKAGEW
605 SYMBOL_INFOW si;
606 WCHAR name[MAX_SYM_NAME+1];
607 } SYMBOL_INFO_PACKAGEW, *PSYMBOL_INFO_PACKAGEW;
609 #define DBHHEADER_DEBUGDIRS 0x1
610 typedef struct _MODLOAD_DATA
612 DWORD ssize;
613 DWORD ssig;
614 PVOID data;
615 DWORD size;
616 DWORD flags;
617 } MODLOAD_DATA, *PMODLOAD_DATA;
619 typedef struct _SRCCODEINFO
621 DWORD SizeOfStruct;
622 PVOID Key;
623 DWORD64 ModBase;
624 CHAR Obj[MAX_PATH+1];
625 CHAR FileName[MAX_PATH+1];
626 DWORD LineNumber;
627 DWORD64 Address;
628 } SRCCODEINFO, *PSRCCODEINFO;
630 typedef struct _SRCCODEINFOW
632 DWORD SizeOfStruct;
633 PVOID Key;
634 DWORD64 ModBase;
635 WCHAR Obj[MAX_PATH+1];
636 WCHAR FileName[MAX_PATH+1];
637 DWORD LineNumber;
638 DWORD64 Address;
639 } SRCCODEINFOW, *PSRCCODEINFOW;
641 /***********************************************************************
642 * Callbacks
645 typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACK)(
646 PCSTR, PVOID
648 typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACKW)(
649 PCWSTR, PVOID
652 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(
653 PCSTR ModuleName, ULONG ModuleBase, ULONG ModuleSize,
654 PVOID UserContext
656 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK64)(
657 PCSTR, DWORD64, ULONG, PVOID
659 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACKW64)(
660 PCWSTR, DWORD64, ULONG, PVOID
663 typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(
664 HANDLE, PCSTR, PVOID
666 typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACKW)(
667 HANDLE, PCWSTR, PVOID
670 typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACK)(
671 HANDLE, PCSTR, PVOID
673 typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACKW)(
674 HANDLE, PCWSTR, PVOID
677 typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACK)(
678 PCSTR, PVOID
680 typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACKW)(
681 PCWSTR, PVOID
684 typedef BOOL (CALLBACK *PIMAGEHLP_STATUS_ROUTINE)(
685 IMAGEHLP_STATUS_REASON Reason, PCSTR ImageName, PCSTR DllName,
686 ULONG_PTR Va, ULONG_PTR Parameter
688 typedef BOOL (CALLBACK *PIMAGEHLP_STATUS_ROUTINE32)(
689 IMAGEHLP_STATUS_REASON Reason, PCSTR ImageName, PCSTR DllName,
690 ULONG Va, ULONG_PTR Parameter
692 typedef BOOL (CALLBACK *PIMAGEHLP_STATUS_ROUTINE64)(
693 IMAGEHLP_STATUS_REASON Reason, PCSTR ImageName, PCSTR DllName,
694 ULONG64 Va, ULONG_PTR Parameter
697 typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(
698 PSYMBOL_INFO pSymInfo, ULONG SymbolSize, PVOID UserContext
700 typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACKW)(
701 PSYMBOL_INFOW pSymInfo, ULONG SymbolSize, PVOID UserContext
704 typedef BOOL (CALLBACK* PSYM_ENUMLINES_CALLBACK)(
705 PSRCCODEINFO, PVOID
707 typedef BOOL (CALLBACK* PSYM_ENUMLINES_CALLBACKW)(
708 PSRCCODEINFOW, PVOID
711 typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)(
712 PSOURCEFILE pSourceFile, PVOID UserContext
714 typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACKW)(
715 PSOURCEFILEW pSourceFile, PVOID UserContext
718 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(
719 PCSTR ModuleName, ULONG BaseOfDll, PVOID UserContext
721 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(
722 PCSTR, DWORD64, PVOID
724 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACKW64)(
725 PCWSTR, DWORD64, PVOID
728 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(
729 PCSTR, ULONG, ULONG, PVOID
731 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(
732 PCWSTR, ULONG, ULONG, PVOID
734 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(
735 PCSTR, DWORD64, ULONG, PVOID
737 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)(
738 PCWSTR, DWORD64, ULONG, PVOID
741 typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(
742 HANDLE, DWORD, PVOID
744 typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(
745 HANDLE, ULONG64, ULONG64
748 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(
749 HANDLE hProcess, ULONG ActionCode, PVOID CallbackData,
750 PVOID UserContext
752 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(
753 HANDLE, ULONG, ULONG64, ULONG64
756 typedef BOOL (CALLBACK *DIGEST_FUNCTION)(
757 DIGEST_HANDLE refdata, PBYTE pData, DWORD dwLength
760 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)(
761 HANDLE hProcess, DWORD lpBaseAddress, PVOID lpBuffer,
762 DWORD nSize, PDWORD lpNumberOfBytesRead
765 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE64)(
766 HANDLE hProcess, DWORD64 lpBaseAddress, PVOID lpBuffer,
767 DWORD nSize, LPDWORD lpNumberOfBytesRead
770 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(
771 HANDLE hProcess, DWORD AddrBase
774 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE64)(
775 HANDLE hProcess, DWORD64 AddrBase
778 typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE)(
779 HANDLE hProcess, DWORD ReturnAddress);
781 typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE64)(
782 HANDLE hProcess, DWORD64 ReturnAddress);
784 typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(
785 HANDLE hProcess, HANDLE hThread, LPADDRESS lpaddr
788 typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE64)(
789 HANDLE hProcess, HANDLE hThread, LPADDRESS64 lpaddr
793 /***********************************************************************
794 * Functions
797 BOOL IMAGEAPI BindImage(PCSTR ImageName, PCSTR DllPath, PCSTR SymbolPath);
798 BOOL IMAGEAPI BindImageEx(DWORD Flags, PCSTR ImageName, PCSTR DllPath, PCSTR SymbolPath, PIMAGEHLP_STATUS_ROUTINE StatusRoutine);
799 PIMAGE_NT_HEADERS IMAGEAPI CheckSumMappedFile(LPVOID BaseAddress, DWORD FileLength, LPDWORD HeaderSum, LPDWORD CheckSum);
800 BOOL IMAGEAPI EnumDirTree(HANDLE, PCSTR, PCSTR, PSTR, PENUMDIRTREE_CALLBACK, PVOID);
801 BOOL IMAGEAPI EnumDirTreeW(HANDLE, PCWSTR, PCWSTR, PWSTR, PENUMDIRTREE_CALLBACKW, PVOID);
802 BOOL IMAGEAPI EnumerateLoadedModules(HANDLE hProcess, PENUMLOADED_MODULES_CALLBACK EnumLoadedModulesCallback, PVOID UserContext);
803 BOOL IMAGEAPI EnumerateLoadedModules64(HANDLE, PENUMLOADED_MODULES_CALLBACK64, PVOID);
804 BOOL IMAGEAPI EnumerateLoadedModulesW64(HANDLE, PENUMLOADED_MODULES_CALLBACKW64, PVOID);
805 HANDLE IMAGEAPI FindDebugInfoFile(PCSTR FileName, PCSTR SymbolPath, PSTR DebugFilePath);
806 HANDLE IMAGEAPI FindDebugInfoFileEx(PCSTR, PCSTR, PSTR, PFIND_DEBUG_FILE_CALLBACK, PVOID);
807 HANDLE IMAGEAPI FindDebugInfoFileExW(PCWSTR, PCWSTR, PWSTR, PFIND_DEBUG_FILE_CALLBACKW, PVOID);
808 HANDLE IMAGEAPI FindExecutableImage(PCSTR, PCSTR, PSTR);
809 HANDLE IMAGEAPI FindExecutableImageEx(PCSTR, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID);
810 HANDLE IMAGEAPI FindExecutableImageExW(PCWSTR, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW, PVOID);
811 BOOL IMAGEAPI FindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD, PSTR, PFINDFILEINPATHCALLBACK, PVOID);
812 BOOL IMAGEAPI GetImageConfigInformation(PLOADED_IMAGE LoadedImage, PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation);
813 DWORD IMAGEAPI GetImageUnusedHeaderBytes(PLOADED_IMAGE LoadedImage, LPDWORD SizeUnusedHeaderBytes);
814 DWORD IMAGEAPI GetTimestampForLoadedLibrary(HMODULE Module);
815 BOOL IMAGEAPI ImageAddCertificate(HANDLE FileHandle, LPWIN_CERTIFICATE Certificate, PDWORD Index);
816 PVOID IMAGEAPI ImageDirectoryEntryToData(PVOID Base, BOOLEAN MappedAsImage, USHORT DirectoryEntry, PULONG Size);
817 BOOL IMAGEAPI ImageEnumerateCertificates(HANDLE FileHandle, WORD TypeFilter, PDWORD CertificateCount, PDWORD Indices, DWORD IndexCount);
818 BOOL IMAGEAPI ImageGetCertificateData(HANDLE FileHandle, DWORD CertificateIndex, LPWIN_CERTIFICATE Certificate, PDWORD RequiredLength);
819 BOOL IMAGEAPI ImageGetCertificateHeader(HANDLE FileHandle, DWORD CertificateIndex, LPWIN_CERTIFICATE Certificateheader);
820 BOOL IMAGEAPI ImageGetDigestStream(HANDLE FileHandle, DWORD DigestLevel, DIGEST_FUNCTION DigestFunction, DIGEST_HANDLE DigestHandle);
821 PLOADED_IMAGE IMAGEAPI ImageLoad(PCSTR DllName, PCSTR DllPath);
822 PIMAGE_NT_HEADERS IMAGEAPI ImageNtHeader(PVOID Base);
823 BOOL IMAGEAPI ImageRemoveCertificate(HANDLE FileHandle, DWORD Index);
824 PIMAGE_SECTION_HEADER IMAGEAPI ImageRvaToSection(PIMAGE_NT_HEADERS NtHeaders, PVOID Base, ULONG Rva);
825 PVOID IMAGEAPI ImageRvaToVa(PIMAGE_NT_HEADERS NtHeaders, PVOID Base, ULONG Rva, PIMAGE_SECTION_HEADER *LastRvaSection);
826 BOOL IMAGEAPI ImageUnload(PLOADED_IMAGE LoadedImage);
827 LPAPI_VERSION IMAGEAPI ImagehlpApiVersion(void);
828 LPAPI_VERSION IMAGEAPI ImagehlpApiVersionEx(LPAPI_VERSION AppVersion);
829 BOOL IMAGEAPI MakeSureDirectoryPathExists(PCSTR DirPath);
830 BOOL IMAGEAPI MapAndLoad(PCSTR ImageName, PCSTR DllPath, PLOADED_IMAGE LoadedImage, BOOL DotDll, BOOL ReadOnly);
831 DWORD IMAGEAPI MapFileAndCheckSumA(PCSTR Filename, PDWORD HeaderSum, PDWORD CheckSum);
832 DWORD IMAGEAPI MapFileAndCheckSumW(PCWSTR Filename, PDWORD HeaderSum, PDWORD CheckSum);
833 BOOL IMAGEAPI ReBaseImage(PCSTR CurrentImageName, PCSTR SymbolPath, BOOL fReBase, BOOL fRebaseSysfileOk, BOOL fGoingDown, ULONG CheckImageSize,
834 ULONG *OldImageSize, ULONG_PTR *OldImageBase, ULONG *NewImageSize, ULONG_PTR *NewImageBase, ULONG TimeStamp);
835 BOOL IMAGEAPI ReBaseImage64(PCSTR CurrentImageName, PCSTR SymbolPath, BOOL fReBase, BOOL fRebaseSysfileOk, BOOL fGoingDown, ULONG CheckImageSize,
836 ULONG *OldImageSize, ULONG64 *OldImageBase, ULONG *NewImageSize, ULONG64 *NewImageBase, ULONG TimeStamp);
837 BOOL IMAGEAPI RemovePrivateCvSymbolic(PCHAR DebugData, PCHAR *NewDebugData, ULONG *NewDebugSize);
838 BOOL IMAGEAPI SearchTreeForFile(PCSTR RootPath, PCSTR InputPathName, PSTR OutputPathBuffer);
839 BOOL IMAGEAPI SearchTreeForFileW(PCWSTR RootPath, PCWSTR InputPathName, PWSTR OutputPathBuffer);
840 BOOL IMAGEAPI SetImageConfigInformation(PLOADED_IMAGE LoadedImage, PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation);
841 BOOL IMAGEAPI SplitSymbols(PSTR ImageName, PCSTR SymbolsPath, PSTR SymbolFilePath, ULONG Flags);
842 BOOL IMAGEAPI StackWalk(DWORD MachineType, HANDLE hProcess, HANDLE hThread, LPSTACKFRAME StackFrame, PVOID ContextRecord,
843 PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine, PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,
844 PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine, PTRANSLATE_ADDRESS_ROUTINE TranslateAddress);
845 BOOL IMAGEAPI StackWalk64(DWORD MachineType, HANDLE hProcess, HANDLE hThread, LPSTACKFRAME64 StackFrame, PVOID ContextRecord,
846 PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine, PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine,
847 PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine, PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress);
848 BOOL IMAGEAPI SymAddSymbol(HANDLE, ULONG64, PCSTR, DWORD64, DWORD, DWORD);
849 BOOL IMAGEAPI SymAddSymbolW(HANDLE, ULONG64, PCWSTR, DWORD64, DWORD, DWORD);
850 BOOL IMAGEAPI SymCleanup(HANDLE hProcess);
851 BOOL IMAGEAPI SymDeleteSymbol(HANDLE, ULONG64, PCSTR, DWORD64, DWORD);
852 BOOL IMAGEAPI SymDeleteSymbolW(HANDLE, ULONG64, PCWSTR, DWORD64, DWORD);
853 BOOL IMAGEAPI SymEnumerateModules(HANDLE hProcess, PSYM_ENUMMODULES_CALLBACK EnumModulesCallback, PVOID UserContext);
854 BOOL IMAGEAPI SymEnumerateModules64(HANDLE, PSYM_ENUMMODULES_CALLBACK64, PVOID);
855 BOOL IMAGEAPI SymEnumerateModulesW64(HANDLE, PSYM_ENUMMODULES_CALLBACKW64, PVOID);
856 BOOL IMAGEAPI SymEnumerateSymbols(HANDLE hProcess, DWORD BaseOfDll, PSYM_ENUMSYMBOLS_CALLBACK EnumSymbolsCallback, PVOID UserContext);
857 BOOL IMAGEAPI SymEnumerateSymbolsW(HANDLE hProcess, DWORD BaseOfDll, PSYM_ENUMSYMBOLS_CALLBACKW EnumSymbolsCallback, PVOID UserContext);
858 BOOL IMAGEAPI SymEnumerateSymbols64(HANDLE, ULONG64, PSYM_ENUMSYMBOLS_CALLBACK64, PVOID);
859 BOOL IMAGEAPI SymEnumerateSymbolsW64(HANDLE, ULONG64, PSYM_ENUMSYMBOLS_CALLBACK64W, PVOID);
860 BOOL IMAGEAPI SymEnumLines(HANDLE, ULONG64, PCSTR, PCSTR, PSYM_ENUMLINES_CALLBACK, PVOID);
861 BOOL IMAGEAPI SymEnumLinesW(HANDLE, ULONG64, PCWSTR, PCWSTR, PSYM_ENUMLINES_CALLBACKW, PVOID);
862 BOOL IMAGEAPI SymEnumSourceFiles(HANDLE hProcess, ULONG64 ModBase, PCSTR Mask, PSYM_ENUMSOURCEFILES_CALLBACK cbSrcFiles, PVOID UserContext);
863 BOOL IMAGEAPI SymEnumSourceFilesW(HANDLE hProcess, ULONG64 ModBase, PCWSTR Mask, PSYM_ENUMSOURCEFILES_CALLBACKW cbSrcFiles, PVOID UserContext);
864 BOOL IMAGEAPI SymEnumSourceLines(HANDLE, ULONG64, PCSTR, PCSTR, DWORD, DWORD, PSYM_ENUMLINES_CALLBACK, PVOID);
865 BOOL IMAGEAPI SymEnumSourceLinesW(HANDLE, ULONG64, PCWSTR, PCWSTR, DWORD, DWORD, PSYM_ENUMLINES_CALLBACKW, PVOID);
866 BOOL IMAGEAPI SymEnumSymbols(HANDLE hProcess, DWORD BaseOfDll, PCSTR Mask, PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback, PVOID UserContext);
867 BOOL IMAGEAPI SymEnumSymbolsW(HANDLE hProcess, DWORD BaseOfDll, PCWSTR Mask, PSYM_ENUMERATESYMBOLS_CALLBACKW EnumSymbolsCallback, PVOID UserContext);
868 BOOL IMAGEAPI SymEnumSymbolsForAddr(HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID);
869 BOOL IMAGEAPI SymEnumSymbolsForAddrW(HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID);
870 BOOL IMAGEAPI SymEnumTypes(HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID);
871 BOOL IMAGEAPI SymEnumTypesW(HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID);
872 HANDLE IMAGEAPI SymFindExecutableImage(HANDLE, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID);
873 HANDLE IMAGEAPI SymFindExecutableImageW(HANDLE, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW, PVOID);
874 BOOL IMAGEAPI SymFindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD, PSTR, PFINDFILEINPATHCALLBACK, PVOID);
875 BOOL IMAGEAPI SymFindFileInPathW(HANDLE, PCWSTR, PCWSTR, PVOID, DWORD, DWORD, DWORD, PWSTR, PFINDFILEINPATHCALLBACKW, PVOID);
876 BOOL IMAGEAPI SymFromAddr(HANDLE, DWORD64, DWORD64*, SYMBOL_INFO*);
877 BOOL IMAGEAPI SymFromAddrW(HANDLE, DWORD64, DWORD64*, SYMBOL_INFOW*);
878 BOOL IMAGEAPI SymFromIndex(HANDLE, ULONG64, DWORD, PSYMBOL_INFO);
879 BOOL IMAGEAPI SymFromIndexW(HANDLE, ULONG64, DWORD, PSYMBOL_INFOW);
880 BOOL IMAGEAPI SymFromName(HANDLE, PCSTR, PSYMBOL_INFO);
881 BOOL IMAGEAPI SymFromNameW(HANDLE, PCWSTR, PSYMBOL_INFOW);
882 BOOL IMAGEAPI SymFromToken(HANDLE, DWORD64, DWORD, PSYMBOL_INFO);
883 BOOL IMAGEAPI SymFromTokenW(HANDLE, DWORD64, DWORD, PSYMBOL_INFOW);
884 PVOID IMAGEAPI SymFunctionTableAccess(HANDLE hProcess, DWORD AddrBase);
885 PVOID IMAGEAPI SymFunctionTableAccess64(HANDLE hProcess, DWORD64 AddrBase);
886 ULONG IMAGEAPI SymGetFileLineOffsets64(HANDLE, PCSTR, PCSTR, PDWORD64, ULONG);
887 PCHAR IMAGEAPI SymGetHomeDirectory(DWORD, PSTR, size_t);
888 PWSTR IMAGEAPI SymGetHomeDirectoryW(DWORD, PWSTR, size_t);
889 BOOL IMAGEAPI SymGetLineFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINE);
890 BOOL IMAGEAPI SymGetLineFromAddrW(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINEW);
891 BOOL IMAGEAPI SymGetLineFromAddr64(HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINE64);
892 BOOL IMAGEAPI SymGetLineFromAddrW64(HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINEW64);
893 BOOL IMAGEAPI SymGetLineFromName(HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE);
894 BOOL IMAGEAPI SymGetLineFromName64(HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE64);
895 BOOL IMAGEAPI SymGetLineFromNameW64(HANDLE, PCWSTR, PCWSTR, DWORD, PLONG, PIMAGEHLP_LINEW64);
896 BOOL IMAGEAPI SymGetLineNext(HANDLE, PIMAGEHLP_LINE);
897 BOOL IMAGEAPI SymGetLineNextW(HANDLE, PIMAGEHLP_LINEW);
898 BOOL IMAGEAPI SymGetLineNext64(HANDLE, PIMAGEHLP_LINE64);
899 BOOL IMAGEAPI SymGetLineNextW64(HANDLE, PIMAGEHLP_LINEW64);
900 BOOL IMAGEAPI SymGetLinePrev(HANDLE, PIMAGEHLP_LINE);
901 BOOL IMAGEAPI SymGetLinePrevW(HANDLE, PIMAGEHLP_LINEW);
902 BOOL IMAGEAPI SymGetLinePrev64(HANDLE, PIMAGEHLP_LINE64);
903 BOOL IMAGEAPI SymGetLinePrevW64(HANDLE, PIMAGEHLP_LINEW64);
904 DWORD IMAGEAPI SymGetModuleBase(HANDLE hProcess, DWORD dwAddr);
905 BOOL IMAGEAPI SymGetModuleInfo(HANDLE hProcess, DWORD dwAddr, PIMAGEHLP_MODULE ModuleInfo);
906 BOOL IMAGEAPI SymGetModuleInfoW(HANDLE, DWORD, PIMAGEHLP_MODULEW);
907 BOOL IMAGEAPI SymGetModuleInfo64(HANDLE, DWORD64, PIMAGEHLP_MODULE64);
908 BOOL IMAGEAPI SymGetModuleInfoW64(HANDLE, DWORD64, PIMAGEHLP_MODULEW64);
909 DWORD IMAGEAPI SymGetOptions(void);
910 BOOL IMAGEAPI SymGetScope(HANDLE, ULONG64, DWORD, PSYMBOL_INFO);
911 BOOL IMAGEAPI SymGetScopeW(HANDLE, ULONG64, DWORD, PSYMBOL_INFOW);
912 BOOL IMAGEAPI SymGetSearchPath(HANDLE hProcess, PSTR szSearchPath, DWORD SearchPathLength);
913 BOOL IMAGEAPI SymGetSearchPathW(HANDLE hProcess, PWSTR szSearchPath, DWORD SearchPathLength);
914 BOOL IMAGEAPI SymGetSourceFile(HANDLE, ULONG64, PCSTR, PCSTR, PSTR, DWORD);
915 BOOL IMAGEAPI SymGetSourceFileW(HANDLE, ULONG64, PCWSTR, PCWSTR, PWSTR, DWORD);
916 BOOL IMAGEAPI SymGetSourceFileFromToken(HANDLE, PVOID, PCSTR, PSTR, DWORD);
917 BOOL IMAGEAPI SymGetSourceFileFromTokenW(HANDLE, PVOID, PCWSTR, PWSTR, DWORD);
918 BOOL IMAGEAPI SymGetSourceFileToken(HANDLE, ULONG64, PCSTR, PVOID*, DWORD*);
919 BOOL IMAGEAPI SymGetSourceFileTokenW(HANDLE, ULONG64, PCWSTR, PVOID*, DWORD*);
920 BOOL IMAGEAPI SymGetSourceVarFromToken(HANDLE, PVOID, PCSTR, PCSTR, PSTR, DWORD);
921 BOOL IMAGEAPI SymGetSourceVarFromTokenW(HANDLE, PVOID, PCWSTR, PCWSTR, PWSTR, DWORD);
922 BOOL IMAGEAPI SymGetSymFromAddr(HANDLE hProcess, DWORD dwAddr, PDWORD pdwDisplacement, PIMAGEHLP_SYMBOL Symbol);
923 BOOL IMAGEAPI SymGetSymFromAddr64(HANDLE, DWORD64, PDWORD64, PIMAGEHLP_SYMBOL64);
924 BOOL IMAGEAPI SymGetSymFromName(HANDLE hProcess, PCSTR Name, PIMAGEHLP_SYMBOL Symbol);
925 BOOL IMAGEAPI SymGetSymFromName64(HANDLE, PCSTR, PIMAGEHLP_SYMBOL64);
926 BOOL IMAGEAPI SymGetSymNext(HANDLE hProcess, PIMAGEHLP_SYMBOL Symbol);
927 BOOL IMAGEAPI SymGetSymNext64(HANDLE, PIMAGEHLP_SYMBOL64);
928 BOOL IMAGEAPI SymGetSymPrev(HANDLE hProcess, PIMAGEHLP_SYMBOL Symbol);
929 BOOL IMAGEAPI SymGetSymPrev64(HANDLE, PIMAGEHLP_SYMBOL64);
930 BOOL IMAGEAPI SymGetTypeFromName(HANDLE, ULONG64, PCSTR, PSYMBOL_INFO);
931 BOOL IMAGEAPI SymGetTypeFromNameW(HANDLE, ULONG64, PCWSTR, PSYMBOL_INFOW);
932 BOOL IMAGEAPI SymGetTypeInfo(HANDLE, DWORD64, ULONG, IMAGEHLP_SYMBOL_TYPE_INFO, PVOID);
933 BOOL IMAGEAPI SymGetTypeInfoEx(HANDLE, DWORD64, PIMAGEHLP_GET_TYPE_INFO_PARAMS);
934 BOOL IMAGEAPI SymInitialize(HANDLE hProcess, PCSTR UserSearchPath, BOOL fInvadeProcess);
935 BOOL IMAGEAPI SymInitializeW(HANDLE hProcess, PCWSTR UserSearchPath, BOOL fInvadeProcess);
936 DWORD IMAGEAPI SymLoadModule(HANDLE hProcess, HANDLE hFile, PCSTR ImageName, PCSTR ModuleName, DWORD BaseOfDll, DWORD SizeOfDll);
937 DWORD64 IMAGEAPI SymLoadModule64(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD);
938 DWORD64 IMAGEAPI SymLoadModuleEx(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD, PMODLOAD_DATA, DWORD);
939 DWORD64 IMAGEAPI SymLoadModuleExW(HANDLE, HANDLE, PCWSTR, PCWSTR, DWORD64, DWORD, PMODLOAD_DATA, DWORD);
940 BOOL IMAGEAPI SymMatchFileName(PCSTR, PCSTR, PSTR*, PSTR*);
941 BOOL IMAGEAPI SymMatchFileNameW(PCWSTR, PCWSTR, PWSTR*, PWSTR*);
942 BOOL IMAGEAPI SymMatchString(PCSTR, PCSTR, BOOL);
943 BOOL IMAGEAPI SymMatchStringA(PCSTR, PCSTR, BOOL);
944 BOOL IMAGEAPI SymMatchStringW(PCWSTR, PCWSTR, BOOL);
945 BOOL IMAGEAPI SymRegisterCallback(HANDLE hProcess, PSYMBOL_REGISTERED_CALLBACK CallbackFunction, PVOID UserContext);
946 BOOL IMAGEAPI SymRegisterCallback64(HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64);
947 BOOL IMAGEAPI SymRegisterCallbackW64(HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64);
948 BOOL IMAGEAPI SymRegisterFunctionEntryCallback(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK, PVOID);
949 BOOL IMAGEAPI SymRegisterFunctionEntryCallback64(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK64, ULONG64);
950 BOOL IMAGEAPI SymSearch(HANDLE, ULONG64, DWORD, DWORD, PCSTR, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID, DWORD);
951 BOOL IMAGEAPI SymSearchW(HANDLE, ULONG64, DWORD, DWORD, PCWSTR, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID, DWORD);
952 DWORD IMAGEAPI SymSetContext(HANDLE hProcess, PIMAGEHLP_STACK_FRAME StackFrame, PIMAGEHLP_CONTEXT Context);
953 PCHAR IMAGEAPI SymSetHomeDirectory(HANDLE, PCSTR);
954 PWSTR IMAGEAPI SymSetHomeDirectoryW(HANDLE, PCWSTR);
955 DWORD IMAGEAPI SymSetOptions(DWORD SymOptions);
956 BOOL IMAGEAPI SymSetParentWindow(HWND);
957 BOOL IMAGEAPI SymSetSearchPath(HANDLE hProcess, PCSTR szSearchPath);
958 BOOL IMAGEAPI SymSetSearchPathW(HANDLE hProcess, PCWSTR szSearchPath);
959 BOOL IMAGEAPI SymUnDName(PIMAGEHLP_SYMBOL sym, PSTR UnDecName, DWORD UnDecNameLength);
960 BOOL IMAGEAPI SymUnDName64(PIMAGEHLP_SYMBOL64, PSTR, DWORD);
961 BOOL IMAGEAPI SymUnloadModule(HANDLE hProcess, DWORD BaseOfDll);
962 BOOL IMAGEAPI TouchFileTimes(HANDLE FileHandle, LPSYSTEMTIME lpSystemTime);
963 DWORD IMAGEAPI UnDecorateSymbolName(PCSTR DecoratedName, PSTR UnDecoratedName, DWORD UndecoratedLength, DWORD Flags);
964 DWORD IMAGEAPI UnDecorateSymbolNameW(PCWSTR DecoratedName, PWSTR UnDecoratedName, DWORD UndecoratedLength, DWORD Flags);
965 BOOL IMAGEAPI UnMapAndLoad(PLOADED_IMAGE LoadedImage);
966 BOOL IMAGEAPI UpdateDebugInfoFile(PCSTR ImageFileName, PCSTR SymbolPath, PSTR DebugFilePath, PIMAGE_NT_HEADERS32 NtHeaders);
967 BOOL IMAGEAPI UpdateDebugInfoFileEx(PCSTR ImageFileName, PCSTR SymbolPath, PSTR DebugFilePath, PIMAGE_NT_HEADERS32 NtHeaders, DWORD OldChecksum);
969 #ifdef __cplusplus
970 } /* extern "C" */
971 #endif /* defined(__cplusplus) */
973 #endif /* __WINE_IMAGEHLP_H */