[PSDK] "Fix" _SYMBOL_INFO structure, by replacing "info" member with a union of Index...
[reactos.git] / reactos / include / psdk / dbghelp.h
1 /*
2 * Declarations for DBGHELP
3 *
4 * Copyright (C) 2003 Eric Pouech
5 *
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.
10 *
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.
15 *
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
19 */
20
21 #ifndef __WINE_DBGHELP_H
22 #define __WINE_DBGHELP_H
23
24 /* A set of documentation macros (see also imagehlp.h) */
25 #ifndef __deref_out
26 # define __deref_out
27 #endif
28 #ifndef __deref_out_opt
29 # define __deref_out_opt
30 #endif
31 #ifndef __deref_opt_out
32 # define __deref_opt_out
33 #endif
34 #ifndef __in
35 # define __in
36 #endif
37 #ifndef __in_opt
38 # define __in_opt
39 #endif
40 #ifndef __in_bcount
41 # define __in_bcount(x)
42 #endif
43 #ifndef __in_bcount_opt
44 # define __in_bcount_opt(x)
45 #endif
46 #ifndef __in_ecount
47 # define __in_ecount(x)
48 #endif
49 #ifndef __inout
50 # define __inout
51 #endif
52 #ifndef __inout_opt
53 # define __inout_opt
54 #endif
55 #ifndef __inout_bcount
56 # define __inout_bcount(x)
57 #endif
58 #ifndef __inout_ecount
59 # define __inout_ecount(x)
60 #endif
61 #ifndef __out
62 # define __out
63 #endif
64 #ifndef __out_opt
65 # define __out_opt
66 #endif
67 #ifndef __out_bcount
68 # define __out_bcount(x)
69 #endif
70 #ifndef __out_bcount_opt
71 # define __out_bcount_opt(x)
72 #endif
73 #ifndef __out_ecount
74 # define __out_ecount(x)
75 #endif
76 #ifndef __out_ecount_opt
77 # define __out_ecount_opt(x)
78 #endif
79 #ifndef __out_xcount
80 # define __out_xcount(x)
81 #endif
82
83
84 #ifdef __cplusplus
85 extern "C" {
86 #endif /* defined(__cplusplus) */
87
88 #ifdef _WIN64
89 #ifndef _IMAGEHLP64
90 #define _IMAGEHLP64
91 #endif
92 #endif
93
94 #define IMAGEAPI WINAPI
95 #define DBHLPAPI IMAGEAPI
96
97 typedef struct _LOADED_IMAGE
98 {
99 PSTR ModuleName;
100 HANDLE hFile;
101 PUCHAR MappedAddress;
102 PIMAGE_NT_HEADERS FileHeader;
103 PIMAGE_SECTION_HEADER LastRvaSection;
104 ULONG NumberOfSections;
105 PIMAGE_SECTION_HEADER Sections;
106 ULONG Characteristics;
107 BOOLEAN fSystemImage;
108 BOOLEAN fDOSImage;
109 BOOLEAN fReadOnly;
110 UCHAR Version;
111 LIST_ENTRY Links;
112 ULONG SizeOfImage;
113 } LOADED_IMAGE, *PLOADED_IMAGE;
114
115 /*************************
116 * IMAGEHLP equiv *
117 *************************/
118
119 typedef enum
120 {
121 AddrMode1616,
122 AddrMode1632,
123 AddrModeReal,
124 AddrModeFlat
125 } ADDRESS_MODE;
126
127 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
128 #define ADDRESS ADDRESS64
129 #define LPADDRESS LPADDRESS64
130 #else
131 typedef struct _tagADDRESS
132 {
133 DWORD Offset;
134 WORD Segment;
135 ADDRESS_MODE Mode;
136 } ADDRESS, *LPADDRESS;
137 #endif
138
139 typedef struct _tagADDRESS64
140 {
141 DWORD64 Offset;
142 WORD Segment;
143 ADDRESS_MODE Mode;
144 } ADDRESS64, *LPADDRESS64;
145
146 #define SYMF_OMAP_GENERATED 0x00000001
147 #define SYMF_OMAP_MODIFIED 0x00000002
148 #define SYMF_USER_GENERATED 0x00000004
149 #define SYMF_REGISTER 0x00000008
150 #define SYMF_REGREL 0x00000010
151 #define SYMF_FRAMEREL 0x00000020
152 #define SYMF_PARAMETER 0x00000040
153 #define SYMF_LOCAL 0x00000080
154 #define SYMF_CONSTANT 0x00000100
155 #define SYMF_EXPORT 0x00000200
156 #define SYMF_FORWARDER 0x00000400
157 #define SYMF_FUNCTION 0x00000800
158 #define SYMF_VIRTUAL 0x00001000
159 #define SYMF_THUNK 0x00002000
160 #define SYMF_TLSREL 0x00004000
161
162 typedef enum
163 {
164 SymNone = 0,
165 SymCoff,
166 SymCv,
167 SymPdb,
168 SymExport,
169 SymDeferred,
170 SymSym,
171 SymDia,
172 SymVirtual,
173 NumSymTypes
174 } SYM_TYPE;
175
176 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
177 #define IMAGEHLP_SYMBOL IMAGEHLP_SYMBOL64
178 #define IMAGEHLP_SYMBOLW IMAGEHLP_SYMBOLW64
179 #define PIMAGEHLP_SYMBOL PIMAGEHLP_SYMBOL64
180 #define PIMAGEHLP_SYMBOLW PIMAGEHLP_SYMBOLW64
181 #else
182 typedef struct _IMAGEHLP_SYMBOL
183 {
184 DWORD SizeOfStruct;
185 DWORD Address;
186 DWORD Size;
187 DWORD Flags;
188 DWORD MaxNameLength;
189 CHAR Name[1];
190 } IMAGEHLP_SYMBOL, *PIMAGEHLP_SYMBOL;
191
192 typedef struct _IMAGEHLP_SYMBOLW
193 {
194 DWORD SizeOfStruct;
195 DWORD Address;
196 DWORD Size;
197 DWORD Flags;
198 DWORD MaxNameLength;
199 WCHAR Name[1];
200 } IMAGEHLP_SYMBOLW, *PIMAGEHLP_SYMBOLW;
201 #endif
202
203 typedef struct _IMAGEHLP_SYMBOL64
204 {
205 DWORD SizeOfStruct;
206 DWORD64 Address;
207 DWORD Size;
208 DWORD Flags;
209 DWORD MaxNameLength;
210 CHAR Name[1];
211 } IMAGEHLP_SYMBOL64, *PIMAGEHLP_SYMBOL64;
212
213 typedef struct _IMAGEHLP_SYMBOLW64
214 {
215 DWORD SizeOfStruct;
216 DWORD64 Address;
217 DWORD Size;
218 DWORD Flags;
219 DWORD MaxNameLength;
220 WCHAR Name[1];
221 } IMAGEHLP_SYMBOLW64, *PIMAGEHLP_SYMBOLW64;
222
223 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
224 #define IMAGEHLP_MODULE IMAGEHLP_MODULE64
225 #define PIMAGEHLP_MODULE PIMAGEHLP_MODULE64
226 #define IMAGEHLP_MODULEW IMAGEHLP_MODULEW64
227 #define PIMAGEHLP_MODULEW PIMAGEHLP_MODULEW64
228 #else
229 typedef struct _IMAGEHLP_MODULE
230 {
231 DWORD SizeOfStruct;
232 DWORD BaseOfImage;
233 DWORD ImageSize;
234 DWORD TimeDateStamp;
235 DWORD CheckSum;
236 DWORD NumSyms;
237 SYM_TYPE SymType;
238 CHAR ModuleName[32];
239 CHAR ImageName[256];
240 CHAR LoadedImageName[256];
241 } IMAGEHLP_MODULE, *PIMAGEHLP_MODULE;
242
243 typedef struct _IMAGEHLP_MODULEW
244 {
245 DWORD SizeOfStruct;
246 DWORD BaseOfImage;
247 DWORD ImageSize;
248 DWORD TimeDateStamp;
249 DWORD CheckSum;
250 DWORD NumSyms;
251 SYM_TYPE SymType;
252 WCHAR ModuleName[32];
253 WCHAR ImageName[256];
254 WCHAR LoadedImageName[256];
255 } IMAGEHLP_MODULEW, *PIMAGEHLP_MODULEW;
256 #endif
257
258 typedef struct _IMAGEHLP_MODULE64
259 {
260 DWORD SizeOfStruct;
261 DWORD64 BaseOfImage;
262 DWORD ImageSize;
263 DWORD TimeDateStamp;
264 DWORD CheckSum;
265 DWORD NumSyms;
266 SYM_TYPE SymType;
267 CHAR ModuleName[32];
268 CHAR ImageName[256];
269 CHAR LoadedImageName[256];
270 CHAR LoadedPdbName[256];
271 DWORD CVSig;
272 CHAR CVData[MAX_PATH*3];
273 DWORD PdbSig;
274 GUID PdbSig70;
275 DWORD PdbAge;
276 BOOL PdbUnmatched;
277 BOOL DbgUnmatched;
278 BOOL LineNumbers;
279 BOOL GlobalSymbols;
280 BOOL TypeInfo;
281 BOOL SourceIndexed;
282 BOOL Publics;
283 } IMAGEHLP_MODULE64, *PIMAGEHLP_MODULE64;
284
285 typedef struct _IMAGEHLP_MODULEW64
286 {
287 DWORD SizeOfStruct;
288 DWORD64 BaseOfImage;
289 DWORD ImageSize;
290 DWORD TimeDateStamp;
291 DWORD CheckSum;
292 DWORD NumSyms;
293 SYM_TYPE SymType;
294 WCHAR ModuleName[32];
295 WCHAR ImageName[256];
296 WCHAR LoadedImageName[256];
297 WCHAR LoadedPdbName[256];
298 DWORD CVSig;
299 WCHAR CVData[MAX_PATH*3];
300 DWORD PdbSig;
301 GUID PdbSig70;
302 DWORD PdbAge;
303 BOOL PdbUnmatched;
304 BOOL DbgUnmatched;
305 BOOL LineNumbers;
306 BOOL GlobalSymbols;
307 BOOL TypeInfo;
308 BOOL SourceIndexed;
309 BOOL Publics;
310 } IMAGEHLP_MODULEW64, *PIMAGEHLP_MODULEW64;
311
312 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
313 #define IMAGEHLP_LINE IMAGEHLP_LINE64
314 #define PIMAGEHLP_LINE PIMAGEHLP_LINE64
315 #define IMAGEHLP_LINEW IMAGEHLP_LINEW64
316 #define PIMAGEHLP_LINEW PIMAGEHLP_LINEW64
317 #else
318 typedef struct _IMAGEHLP_LINE
319 {
320 DWORD SizeOfStruct;
321 PVOID Key;
322 DWORD LineNumber;
323 PCHAR FileName;
324 DWORD Address;
325 } IMAGEHLP_LINE, *PIMAGEHLP_LINE;
326
327 typedef struct _IMAGEHLP_LINEW
328 {
329 DWORD SizeOfStruct;
330 PVOID Key;
331 DWORD LineNumber;
332 PWSTR FileName;
333 DWORD Address;
334 } IMAGEHLP_LINEW, *PIMAGEHLP_LINEW;
335 #endif
336
337 typedef struct _IMAGEHLP_LINE64
338 {
339 DWORD SizeOfStruct;
340 PVOID Key;
341 DWORD LineNumber;
342 PCHAR FileName;
343 DWORD64 Address;
344 } IMAGEHLP_LINE64, *PIMAGEHLP_LINE64;
345
346 typedef struct _IMAGEHLP_LINEW64
347 {
348 DWORD SizeOfStruct;
349 PVOID Key;
350 DWORD LineNumber;
351 PWSTR FileName;
352 DWORD64 Address;
353 } IMAGEHLP_LINEW64, *PIMAGEHLP_LINEW64;
354
355 typedef struct _SOURCEFILE
356 {
357 DWORD64 ModBase;
358 PCHAR FileName;
359 } SOURCEFILE, *PSOURCEFILE;
360
361 typedef struct _SOURCEFILEW
362 {
363 DWORD64 ModBase;
364 PWSTR FileName;
365 } SOURCEFILEW, *PSOURCEFILEW;
366
367 #define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001
368 #define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002
369 #define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003
370 #define CBA_SYMBOLS_UNLOADED 0x00000004
371 #define CBA_DUPLICATE_SYMBOL 0x00000005
372 #define CBA_READ_MEMORY 0x00000006
373 #define CBA_DEFERRED_SYMBOL_LOAD_CANCEL 0x00000007
374 #define CBA_SET_OPTIONS 0x00000008
375 #define CBA_EVENT 0x00000010
376 #define CBA_DEFERRED_SYMBOL_LOAD_PARTIAL 0x00000020
377 #define CBA_DEBUG_INFO 0x10000000
378
379 typedef struct _IMAGEHLP_CBA_READ_MEMORY
380 {
381 DWORD64 addr;
382 PVOID buf;
383 DWORD bytes;
384 DWORD *bytesread;
385 } IMAGEHLP_CBA_READ_MEMORY, *PIMAGEHLP_CBA_READ_MEMORY;
386
387 enum
388 {
389 sevInfo = 0,
390 sevProblem,
391 sevAttn,
392 sevFatal,
393 sevMax
394 };
395
396 #define EVENT_SRCSPEW_START 100
397 #define EVENT_SRCSPEW 100
398 #define EVENT_SRCSPEW_END 199
399
400 typedef struct _IMAGEHLP_CBA_EVENT
401 {
402 DWORD severity;
403 DWORD code;
404 PCHAR desc;
405 PVOID object;
406 } IMAGEHLP_CBA_EVENT, *PIMAGEHLP_CBA_EVENT;
407
408 typedef struct _IMAGEHLP_CBA_EVENTW
409 {
410 DWORD severity;
411 DWORD code;
412 PCWSTR desc;
413 PVOID object;
414 } IMAGEHLP_CBA_EVENTW, *PIMAGEHLP_CBA_EVENTW;
415
416 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
417 #define IMAGEHLP_DEFERRED_SYMBOL_LOAD IMAGEHLP_DEFERRED_SYMBOL_LOAD64
418 #define PIMAGEHLP_DEFERRED_SYMBOL_LOAD PIMAGEHLP_DEFERRED_SYMBOL_LOAD64
419 #else
420 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD
421 {
422 DWORD SizeOfStruct;
423 DWORD BaseOfImage;
424 DWORD CheckSum;
425 DWORD TimeDateStamp;
426 CHAR FileName[MAX_PATH];
427 BOOLEAN Reparse;
428 HANDLE hFile;
429 } IMAGEHLP_DEFERRED_SYMBOL_LOAD, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
430 #endif
431
432 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD64
433 {
434 DWORD SizeOfStruct;
435 DWORD64 BaseOfImage;
436 DWORD CheckSum;
437 DWORD TimeDateStamp;
438 CHAR FileName[MAX_PATH];
439 BOOLEAN Reparse;
440 HANDLE hFile;
441 DWORD Flags;
442 } IMAGEHLP_DEFERRED_SYMBOL_LOAD64, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD64;
443
444 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOADW64
445 {
446 DWORD SizeOfStruct;
447 DWORD64 BaseOfImage;
448 DWORD CheckSum;
449 DWORD TimeDateStamp;
450 WCHAR FileName[MAX_PATH + 1];
451 BOOLEAN Reparse;
452 HANDLE hFile;
453 DWORD Flags;
454 } IMAGEHLP_DEFERRED_SYMBOL_LOADW64, *PIMAGEHLP_DEFERRED_SYMBOL_LOADW64;
455
456 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
457 #define IMAGEHLP_DUPLICATE_SYMBOL IMAGEHLP_DUPLICATE_SYMBOL64
458 #define PIMAGEHLP_DUPLICATE_SYMBOL PIMAGEHLP_DUPLICATE_SYMBOL64
459 #else
460 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL
461 {
462 DWORD SizeOfStruct;
463 DWORD NumberOfDups;
464 PIMAGEHLP_SYMBOL Symbol;
465 DWORD SelectedSymbol;
466 } IMAGEHLP_DUPLICATE_SYMBOL, *PIMAGEHLP_DUPLICATE_SYMBOL;
467 #endif
468
469 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL64
470 {
471 DWORD SizeOfStruct;
472 DWORD NumberOfDups;
473 PIMAGEHLP_SYMBOL64 Symbol;
474 DWORD SelectedSymbol;
475 } IMAGEHLP_DUPLICATE_SYMBOL64, *PIMAGEHLP_DUPLICATE_SYMBOL64;
476
477 #define SYMOPT_CASE_INSENSITIVE 0x00000001
478 #define SYMOPT_UNDNAME 0x00000002
479 #define SYMOPT_DEFERRED_LOADS 0x00000004
480 #define SYMOPT_NO_CPP 0x00000008
481 #define SYMOPT_LOAD_LINES 0x00000010
482 #define SYMOPT_OMAP_FIND_NEAREST 0x00000020
483 #define SYMOPT_LOAD_ANYTHING 0x00000040
484 #define SYMOPT_IGNORE_CVREC 0x00000080
485 #define SYMOPT_NO_UNQUALIFIED_LOADS 0x00000100
486 #define SYMOPT_FAIL_CRITICAL_ERRORS 0x00000200
487 #define SYMOPT_EXACT_SYMBOLS 0x00000400
488 #define SYMOPT_WILD_UNDERSCORE 0x00000800
489 #define SYMOPT_USE_DEFAULTS 0x00001000
490 #define SYMOPT_ALLOW_ABSOLUTE_SYMBOLS 0x00000800
491 #define SYMOPT_IGNORE_NT_SYMPATH 0x00001000
492 #define SYMOPT_INCLUDE_32BIT_MODULES 0x00002000
493 #define SYMOPT_PUBLICS_ONLY 0x00004000
494 #define SYMOPT_NO_PUBLICS 0x00008000
495 #define SYMOPT_AUTO_PUBLICS 0x00010000
496 #define SYMOPT_NO_IMAGE_SEARCH 0x00020000
497 #define SYMOPT_SECURE 0x00040000
498 #define SYMOPT_NO_PROMPTS 0x00080000
499 #define SYMOPT_OVERWRITE 0x00100000
500 #define SYMOPT_IGNORE_IMAGEDIR 0x00200000
501 #define SYMOPT_FLAT_DIRECTORY 0x00400000
502 #define SYMOPT_FAVOR_COMPRESSED 0x00800000
503 #define SYMOPT_ALLOW_ZERO_ADDRESS 0x01000000
504 #define SYMOPT_DISABLE_SYMSRV_AUTODETECT 0x02000000
505 #define SYMOPT_READONLY_CACHE 0x04000000
506 #define SYMOPT_SYMPATH_LAST 0x08000000
507 #define SYMOPT_DEBUG 0x80000000
508
509 typedef struct _IMAGEHLP_STACK_FRAME
510 {
511 ULONG64 InstructionOffset;
512 ULONG64 ReturnOffset;
513 ULONG64 FrameOffset;
514 ULONG64 StackOffset;
515 ULONG64 BackingStoreOffset;
516 ULONG64 FuncTableEntry;
517 ULONG64 Params[4];
518 ULONG64 Reserved[5];
519 BOOL Virtual;
520 ULONG Reserved2;
521 } IMAGEHLP_STACK_FRAME, *PIMAGEHLP_STACK_FRAME;
522
523 typedef VOID IMAGEHLP_CONTEXT, *PIMAGEHLP_CONTEXT;
524
525 #define DBHHEADER_DEBUGDIRS 0x1
526 typedef struct _DBGHELP_MODLOAD_DATA
527 {
528 DWORD ssize;
529 DWORD ssig;
530 PVOID data;
531 DWORD size;
532 DWORD flags;
533 } MODLOAD_DATA, *PMODLOAD_DATA;
534
535 /*************************
536 * MiniDUMP *
537 *************************/
538
539 #include <pshpack4.h>
540 /* DebugHelp */
541
542 #define MINIDUMP_SIGNATURE 0x504D444D /* 'MDMP' */
543 #define MINIDUMP_VERSION (42899)
544
545 typedef DWORD RVA;
546 typedef ULONG64 RVA64;
547
548 typedef enum _MINIDUMP_TYPE
549 {
550 MiniDumpNormal = 0x0000,
551 MiniDumpWithDataSegs = 0x0001,
552 MiniDumpWithFullMemory = 0x0002,
553 MiniDumpWithHandleData = 0x0004,
554 MiniDumpFilterMemory = 0x0008,
555 MiniDumpScanMemory = 0x0010,
556 MiniDumpWithUnloadedModules = 0x0020,
557 MiniDumpWithIndirectlyReferencedMemory = 0x0040,
558 MiniDumpFilterModulePaths = 0x0080,
559 MiniDumpWithProcessThreadData = 0x0100,
560 MiniDumpWithPrivateReadWriteMemory = 0x0200,
561 MiniDumpWithoutOptionalData = 0x0400,
562 MiniDumpWithFullMemoryInfo = 0x0800,
563 MiniDumpWithThreadInfo = 0x1000,
564 MiniDumpWithCodeSegs = 0x2000
565 } MINIDUMP_TYPE;
566
567 typedef enum _MINIDUMP_CALLBACK_TYPE
568 {
569 ModuleCallback,
570 ThreadCallback,
571 ThreadExCallback,
572 IncludeThreadCallback,
573 IncludeModuleCallback,
574 MemoryCallback,
575 } MINIDUMP_CALLBACK_TYPE;
576
577 typedef struct _MINIDUMP_THREAD_CALLBACK
578 {
579 ULONG ThreadId;
580 HANDLE ThreadHandle;
581 CONTEXT Context;
582 ULONG SizeOfContext;
583 ULONG64 StackBase;
584 ULONG64 StackEnd;
585 } MINIDUMP_THREAD_CALLBACK, *PMINIDUMP_THREAD_CALLBACK;
586
587 typedef struct _MINIDUMP_THREAD_EX_CALLBACK
588 {
589 ULONG ThreadId;
590 HANDLE ThreadHandle;
591 CONTEXT Context;
592 ULONG SizeOfContext;
593 ULONG64 StackBase;
594 ULONG64 StackEnd;
595 ULONG64 BackingStoreBase;
596 ULONG64 BackingStoreEnd;
597 } MINIDUMP_THREAD_EX_CALLBACK, *PMINIDUMP_THREAD_EX_CALLBACK;
598
599 typedef struct _MINIDUMP_INCLUDE_THREAD_CALLBACK
600 {
601 ULONG ThreadId;
602 } MINIDUMP_INCLUDE_THREAD_CALLBACK, *PMINIDUMP_INCLUDE_THREAD_CALLBACK;
603
604 typedef enum _THREAD_WRITE_FLAGS
605 {
606 ThreadWriteThread = 0x0001,
607 ThreadWriteStack = 0x0002,
608 ThreadWriteContext = 0x0004,
609 ThreadWriteBackingStore = 0x0008,
610 ThreadWriteInstructionWindow = 0x0010,
611 ThreadWriteThreadData = 0x0020,
612 ThreadWriteThreadInfo = 0x0040
613 } THREAD_WRITE_FLAGS;
614
615 typedef struct _MINIDUMP_MODULE_CALLBACK
616 {
617 PWCHAR FullPath;
618 ULONG64 BaseOfImage;
619 ULONG SizeOfImage;
620 ULONG CheckSum;
621 ULONG TimeDateStamp;
622 VS_FIXEDFILEINFO VersionInfo;
623 PVOID CvRecord;
624 ULONG SizeOfCvRecord;
625 PVOID MiscRecord;
626 ULONG SizeOfMiscRecord;
627 } MINIDUMP_MODULE_CALLBACK, *PMINIDUMP_MODULE_CALLBACK;
628
629 typedef struct _MINIDUMP_INCLUDE_MODULE_CALLBACK
630 {
631 ULONG64 BaseOfImage;
632 } MINIDUMP_INCLUDE_MODULE_CALLBACK, *PMINIDUMP_INCLUDE_MODULE_CALLBACK;
633
634 typedef enum _MODULE_WRITE_FLAGS
635 {
636 ModuleWriteModule = 0x0001,
637 ModuleWriteDataSeg = 0x0002,
638 ModuleWriteMiscRecord = 0x0004,
639 ModuleWriteCvRecord = 0x0008,
640 ModuleReferencedByMemory = 0x0010,
641 ModuleWriteTlsData = 0x0020,
642 ModuleWriteCodeSegs = 0x0040,
643 } MODULE_WRITE_FLAGS;
644
645 typedef struct _MINIDUMP_CALLBACK_INPUT
646 {
647 ULONG ProcessId;
648 HANDLE ProcessHandle;
649 ULONG CallbackType;
650 union
651 {
652 MINIDUMP_THREAD_CALLBACK Thread;
653 MINIDUMP_THREAD_EX_CALLBACK ThreadEx;
654 MINIDUMP_MODULE_CALLBACK Module;
655 MINIDUMP_INCLUDE_THREAD_CALLBACK IncludeThread;
656 MINIDUMP_INCLUDE_MODULE_CALLBACK IncludeModule;
657 } DUMMYUNIONNAME;
658 } MINIDUMP_CALLBACK_INPUT, *PMINIDUMP_CALLBACK_INPUT;
659
660 typedef struct _MINIDUMP_CALLBACK_OUTPUT
661 {
662 union
663 {
664 ULONG ModuleWriteFlags;
665 ULONG ThreadWriteFlags;
666 struct
667 {
668 ULONG64 MemoryBase;
669 ULONG MemorySize;
670 } DUMMYSTRUCTNAME;
671 } DUMMYUNIONNAME;
672 } MINIDUMP_CALLBACK_OUTPUT, *PMINIDUMP_CALLBACK_OUTPUT;
673
674 typedef BOOL
675 (WINAPI* MINIDUMP_CALLBACK_ROUTINE)(
676 _Inout_ PVOID,
677 _In_ const PMINIDUMP_CALLBACK_INPUT,
678 _Inout_ PMINIDUMP_CALLBACK_OUTPUT);
679
680 typedef struct _MINIDUMP_CALLBACK_INFORMATION
681 {
682 MINIDUMP_CALLBACK_ROUTINE CallbackRoutine;
683 void* CallbackParam;
684 } MINIDUMP_CALLBACK_INFORMATION, *PMINIDUMP_CALLBACK_INFORMATION;
685
686 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR
687 {
688 ULONG DataSize;
689 RVA Rva;
690 } MINIDUMP_LOCATION_DESCRIPTOR;
691
692 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR64
693 {
694 ULONG64 DataSize;
695 RVA64 Rva;
696 } MINIDUMP_LOCATION_DESCRIPTOR64;
697
698 typedef struct _MINIDUMP_DIRECTORY
699 {
700 ULONG StreamType;
701 MINIDUMP_LOCATION_DESCRIPTOR Location;
702 } MINIDUMP_DIRECTORY, *PMINIDUMP_DIRECTORY;
703
704 typedef struct _MINIDUMP_EXCEPTION
705 {
706 ULONG ExceptionCode;
707 ULONG ExceptionFlags;
708 ULONG64 ExceptionRecord;
709 ULONG64 ExceptionAddress;
710 ULONG NumberParameters;
711 ULONG __unusedAlignment;
712 ULONG64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
713 } MINIDUMP_EXCEPTION, *PMINIDUMP_EXCEPTION;
714
715 typedef struct _MINIDUMP_EXCEPTION_INFORMATION
716 {
717 DWORD ThreadId;
718 PEXCEPTION_POINTERS ExceptionPointers;
719 BOOL ClientPointers;
720 } MINIDUMP_EXCEPTION_INFORMATION, *PMINIDUMP_EXCEPTION_INFORMATION;
721
722 typedef struct MINIDUMP_EXCEPTION_STREAM
723 {
724 ULONG ThreadId;
725 ULONG __alignment;
726 MINIDUMP_EXCEPTION ExceptionRecord;
727 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
728 } MINIDUMP_EXCEPTION_STREAM, *PMINIDUMP_EXCEPTION_STREAM;
729
730 typedef struct _MINIDUMP_HEADER
731 {
732 DWORD Signature;
733 DWORD Version;
734 DWORD NumberOfStreams;
735 RVA StreamDirectoryRva;
736 DWORD CheckSum;
737 union
738 {
739 DWORD Reserved;
740 DWORD TimeDateStamp;
741 } DUMMYUNIONNAME;
742 ULONG64 Flags;
743 } MINIDUMP_HEADER, *PMINIDUMP_HEADER;
744
745 typedef struct _MINIDUMP_MEMORY_DESCRIPTOR
746 {
747 ULONG64 StartOfMemoryRange;
748 MINIDUMP_LOCATION_DESCRIPTOR Memory;
749 } MINIDUMP_MEMORY_DESCRIPTOR, *PMINIDUMP_MEMORY_DESCRIPTOR;
750
751 typedef struct _MINIDUMP_MEMORY_LIST
752 {
753 ULONG NumberOfMemoryRanges;
754 MINIDUMP_MEMORY_DESCRIPTOR MemoryRanges[1]; /* FIXME: 0-sized array not supported */
755 } MINIDUMP_MEMORY_LIST, *PMINIDUMP_MEMORY_LIST;
756
757 #define MINIDUMP_MISC1_PROCESS_ID 0x00000001
758 #define MINIDUMP_MISC1_PROCESS_TIMES 0x00000002
759
760 typedef struct _MINIDUMP_MISC_INFO
761 {
762 ULONG SizeOfInfo;
763 ULONG Flags1;
764 ULONG ProcessId;
765 ULONG ProcessCreateTime;
766 ULONG ProcessUserTime;
767 ULONG ProcessKernelTime;
768 } MINIDUMP_MISC_INFO, *PMINIDUMP_MISC_INFO;
769
770 typedef struct _MINIDUMP_MODULE
771 {
772 ULONG64 BaseOfImage;
773 ULONG SizeOfImage;
774 ULONG CheckSum;
775 ULONG TimeDateStamp;
776 RVA ModuleNameRva;
777 VS_FIXEDFILEINFO VersionInfo;
778 MINIDUMP_LOCATION_DESCRIPTOR CvRecord;
779 MINIDUMP_LOCATION_DESCRIPTOR MiscRecord;
780 ULONG64 Reserved0;
781 ULONG64 Reserved1;
782 } MINIDUMP_MODULE, *PMINIDUMP_MODULE;
783
784 typedef struct _MINIDUMP_MODULE_LIST
785 {
786 ULONG NumberOfModules;
787 MINIDUMP_MODULE Modules[1]; /* FIXME: 0-sized array not supported */
788 } MINIDUMP_MODULE_LIST, *PMINIDUMP_MODULE_LIST;
789
790 typedef struct _MINIDUMP_STRING
791 {
792 ULONG Length;
793 WCHAR Buffer[1]; /* FIXME: O-sized array not supported */
794 } MINIDUMP_STRING, *PMINIDUMP_STRING;
795
796 typedef struct _MINIDUMP_SYSTEM_INFO
797 {
798 USHORT ProcessorArchitecture;
799 USHORT ProcessorLevel;
800 USHORT ProcessorRevision;
801 union
802 {
803 USHORT Reserved0;
804 struct
805 {
806 UCHAR NumberOfProcessors;
807 UCHAR ProductType;
808 } DUMMYSTRUCTNAME;
809 } DUMMYUNIONNAME;
810
811 ULONG MajorVersion;
812 ULONG MinorVersion;
813 ULONG BuildNumber;
814 ULONG PlatformId;
815
816 RVA CSDVersionRva;
817 union
818 {
819 ULONG Reserved1;
820 struct
821 {
822 USHORT SuiteMask;
823 USHORT Reserved2;
824 } DUMMYSTRUCTNAME;
825 } DUMMYUNIONNAME1;
826 union _CPU_INFORMATION
827 {
828 struct
829 {
830 ULONG VendorId[3];
831 ULONG VersionInformation;
832 ULONG FeatureInformation;
833 ULONG AMDExtendedCpuFeatures;
834 } X86CpuInfo;
835 struct
836 {
837 ULONG64 ProcessorFeatures[2];
838 } OtherCpuInfo;
839 } Cpu;
840
841 } MINIDUMP_SYSTEM_INFO, *PMINIDUMP_SYSTEM_INFO;
842
843 typedef struct _MINIDUMP_THREAD
844 {
845 ULONG ThreadId;
846 ULONG SuspendCount;
847 ULONG PriorityClass;
848 ULONG Priority;
849 ULONG64 Teb;
850 MINIDUMP_MEMORY_DESCRIPTOR Stack;
851 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
852 } MINIDUMP_THREAD, *PMINIDUMP_THREAD;
853
854 typedef struct _MINIDUMP_THREAD_LIST
855 {
856 ULONG NumberOfThreads;
857 MINIDUMP_THREAD Threads[1]; /* FIXME: no support of 0 sized array */
858 } MINIDUMP_THREAD_LIST, *PMINIDUMP_THREAD_LIST;
859
860 typedef struct _MINIDUMP_USER_STREAM
861 {
862 ULONG Type;
863 ULONG BufferSize;
864 void* Buffer;
865 } MINIDUMP_USER_STREAM, *PMINIDUMP_USER_STREAM;
866
867 typedef struct _MINIDUMP_USER_STREAM_INFORMATION
868 {
869 ULONG UserStreamCount;
870 PMINIDUMP_USER_STREAM UserStreamArray;
871 } MINIDUMP_USER_STREAM_INFORMATION, *PMINIDUMP_USER_STREAM_INFORMATION;
872
873 typedef enum _MINIDUMP_STREAM_TYPE
874 {
875 UnusedStream = 0,
876 ReservedStream0 = 1,
877 ReservedStream1 = 2,
878 ThreadListStream = 3,
879 ModuleListStream = 4,
880 MemoryListStream = 5,
881 ExceptionStream = 6,
882 SystemInfoStream = 7,
883 ThreadExListStream = 8,
884 Memory64ListStream = 9,
885 CommentStreamA = 10,
886 CommentStreamW = 11,
887 HandleDataStream = 12,
888 FunctionTableStream = 13,
889 UnloadedModuleListStream = 14,
890 MiscInfoStream = 15,
891 MemoryInfoListStream = 16,
892 ThreadInfoListStream = 17,
893
894 LastReservedStream = 0xffff
895 } MINIDUMP_STREAM_TYPE;
896
897 BOOL
898 WINAPI
899 MiniDumpWriteDump(
900 _In_ HANDLE,
901 _In_ DWORD,
902 _In_ HANDLE,
903 _In_ MINIDUMP_TYPE,
904 _In_opt_ const PMINIDUMP_EXCEPTION_INFORMATION,
905 _In_opt_ const PMINIDUMP_USER_STREAM_INFORMATION,
906 _In_opt_ const PMINIDUMP_CALLBACK_INFORMATION);
907
908 BOOL
909 WINAPI
910 MiniDumpReadDumpStream(
911 _In_ PVOID,
912 _In_ ULONG,
913 _Outptr_result_maybenull_ PMINIDUMP_DIRECTORY*,
914 _Outptr_result_maybenull_ PVOID*,
915 _Out_opt_ ULONG*);
916
917 #include <poppack.h>
918
919 /*************************
920 * MODULE handling *
921 *************************/
922
923 /* flags for SymLoadModuleEx */
924 #define SLMFLAG_VIRTUAL 0x1
925 #define SLMFLAG_NO_SYMBOLS 0x4
926
927 typedef BOOL
928 (CALLBACK *PENUMLOADED_MODULES_CALLBACK64)(
929 _In_ PCSTR,
930 _In_ DWORD64,
931 _In_ ULONG,
932 _In_opt_ PVOID);
933
934 BOOL
935 WINAPI
936 EnumerateLoadedModules64(
937 _In_ HANDLE,
938 _In_ PENUMLOADED_MODULES_CALLBACK64,
939 _In_opt_ PVOID);
940
941 typedef BOOL
942 (CALLBACK *PENUMLOADED_MODULES_CALLBACKW64)(
943 _In_ PCWSTR,
944 _In_ DWORD64,
945 _In_ ULONG,
946 _In_opt_ PVOID);
947
948 BOOL
949 WINAPI
950 EnumerateLoadedModulesW64(
951 _In_ HANDLE,
952 _In_ PENUMLOADED_MODULES_CALLBACKW64,
953 _In_opt_ PVOID);
954
955 typedef BOOL
956 (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(
957 _In_ PCSTR,
958 _In_ DWORD64,
959 _In_opt_ PVOID);
960
961 BOOL
962 WINAPI
963 SymEnumerateModules64(
964 _In_ HANDLE,
965 _In_ PSYM_ENUMMODULES_CALLBACK64,
966 _In_opt_ PVOID);
967
968 typedef BOOL
969 (CALLBACK *PSYM_ENUMMODULES_CALLBACKW64)(
970 _In_ PCWSTR,
971 _In_ DWORD64,
972 _In_opt_ PVOID);
973
974 BOOL
975 WINAPI
976 SymEnumerateModulesW64(
977 _In_ HANDLE,
978 _In_ PSYM_ENUMMODULES_CALLBACKW64,
979 _In_opt_ PVOID);
980
981 BOOL
982 WINAPI
983 SymGetModuleInfo64(
984 _In_ HANDLE,
985 _In_ DWORD64,
986 _Out_ PIMAGEHLP_MODULE64);
987
988 BOOL
989 WINAPI
990 SymGetModuleInfoW64(
991 _In_ HANDLE,
992 _In_ DWORD64,
993 _Out_ PIMAGEHLP_MODULEW64);
994
995 DWORD64 WINAPI SymGetModuleBase64(_In_ HANDLE, _In_ DWORD64);
996
997 DWORD64
998 WINAPI
999 SymLoadModule64(
1000 _In_ HANDLE,
1001 _In_opt_ HANDLE,
1002 _In_opt_ PCSTR,
1003 _In_opt_ PCSTR,
1004 _In_ DWORD64,
1005 _In_ DWORD);
1006
1007 DWORD64
1008 WINAPI
1009 SymLoadModuleEx(
1010 _In_ HANDLE,
1011 _In_opt_ HANDLE,
1012 _In_opt_ PCSTR,
1013 _In_opt_ PCSTR,
1014 _In_ DWORD64,
1015 _In_ DWORD,
1016 _In_opt_ PMODLOAD_DATA,
1017 _In_opt_ DWORD);
1018
1019 DWORD64
1020 WINAPI
1021 SymLoadModuleExW(
1022 _In_ HANDLE,
1023 _In_opt_ HANDLE,
1024 _In_opt_ PCWSTR,
1025 _In_opt_ PCWSTR,
1026 _In_ DWORD64,
1027 _In_ DWORD,
1028 _In_opt_ PMODLOAD_DATA,
1029 _In_opt_ DWORD);
1030
1031 BOOL WINAPI SymUnloadModule64(_In_ HANDLE, _In_ DWORD64);
1032
1033 /*************************
1034 * Symbol Handling *
1035 *************************/
1036
1037 #define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
1038 #define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER /* 0x08 */
1039 #define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL /* 0x10 */
1040 #define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL /* 0x20 */
1041 #define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER /* 0x40 */
1042 #define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL /* 0x80 */
1043 #define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT /* 0x100 */
1044 #define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION /* 0x800 */
1045
1046 #define SYMFLAG_VALUEPRESENT 0x00000001
1047 #define SYMFLAG_REGISTER 0x00000008
1048 #define SYMFLAG_REGREL 0x00000010
1049 #define SYMFLAG_FRAMEREL 0x00000020
1050 #define SYMFLAG_PARAMETER 0x00000040
1051 #define SYMFLAG_LOCAL 0x00000080
1052 #define SYMFLAG_CONSTANT 0x00000100
1053 #define SYMFLAG_EXPORT 0x00000200
1054 #define SYMFLAG_FORWARDER 0x00000400
1055 #define SYMFLAG_FUNCTION 0x00000800
1056 #define SYMFLAG_VIRTUAL 0x00001000
1057 #define SYMFLAG_THUNK 0x00002000
1058 #define SYMFLAG_TLSREL 0x00004000
1059 #define SYMFLAG_SLOT 0x00008000
1060
1061 #define MAX_SYM_NAME 2000
1062
1063 typedef struct _SYMBOL_INFO
1064 {
1065 ULONG SizeOfStruct;
1066 ULONG TypeIndex;
1067 ULONG64 Reserved[2];
1068 union {
1069 ULONG info; /* wrong, but wine needs it */
1070 ULONG Index;
1071 };
1072 ULONG Size;
1073 ULONG64 ModBase;
1074 ULONG Flags;
1075 ULONG64 Value;
1076 ULONG64 Address;
1077 ULONG Register;
1078 ULONG Scope;
1079 ULONG Tag;
1080 ULONG NameLen;
1081 ULONG MaxNameLen;
1082 CHAR Name[1];
1083 } SYMBOL_INFO, *PSYMBOL_INFO;
1084
1085 typedef struct _SYMBOL_INFOW
1086 {
1087 ULONG SizeOfStruct;
1088 ULONG TypeIndex;
1089 ULONG64 Reserved[2];
1090 ULONG Index;
1091 ULONG Size;
1092 ULONG64 ModBase;
1093 ULONG Flags;
1094 ULONG64 Value;
1095 ULONG64 Address;
1096 ULONG Register;
1097 ULONG Scope;
1098 ULONG Tag;
1099 ULONG NameLen;
1100 ULONG MaxNameLen;
1101 WCHAR Name[1];
1102 } SYMBOL_INFOW, *PSYMBOL_INFOW;
1103
1104 typedef struct _SYMBOL_INFO_PACKAGE
1105 {
1106 SYMBOL_INFO si;
1107 CHAR name[MAX_SYM_NAME+1];
1108 } SYMBOL_INFO_PACKAGE, *PSYMBOL_INFO_PACKAGE;
1109
1110 typedef struct _SYMBOL_INFO_PACKAGEW
1111 {
1112 SYMBOL_INFOW si;
1113 WCHAR name[MAX_SYM_NAME+1];
1114 } SYMBOL_INFO_PACKAGEW, *PSYMBOL_INFO_PACKAGEW;
1115
1116 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO
1117 {
1118 TI_GET_SYMTAG,
1119 TI_GET_SYMNAME,
1120 TI_GET_LENGTH,
1121 TI_GET_TYPE,
1122 TI_GET_TYPEID,
1123 TI_GET_BASETYPE,
1124 TI_GET_ARRAYINDEXTYPEID,
1125 TI_FINDCHILDREN,
1126 TI_GET_DATAKIND,
1127 TI_GET_ADDRESSOFFSET,
1128 TI_GET_OFFSET,
1129 TI_GET_VALUE,
1130 TI_GET_COUNT,
1131 TI_GET_CHILDRENCOUNT,
1132 TI_GET_BITPOSITION,
1133 TI_GET_VIRTUALBASECLASS,
1134 TI_GET_VIRTUALTABLESHAPEID,
1135 TI_GET_VIRTUALBASEPOINTEROFFSET,
1136 TI_GET_CLASSPARENTID,
1137 TI_GET_NESTED,
1138 TI_GET_SYMINDEX,
1139 TI_GET_LEXICALPARENT,
1140 TI_GET_ADDRESS,
1141 TI_GET_THISADJUST,
1142 TI_GET_UDTKIND,
1143 TI_IS_EQUIV_TO,
1144 TI_GET_CALLING_CONVENTION,
1145 } IMAGEHLP_SYMBOL_TYPE_INFO;
1146
1147 #define IMAGEHLP_GET_TYPE_INFO_UNCACHED 0x00000001
1148 #define IMAGEHLP_GET_TYPE_INFO_CHILDREN 0x00000002
1149 typedef struct _IMAGEHLP_GET_TYPE_INFO_PARAMS
1150 {
1151 ULONG SizeOfStruct;
1152 ULONG Flags;
1153 ULONG NumIds;
1154 PULONG TypeIds;
1155 ULONG64 TagFilter;
1156 ULONG NumReqs;
1157 IMAGEHLP_SYMBOL_TYPE_INFO* ReqKinds;
1158 PULONG_PTR ReqOffsets;
1159 PULONG ReqSizes;
1160 ULONG_PTR ReqStride;
1161 ULONG_PTR BufferSize;
1162 PVOID Buffer;
1163 ULONG EntriesMatched;
1164 ULONG EntriesFilled;
1165 ULONG64 TagsFound;
1166 ULONG64 AllReqsValid;
1167 ULONG NumReqsValid;
1168 PULONG64 ReqsValid;
1169 } IMAGEHLP_GET_TYPE_INFO_PARAMS, *PIMAGEHLP_GET_TYPE_INFO_PARAMS;
1170
1171 typedef struct _TI_FINDCHILDREN_PARAMS
1172 {
1173 ULONG Count;
1174 ULONG Start;
1175 ULONG ChildId[1];
1176 } TI_FINDCHILDREN_PARAMS;
1177
1178 #define UNDNAME_COMPLETE (0x0000)
1179 #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001)
1180 #define UNDNAME_NO_MS_KEYWORDS (0x0002)
1181 #define UNDNAME_NO_FUNCTION_RETURNS (0x0004)
1182 #define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
1183 #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
1184 #define UNDNAME_NO_MS_THISTYPE (0x0020)
1185 #define UNDNAME_NO_CV_THISTYPE (0x0040)
1186 #define UNDNAME_NO_THISTYPE (0x0060)
1187 #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080)
1188 #define UNDNAME_NO_THROW_SIGNATURES (0x0100)
1189 #define UNDNAME_NO_MEMBER_TYPE (0x0200)
1190 #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
1191 #define UNDNAME_32_BIT_DECODE (0x0800)
1192 #define UNDNAME_NAME_ONLY (0x1000)
1193 #define UNDNAME_NO_ARGUMENTS (0x2000)
1194 #define UNDNAME_NO_SPECIAL_SYMS (0x4000)
1195
1196 #define SYMSEARCH_MASKOBJS 0x01
1197 #define SYMSEARCH_RECURSE 0x02
1198 #define SYMSEARCH_GLOBALSONLY 0x04
1199
1200 BOOL
1201 WINAPI
1202 SymGetTypeInfo(
1203 _In_ HANDLE,
1204 _In_ DWORD64,
1205 _In_ ULONG,
1206 _In_ IMAGEHLP_SYMBOL_TYPE_INFO,
1207 _Out_ PVOID);
1208
1209 BOOL
1210 WINAPI
1211 SymGetTypeInfoEx(
1212 _In_ HANDLE,
1213 _In_ DWORD64,
1214 _Inout_ PIMAGEHLP_GET_TYPE_INFO_PARAMS);
1215
1216 typedef BOOL
1217 (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(
1218 _In_ PSYMBOL_INFO,
1219 _In_ ULONG,
1220 _In_opt_ PVOID);
1221
1222 typedef BOOL
1223 (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACKW)(
1224 _In_ PSYMBOL_INFOW,
1225 _In_ ULONG,
1226 _In_opt_ PVOID);
1227
1228 BOOL
1229 WINAPI
1230 SymEnumTypes(
1231 _In_ HANDLE,
1232 _In_ ULONG64,
1233 _In_ PSYM_ENUMERATESYMBOLS_CALLBACK,
1234 _In_opt_ PVOID);
1235
1236 BOOL
1237 WINAPI
1238 SymEnumTypesW(
1239 _In_ HANDLE,
1240 _In_ ULONG64,
1241 _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW,
1242 _In_opt_ PVOID);
1243
1244 BOOL
1245 WINAPI
1246 SymFromAddr(
1247 _In_ HANDLE,
1248 _In_ DWORD64,
1249 _Out_opt_ DWORD64*,
1250 _Inout_ SYMBOL_INFO*);
1251
1252 BOOL
1253 WINAPI
1254 SymFromAddrW(
1255 _In_ HANDLE,
1256 _In_ DWORD64,
1257 _Out_opt_ DWORD64*,
1258 _Inout_ SYMBOL_INFOW*);
1259
1260 BOOL
1261 WINAPI
1262 SymFromToken(
1263 _In_ HANDLE,
1264 _In_ DWORD64,
1265 _In_ DWORD,
1266 _Inout_ PSYMBOL_INFO);
1267
1268 BOOL
1269 WINAPI
1270 SymFromTokenW(
1271 _In_ HANDLE,
1272 _In_ DWORD64,
1273 _In_ DWORD,
1274 _Inout_ PSYMBOL_INFOW);
1275
1276 BOOL WINAPI SymFromName(_In_ HANDLE, _In_ PCSTR, _Inout_ PSYMBOL_INFO);
1277 BOOL WINAPI SymFromNameW(_In_ HANDLE, _In_ PCWSTR, _Inout_ PSYMBOL_INFOW);
1278
1279 BOOL
1280 WINAPI
1281 SymGetSymFromAddr64(
1282 _In_ HANDLE,
1283 _In_ DWORD64,
1284 _Out_opt_ PDWORD64,
1285 _Inout_ PIMAGEHLP_SYMBOL64);
1286
1287 BOOL
1288 WINAPI
1289 SymGetSymFromName64(
1290 _In_ HANDLE,
1291 _In_ PCSTR,
1292 _Inout_ PIMAGEHLP_SYMBOL64);
1293
1294 BOOL
1295 WINAPI
1296 SymGetTypeFromName(
1297 _In_ HANDLE,
1298 _In_ ULONG64,
1299 _In_ PCSTR,
1300 _Inout_ PSYMBOL_INFO);
1301
1302 BOOL
1303 WINAPI
1304 SymGetTypeFromNameW(
1305 _In_ HANDLE,
1306 _In_ ULONG64,
1307 _In_ PCWSTR,
1308 _Inout_ PSYMBOL_INFOW);
1309
1310 BOOL WINAPI SymGetSymNext64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL64);
1311 BOOL WINAPI SymGetSymNextW64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW64);
1312 BOOL WINAPI SymGetSymPrev64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL64);
1313 BOOL WINAPI SymGetSymPrevW64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW64);
1314
1315 BOOL
1316 WINAPI
1317 SymEnumSym(
1318 _In_ HANDLE,
1319 _In_ ULONG64,
1320 _In_ PSYM_ENUMERATESYMBOLS_CALLBACK,
1321 _In_opt_ PVOID);
1322
1323 BOOL
1324 WINAPI
1325 SymEnumSymbols(
1326 _In_ HANDLE,
1327 _In_ ULONG64,
1328 _In_opt_ PCSTR,
1329 _In_ PSYM_ENUMERATESYMBOLS_CALLBACK,
1330 _In_opt_ PVOID);
1331
1332 BOOL
1333 WINAPI
1334 SymEnumSymbolsW(
1335 _In_ HANDLE,
1336 _In_ ULONG64,
1337 _In_opt_ PCWSTR,
1338 _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW,
1339 _In_opt_ PVOID);
1340
1341 typedef BOOL
1342 (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(
1343 _In_ PCSTR,
1344 _In_ DWORD64,
1345 _In_ ULONG,
1346 _In_opt_ PVOID);
1347
1348 typedef BOOL
1349 (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)(
1350 _In_ PCWSTR,
1351 _In_ DWORD64,
1352 _In_ ULONG,
1353 _In_opt_ PVOID);
1354
1355 BOOL
1356 WINAPI
1357 SymEnumerateSymbols64(
1358 _In_ HANDLE,
1359 _In_ ULONG64,
1360 _In_ PSYM_ENUMSYMBOLS_CALLBACK64,
1361 _In_opt_ PVOID);
1362
1363 BOOL
1364 WINAPI
1365 SymEnumerateSymbolsW64(
1366 _In_ HANDLE,
1367 _In_ ULONG64,
1368 _In_ PSYM_ENUMSYMBOLS_CALLBACK64W,
1369 _In_opt_ PVOID);
1370
1371 BOOL
1372 WINAPI
1373 SymEnumSymbolsForAddr(
1374 _In_ HANDLE,
1375 _In_ DWORD64,
1376 _In_ PSYM_ENUMERATESYMBOLS_CALLBACK,
1377 _In_opt_ PVOID);
1378
1379 BOOL
1380 WINAPI
1381 SymEnumSymbolsForAddrW(
1382 _In_ HANDLE,
1383 _In_ DWORD64,
1384 _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW,
1385 _In_opt_ PVOID);
1386
1387 typedef BOOL
1388 (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(
1389 _In_ HANDLE,
1390 _In_ ULONG,
1391 _In_opt_ ULONG64,
1392 _In_opt_ ULONG64);
1393
1394 BOOL
1395 WINAPI
1396 SymRegisterCallback64(
1397 _In_ HANDLE,
1398 _In_ PSYMBOL_REGISTERED_CALLBACK64,
1399 _In_ ULONG64);
1400
1401 BOOL
1402 WINAPI
1403 SymRegisterCallbackW64(
1404 _In_ HANDLE,
1405 _In_ PSYMBOL_REGISTERED_CALLBACK64,
1406 _In_ ULONG64);
1407
1408 BOOL
1409 WINAPI
1410 SymUnDName64(
1411 _In_ PIMAGEHLP_SYMBOL64,
1412 _Out_writes_(UnDecNameLength) PSTR,
1413 _In_ DWORD UnDecNameLength);
1414
1415 BOOL WINAPI SymMatchString(_In_ PCSTR, _In_ PCSTR, _In_ BOOL);
1416 BOOL WINAPI SymMatchStringA(_In_ PCSTR, _In_ PCSTR, _In_ BOOL);
1417 BOOL WINAPI SymMatchStringW(_In_ PCWSTR, _In_ PCWSTR, _In_ BOOL);
1418
1419 BOOL
1420 WINAPI
1421 SymSearch(
1422 _In_ HANDLE,
1423 _In_ ULONG64,
1424 _In_opt_ DWORD,
1425 _In_opt_ DWORD,
1426 _In_opt_ PCSTR,
1427 _In_opt_ DWORD64,
1428 _In_ PSYM_ENUMERATESYMBOLS_CALLBACK,
1429 _In_opt_ PVOID,
1430 _In_ DWORD);
1431
1432 BOOL
1433 WINAPI
1434 SymSearchW(
1435 _In_ HANDLE,
1436 _In_ ULONG64,
1437 _In_opt_ DWORD,
1438 _In_opt_ DWORD,
1439 _In_opt_ PCWSTR,
1440 _In_opt_ DWORD64,
1441 _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW,
1442 _In_opt_ PVOID,
1443 _In_ DWORD);
1444
1445 DWORD
1446 WINAPI
1447 UnDecorateSymbolName(
1448 _In_ PCSTR,
1449 _Out_writes_(maxStringLength) PSTR,
1450 _In_ DWORD maxStringLength,
1451 _In_ DWORD);
1452
1453 DWORD
1454 WINAPI
1455 UnDecorateSymbolNameW(
1456 _In_ PCWSTR,
1457 _Out_writes_(maxStringLength) PWSTR,
1458 _In_ DWORD maxStringLength,
1459 _In_ DWORD);
1460
1461 BOOL
1462 WINAPI
1463 SymGetScope(
1464 _In_ HANDLE,
1465 _In_ ULONG64,
1466 _In_ DWORD,
1467 _Inout_ PSYMBOL_INFO);
1468
1469 BOOL
1470 WINAPI
1471 SymGetScopeW(
1472 _In_ HANDLE,
1473 _In_ ULONG64,
1474 _In_ DWORD,
1475 _Inout_ PSYMBOL_INFOW);
1476
1477 BOOL
1478 WINAPI
1479 SymFromIndex(
1480 _In_ HANDLE,
1481 _In_ ULONG64,
1482 _In_ DWORD,
1483 _Inout_ PSYMBOL_INFO);
1484
1485 BOOL
1486 WINAPI
1487 SymFromIndexW(
1488 _In_ HANDLE,
1489 _In_ ULONG64,
1490 _In_ DWORD,
1491 _Inout_ PSYMBOL_INFOW);
1492
1493 BOOL
1494 WINAPI
1495 SymAddSymbol(
1496 _In_ HANDLE,
1497 _In_ ULONG64,
1498 _In_ PCSTR,
1499 _In_ DWORD64,
1500 _In_ DWORD,
1501 _In_ DWORD);
1502
1503 BOOL
1504 WINAPI
1505 SymAddSymbolW(
1506 _In_ HANDLE,
1507 _In_ ULONG64,
1508 _In_ PCWSTR,
1509 _In_ DWORD64,
1510 _In_ DWORD,
1511 _In_ DWORD);
1512
1513 BOOL
1514 WINAPI
1515 SymDeleteSymbol(
1516 _In_ HANDLE,
1517 _In_ ULONG64,
1518 _In_opt_ PCSTR,
1519 _In_ DWORD64,
1520 _In_ DWORD);
1521
1522 BOOL
1523 WINAPI
1524 SymDeleteSymbolW(
1525 _In_ HANDLE,
1526 _In_ ULONG64,
1527 _In_opt_ PCWSTR,
1528 _In_ DWORD64,
1529 _In_ DWORD);
1530
1531 /*************************
1532 * Source Files *
1533 *************************/
1534
1535 typedef BOOL
1536 (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)(
1537 _In_ PSOURCEFILE,
1538 _In_opt_ PVOID);
1539
1540 typedef BOOL
1541 (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACKW)(
1542 _In_ PSOURCEFILEW,
1543 _In_opt_ PVOID);
1544
1545 BOOL
1546 WINAPI
1547 SymEnumSourceFiles(
1548 _In_ HANDLE,
1549 _In_ ULONG64,
1550 _In_opt_ PCSTR,
1551 _In_ PSYM_ENUMSOURCEFILES_CALLBACK,
1552 _In_opt_ PVOID);
1553
1554 BOOL
1555 WINAPI
1556 SymEnumSourceFilesW(
1557 _In_ HANDLE,
1558 _In_ ULONG64,
1559 _In_opt_ PCWSTR,
1560 _In_ PSYM_ENUMSOURCEFILES_CALLBACKW,
1561 _In_opt_ PVOID);
1562
1563 BOOL
1564 WINAPI
1565 SymGetLineFromAddr64(
1566 _In_ HANDLE,
1567 _In_ DWORD64,
1568 _Out_ PDWORD,
1569 _Out_ PIMAGEHLP_LINE64);
1570
1571 BOOL
1572 WINAPI
1573 SymGetLineFromAddrW64(
1574 _In_ HANDLE,
1575 _In_ DWORD64,
1576 _Out_ PDWORD,
1577 _Out_ PIMAGEHLP_LINEW64);
1578
1579 BOOL WINAPI SymGetLinePrev64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE64);
1580 BOOL WINAPI SymGetLinePrevW64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW64);
1581 BOOL WINAPI SymGetLineNext64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE64);
1582 BOOL WINAPI SymGetLineNextW64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW64);
1583
1584 BOOL
1585 WINAPI
1586 SymGetLineFromName64(
1587 _In_ HANDLE,
1588 _In_opt_ PCSTR,
1589 _In_opt_ PCSTR,
1590 _In_ DWORD,
1591 _Out_ PLONG,
1592 _Inout_ PIMAGEHLP_LINE64);
1593
1594 BOOL
1595 WINAPI
1596 SymGetLineFromNameW64(
1597 _In_ HANDLE,
1598 _In_opt_ PCWSTR,
1599 _In_opt_ PCWSTR,
1600 _In_ DWORD,
1601 _Out_ PLONG,
1602 _Inout_ PIMAGEHLP_LINEW64);
1603
1604 ULONG
1605 WINAPI
1606 SymGetFileLineOffsets64(
1607 _In_ HANDLE,
1608 _In_opt_ PCSTR,
1609 _In_ PCSTR,
1610 _Out_writes_(BufferLines) PDWORD64,
1611 _In_ ULONG BufferLines);
1612
1613 BOOL
1614 WINAPI
1615 SymGetSourceFile(
1616 _In_ HANDLE,
1617 _In_ ULONG64,
1618 _In_opt_ PCSTR,
1619 _In_ PCSTR,
1620 _Out_writes_(Size) PSTR,
1621 _In_ DWORD Size);
1622
1623 BOOL
1624 WINAPI
1625 SymGetSourceFileW(
1626 _In_ HANDLE,
1627 _In_ ULONG64,
1628 _In_opt_ PCWSTR,
1629 _In_ PCWSTR,
1630 _Out_writes_(Size) PWSTR,
1631 _In_ DWORD Size);
1632
1633 BOOL
1634 WINAPI
1635 SymGetSourceFileToken(
1636 _In_ HANDLE,
1637 _In_ ULONG64,
1638 _In_ PCSTR,
1639 _Outptr_ PVOID*,
1640 _Out_ DWORD*);
1641
1642 BOOL
1643 WINAPI
1644 SymGetSourceFileTokenW(
1645 _In_ HANDLE,
1646 _In_ ULONG64,
1647 _In_ PCWSTR,
1648 _Outptr_ PVOID*,
1649 _Out_ DWORD*);
1650
1651 BOOL
1652 WINAPI
1653 SymGetSourceFileFromToken(
1654 _In_ HANDLE,
1655 _In_ PVOID,
1656 _In_opt_ PCSTR,
1657 _Out_writes_(Size) PSTR,
1658 _In_ DWORD Size);
1659
1660 BOOL
1661 WINAPI
1662 SymGetSourceFileFromTokenW(
1663 _In_ HANDLE,
1664 _In_ PVOID,
1665 _In_opt_ PCWSTR,
1666 _Out_writes_(Size) PWSTR,
1667 _In_ DWORD Size);
1668
1669 BOOL
1670 WINAPI
1671 SymGetSourceVarFromToken(
1672 _In_ HANDLE,
1673 _In_ PVOID,
1674 _In_opt_ PCSTR,
1675 _In_ PCSTR,
1676 _Out_writes_(Size) PSTR,
1677 _In_ DWORD Size);
1678
1679 BOOL
1680 WINAPI
1681 SymGetSourceVarFromTokenW(
1682 _In_ HANDLE,
1683 _In_ PVOID,
1684 _In_opt_ PCWSTR,
1685 _In_ PCWSTR,
1686 _Out_writes_(Size) PWSTR,
1687 _In_ DWORD Size);
1688
1689 typedef struct _SRCCODEINFO
1690 {
1691 DWORD SizeOfStruct;
1692 PVOID Key;
1693 DWORD64 ModBase;
1694 CHAR Obj[MAX_PATH+1];
1695 CHAR FileName[MAX_PATH+1];
1696 DWORD LineNumber;
1697 DWORD64 Address;
1698 } SRCCODEINFO, *PSRCCODEINFO;
1699
1700 typedef struct _SRCCODEINFOW
1701 {
1702 DWORD SizeOfStruct;
1703 PVOID Key;
1704 DWORD64 ModBase;
1705 WCHAR Obj[MAX_PATH+1];
1706 WCHAR FileName[MAX_PATH+1];
1707 DWORD LineNumber;
1708 DWORD64 Address;
1709 } SRCCODEINFOW, *PSRCCODEINFOW;
1710
1711 typedef BOOL
1712 (CALLBACK* PSYM_ENUMLINES_CALLBACK)(
1713 _In_ PSRCCODEINFO,
1714 _In_opt_ PVOID);
1715
1716 typedef BOOL
1717 (CALLBACK* PSYM_ENUMLINES_CALLBACKW)(
1718 _In_ PSRCCODEINFOW,
1719 _In_opt_ PVOID);
1720
1721 BOOL
1722 WINAPI
1723 SymEnumLines(
1724 _In_ HANDLE,
1725 _In_ ULONG64,
1726 _In_opt_ PCSTR,
1727 _In_opt_ PCSTR,
1728 _In_ PSYM_ENUMLINES_CALLBACK,
1729 _In_opt_ PVOID);
1730
1731 BOOL
1732 WINAPI
1733 SymEnumLinesW(
1734 _In_ HANDLE,
1735 _In_ ULONG64,
1736 _In_opt_ PCWSTR,
1737 _In_opt_ PCWSTR,
1738 _In_ PSYM_ENUMLINES_CALLBACKW,
1739 _In_opt_ PVOID);
1740
1741 BOOL
1742 WINAPI
1743 SymEnumSourceLines(
1744 _In_ HANDLE,
1745 _In_ ULONG64,
1746 _In_opt_ PCSTR,
1747 _In_opt_ PCSTR,
1748 _In_opt_ DWORD,
1749 _In_ DWORD,
1750 _In_ PSYM_ENUMLINES_CALLBACK,
1751 _In_opt_ PVOID);
1752
1753 BOOL
1754 WINAPI
1755 SymEnumSourceLinesW(
1756 _In_ HANDLE,
1757 _In_ ULONG64,
1758 _In_opt_ PCWSTR,
1759 _In_opt_ PCWSTR,
1760 _In_opt_ DWORD,
1761 _In_ DWORD,
1762 _In_ PSYM_ENUMLINES_CALLBACKW,
1763 _In_opt_ PVOID);
1764
1765 /*************************
1766 * File & image handling *
1767 *************************/
1768
1769 BOOL WINAPI SymInitialize(_In_ HANDLE, _In_opt_ PCSTR, _In_ BOOL);
1770 BOOL WINAPI SymInitializeW(_In_ HANDLE, _In_opt_ PCWSTR, _In_ BOOL);
1771 BOOL WINAPI SymCleanup(_In_ HANDLE);
1772
1773 HANDLE
1774 WINAPI
1775 FindDebugInfoFile(
1776 _In_ PCSTR,
1777 _In_ PCSTR,
1778 _Out_writes_(MAX_PATH + 1) PSTR);
1779
1780 typedef BOOL
1781 (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(
1782 _In_ HANDLE,
1783 _In_ PCSTR,
1784 _In_ PVOID);
1785
1786 typedef BOOL
1787 (CALLBACK *PFIND_DEBUG_FILE_CALLBACKW)(
1788 _In_ HANDLE,
1789 _In_ PCWSTR,
1790 _In_ PVOID);
1791
1792 HANDLE
1793 WINAPI
1794 FindDebugInfoFileEx(
1795 _In_ PCSTR,
1796 _In_ PCSTR,
1797 _Out_writes_(MAX_PATH + 1) PSTR,
1798 _In_opt_ PFIND_DEBUG_FILE_CALLBACK,
1799 _In_opt_ PVOID);
1800
1801 HANDLE
1802 WINAPI
1803 FindDebugInfoFileExW(
1804 _In_ PCWSTR,
1805 _In_ PCWSTR,
1806 _Out_writes_(MAX_PATH + 1) PWSTR,
1807 _In_opt_ PFIND_DEBUG_FILE_CALLBACKW,
1808 _In_opt_ PVOID);
1809
1810 HANDLE
1811 WINAPI
1812 SymFindDebugInfoFile(
1813 _In_ HANDLE,
1814 _In_ PCSTR,
1815 _Out_writes_(MAX_PATH + 1) PSTR,
1816 _In_opt_ PFIND_DEBUG_FILE_CALLBACK,
1817 _In_opt_ PVOID);
1818
1819 HANDLE
1820 WINAPI
1821 SymFindDebugInfoFileW(
1822 _In_ HANDLE,
1823 _In_ PCWSTR,
1824 _Out_writes_(MAX_PATH + 1) PWSTR,
1825 _In_opt_ PFIND_DEBUG_FILE_CALLBACKW,
1826 _In_opt_ PVOID);
1827
1828 typedef BOOL
1829 (CALLBACK *PFINDFILEINPATHCALLBACK)(
1830 _In_ PCSTR,
1831 _In_ PVOID);
1832
1833 typedef BOOL
1834 (CALLBACK *PFINDFILEINPATHCALLBACKW)(
1835 _In_ PCWSTR,
1836 _In_ PVOID);
1837
1838 BOOL WINAPI FindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD,
1839 PSTR, PFINDFILEINPATHCALLBACK, PVOID);
1840
1841 BOOL
1842 WINAPI
1843 SymFindFileInPath(
1844 _In_ HANDLE,
1845 _In_opt_ PCSTR,
1846 _In_ PCSTR,
1847 _In_opt_ PVOID,
1848 _In_ DWORD,
1849 _In_ DWORD,
1850 _In_ DWORD,
1851 _Out_writes_(MAX_PATH + 1) PSTR,
1852 _In_opt_ PFINDFILEINPATHCALLBACK,
1853 _In_opt_ PVOID);
1854
1855 BOOL
1856 WINAPI
1857 SymFindFileInPathW(
1858 _In_ HANDLE,
1859 _In_opt_ PCWSTR,
1860 _In_ PCWSTR,
1861 _In_opt_ PVOID,
1862 _In_ DWORD,
1863 _In_ DWORD,
1864 _In_ DWORD,
1865 _Out_writes_(MAX_PATH + 1) PWSTR,
1866 _In_opt_ PFINDFILEINPATHCALLBACKW,
1867 _In_opt_ PVOID);
1868
1869 HANDLE
1870 WINAPI
1871 FindExecutableImage(
1872 _In_ PCSTR,
1873 _In_ PCSTR,
1874 _Out_writes_(MAX_PATH + 1) PSTR);
1875
1876 typedef BOOL
1877 (CALLBACK *PFIND_EXE_FILE_CALLBACK)(
1878 _In_ HANDLE,
1879 _In_ PCSTR,
1880 _In_opt_ PVOID);
1881
1882 typedef BOOL
1883 (CALLBACK *PFIND_EXE_FILE_CALLBACKW)(
1884 _In_ HANDLE,
1885 _In_ PCWSTR,
1886 _In_opt_ PVOID);
1887
1888 HANDLE
1889 WINAPI
1890 FindExecutableImageEx(
1891 _In_ PCSTR,
1892 _In_ PCSTR,
1893 _Out_writes_(MAX_PATH + 1) PSTR,
1894 _In_opt_ PFIND_EXE_FILE_CALLBACK,
1895 _In_opt_ PVOID);
1896
1897 HANDLE
1898 WINAPI
1899 FindExecutableImageExW(
1900 _In_ PCWSTR,
1901 _In_ PCWSTR,
1902 _Out_writes_(MAX_PATH + 1) PWSTR,
1903 _In_opt_ PFIND_EXE_FILE_CALLBACKW,
1904 _In_opt_ PVOID);
1905
1906 HANDLE
1907 WINAPI
1908 SymFindExecutableImage(
1909 _In_ HANDLE,
1910 _In_ PCSTR,
1911 _Out_writes_(MAX_PATH + 1) PSTR,
1912 _In_ PFIND_EXE_FILE_CALLBACK,
1913 _In_ PVOID);
1914
1915 HANDLE
1916 WINAPI
1917 SymFindExecutableImageW(
1918 _In_ HANDLE,
1919 _In_ PCWSTR,
1920 _Out_writes_(MAX_PATH + 1) PWSTR,
1921 _In_ PFIND_EXE_FILE_CALLBACKW,
1922 _In_ PVOID);
1923
1924 PIMAGE_NT_HEADERS WINAPI ImageNtHeader(_In_ PVOID);
1925
1926 PVOID
1927 WINAPI
1928 ImageDirectoryEntryToDataEx(
1929 _In_ PVOID,
1930 _In_ BOOLEAN,
1931 _In_ USHORT,
1932 _Out_ PULONG,
1933 _Out_opt_ PIMAGE_SECTION_HEADER *);
1934
1935 PVOID
1936 WINAPI
1937 ImageDirectoryEntryToData(
1938 _In_ PVOID,
1939 _In_ BOOLEAN,
1940 _In_ USHORT,
1941 _Out_ PULONG);
1942
1943 PIMAGE_SECTION_HEADER
1944 WINAPI
1945 ImageRvaToSection(
1946 _In_ PIMAGE_NT_HEADERS,
1947 _In_ PVOID,
1948 _In_ ULONG);
1949
1950 PVOID
1951 WINAPI
1952 ImageRvaToVa(
1953 _In_ PIMAGE_NT_HEADERS,
1954 _In_ PVOID,
1955 _In_ ULONG,
1956 _In_opt_ PIMAGE_SECTION_HEADER*);
1957
1958 BOOL
1959 WINAPI
1960 SymGetSearchPath(
1961 _In_ HANDLE,
1962 _Out_writes_(SearchPathLength) PSTR,
1963 _In_ DWORD SearchPathLength);
1964
1965 BOOL
1966 WINAPI
1967 SymGetSearchPathW(
1968 _In_ HANDLE,
1969 _Out_writes_(SearchPathLength) PWSTR,
1970 _In_ DWORD SearchPathLength);
1971
1972 BOOL WINAPI SymSetSearchPath(_In_ HANDLE, _In_opt_ PCSTR);
1973 BOOL WINAPI SymSetSearchPathW(_In_ HANDLE, _In_opt_ PCWSTR);
1974 DWORD WINAPI GetTimestampForLoadedLibrary(_In_ HMODULE);
1975 BOOL WINAPI MakeSureDirectoryPathExists(_In_ PCSTR);
1976
1977 BOOL
1978 WINAPI
1979 SearchTreeForFile(
1980 _In_ PCSTR,
1981 _In_ PCSTR,
1982 _Out_writes_(MAX_PATH + 1) PSTR);
1983
1984 BOOL
1985 WINAPI
1986 SearchTreeForFileW(
1987 _In_ PCWSTR,
1988 _In_ PCWSTR,
1989 _Out_writes_(MAX_PATH + 1) PWSTR);
1990
1991 typedef BOOL
1992 (CALLBACK *PENUMDIRTREE_CALLBACK)(
1993 _In_ PCSTR,
1994 _In_opt_ PVOID);
1995
1996 typedef BOOL
1997 (CALLBACK *PENUMDIRTREE_CALLBACKW)(
1998 _In_ PCWSTR,
1999 _In_opt_ PVOID);
2000
2001 BOOL
2002 WINAPI
2003 EnumDirTree(
2004 _In_opt_ HANDLE,
2005 _In_ PCSTR,
2006 _In_ PCSTR,
2007 _Out_writes_opt_(MAX_PATH + 1) PSTR,
2008 _In_opt_ PENUMDIRTREE_CALLBACK,
2009 _In_opt_ PVOID);
2010
2011 BOOL
2012 WINAPI
2013 EnumDirTreeW(
2014 _In_opt_ HANDLE,
2015 _In_ PCWSTR,
2016 _In_ PCWSTR,
2017 _Out_writes_opt_(MAX_PATH + 1) PWSTR,
2018 _In_opt_ PENUMDIRTREE_CALLBACKW,
2019 _In_opt_ PVOID);
2020
2021 BOOL
2022 WINAPI
2023 SymMatchFileName(
2024 _In_ PCSTR,
2025 _In_ PCSTR,
2026 _Outptr_opt_ PSTR*,
2027 _Outptr_opt_ PSTR*);
2028
2029 BOOL
2030 WINAPI
2031 SymMatchFileNameW(
2032 _In_ PCWSTR,
2033 _In_ PCWSTR,
2034 _Outptr_opt_ PWSTR*,
2035 _Outptr_opt_ PWSTR*);
2036
2037 PCHAR WINAPI SymSetHomeDirectory(_In_opt_ HANDLE, _In_opt_ PCSTR);
2038 PWSTR WINAPI SymSetHomeDirectoryW(_In_opt_ HANDLE, _In_opt_ PCWSTR);
2039
2040 PCHAR
2041 WINAPI
2042 SymGetHomeDirectory(
2043 _In_ DWORD,
2044 _Out_writes_(size) PSTR,
2045 _In_ size_t size);
2046
2047 PWSTR
2048 WINAPI
2049 SymGetHomeDirectoryW(
2050 _In_ DWORD,
2051 _Out_writes_(size) PWSTR,
2052 _In_ size_t size);
2053
2054 #define hdBase 0
2055 #define hdSym 1
2056 #define hdSrc 2
2057 #define hdMax 3
2058
2059 /*************************
2060 * Context management *
2061 *************************/
2062
2063 BOOL
2064 WINAPI
2065 SymSetContext(
2066 _In_ HANDLE,
2067 _In_ PIMAGEHLP_STACK_FRAME,
2068 _In_opt_ PIMAGEHLP_CONTEXT);
2069
2070
2071 /*************************
2072 * Stack management *
2073 *************************/
2074
2075 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
2076 #define KDHELP KDHELP64
2077 #define PKDHELP PKDHELP64
2078 #else
2079 typedef struct _KDHELP
2080 {
2081 DWORD Thread;
2082 DWORD ThCallbackStack;
2083 DWORD NextCallback;
2084 DWORD FramePointer;
2085 DWORD KiCallUserMode;
2086 DWORD KeUserCallbackDispatcher;
2087 DWORD SystemRangeStart;
2088 } KDHELP, *PKDHELP;
2089 #endif
2090
2091 typedef struct _KDHELP64
2092 {
2093 DWORD64 Thread;
2094 DWORD ThCallbackStack;
2095 DWORD ThCallbackBStore;
2096 DWORD NextCallback;
2097 DWORD FramePointer;
2098 DWORD64 KiCallUserMode;
2099 DWORD64 KeUserCallbackDispatcher;
2100 DWORD64 SystemRangeStart;
2101 DWORD64 Reserved[8];
2102 } KDHELP64, *PKDHELP64;
2103
2104 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
2105 #define STACKFRAME STACKFRAME64
2106 #define LPSTACKFRAME LPSTACKFRAME64
2107 #else
2108 typedef struct _STACKFRAME
2109 {
2110 ADDRESS AddrPC;
2111 ADDRESS AddrReturn;
2112 ADDRESS AddrFrame;
2113 ADDRESS AddrStack;
2114 PVOID FuncTableEntry;
2115 DWORD Params[4];
2116 BOOL Far;
2117 BOOL Virtual;
2118 DWORD Reserved[3];
2119 KDHELP KdHelp;
2120 ADDRESS AddrBStore;
2121 } STACKFRAME, *LPSTACKFRAME;
2122 #endif
2123
2124 typedef struct _STACKFRAME64
2125 {
2126 ADDRESS64 AddrPC;
2127 ADDRESS64 AddrReturn;
2128 ADDRESS64 AddrFrame;
2129 ADDRESS64 AddrStack;
2130 ADDRESS64 AddrBStore;
2131 PVOID FuncTableEntry;
2132 DWORD64 Params[4];
2133 BOOL Far;
2134 BOOL Virtual;
2135 DWORD64 Reserved[3];
2136 KDHELP64 KdHelp;
2137 } STACKFRAME64, *LPSTACKFRAME64;
2138
2139 typedef BOOL
2140 (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE64)(
2141 _In_ HANDLE,
2142 _In_ DWORD64,
2143 _Out_writes_bytes_(nSize) PVOID,
2144 _In_ DWORD nSize,
2145 _Out_ PDWORD);
2146
2147 typedef PVOID
2148 (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE64)(
2149 _In_ HANDLE,
2150 _In_ DWORD64);
2151
2152 typedef DWORD64
2153 (CALLBACK *PGET_MODULE_BASE_ROUTINE64)(
2154 _In_ HANDLE,
2155 _In_ DWORD64);
2156
2157 typedef DWORD64
2158 (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE64)(
2159 _In_ HANDLE,
2160 _In_ HANDLE,
2161 _In_ LPADDRESS64);
2162
2163 BOOL
2164 WINAPI
2165 StackWalk64(
2166 _In_ DWORD,
2167 _In_ HANDLE,
2168 _In_ HANDLE,
2169 _Inout_ LPSTACKFRAME64,
2170 _Inout_ PVOID,
2171 _In_opt_ PREAD_PROCESS_MEMORY_ROUTINE64,
2172 _In_opt_ PFUNCTION_TABLE_ACCESS_ROUTINE64,
2173 _In_opt_ PGET_MODULE_BASE_ROUTINE64,
2174 _In_opt_ PTRANSLATE_ADDRESS_ROUTINE64);
2175
2176 PVOID WINAPI SymFunctionTableAccess64(_In_ HANDLE, _In_ DWORD64);
2177
2178 typedef PVOID
2179 (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(
2180 _In_ HANDLE,
2181 _In_ ULONG64,
2182 _In_ ULONG64);
2183
2184 BOOL
2185 WINAPI
2186 SymRegisterFunctionEntryCallback64(
2187 _In_ HANDLE,
2188 _In_ PSYMBOL_FUNCENTRY_CALLBACK64,
2189 _In_ ULONG64);
2190
2191 /*************************
2192 * Version, global stuff *
2193 *************************/
2194
2195 #define API_VERSION_NUMBER 9
2196
2197 typedef struct API_VERSION
2198 {
2199 USHORT MajorVersion;
2200 USHORT MinorVersion;
2201 USHORT Revision;
2202 USHORT Reserved;
2203 } API_VERSION, *LPAPI_VERSION;
2204
2205 LPAPI_VERSION WINAPI ImagehlpApiVersion(void);
2206 LPAPI_VERSION WINAPI ImagehlpApiVersionEx(_In_ LPAPI_VERSION);
2207
2208 typedef struct _IMAGE_DEBUG_INFORMATION
2209 {
2210 LIST_ENTRY List;
2211 DWORD ReservedSize;
2212 PVOID ReservedMappedBase;
2213 USHORT ReservedMachine;
2214 USHORT ReservedCharacteristics;
2215 DWORD ReservedCheckSum;
2216 DWORD ImageBase;
2217 DWORD SizeOfImage;
2218 DWORD ReservedNumberOfSections;
2219 PIMAGE_SECTION_HEADER ReservedSections;
2220 DWORD ReservedExportedNamesSize;
2221 PSTR ReservedExportedNames;
2222 DWORD ReservedNumberOfFunctionTableEntries;
2223 PIMAGE_FUNCTION_ENTRY ReservedFunctionTableEntries;
2224 DWORD ReservedLowestFunctionStartingAddress;
2225 DWORD ReservedHighestFunctionEndingAddress;
2226 DWORD ReservedNumberOfFpoTableEntries;
2227 PFPO_DATA ReservedFpoTableEntries;
2228 DWORD SizeOfCoffSymbols;
2229 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols;
2230 DWORD ReservedSizeOfCodeViewSymbols;
2231 PVOID ReservedCodeViewSymbols;
2232 PSTR ImageFilePath;
2233 PSTR ImageFileName;
2234 PSTR ReservedDebugFilePath;
2235 DWORD ReservedTimeDateStamp;
2236 BOOL ReservedRomImage;
2237 PIMAGE_DEBUG_DIRECTORY ReservedDebugDirectory;
2238 DWORD ReservedNumberOfDebugDirectories;
2239 DWORD ReservedOriginalFunctionTableBaseAddress;
2240 DWORD Reserved[ 2 ];
2241 } IMAGE_DEBUG_INFORMATION, *PIMAGE_DEBUG_INFORMATION;
2242
2243
2244 PIMAGE_DEBUG_INFORMATION
2245 WINAPI
2246 MapDebugInformation(
2247 _In_opt_ HANDLE,
2248 _In_ PCSTR,
2249 _In_opt_ PCSTR,
2250 _In_ ULONG);
2251
2252 BOOL WINAPI UnmapDebugInformation(_Out_ PIMAGE_DEBUG_INFORMATION);
2253
2254 DWORD WINAPI SymGetOptions(void);
2255 DWORD WINAPI SymSetOptions(_In_ DWORD);
2256
2257 BOOL WINAPI SymSetParentWindow(_In_ HWND);
2258
2259 /*************************
2260 * Version, global stuff *
2261 *************************/
2262
2263 typedef BOOL (WINAPI* PSYMBOLSERVERPROC)(PCSTR, PCSTR, PVOID, DWORD, DWORD, PSTR);
2264 typedef BOOL (WINAPI* PSYMBOLSERVERPROCA)(PCSTR, PCSTR, PVOID, DWORD, DWORD, PSTR);
2265 typedef BOOL (WINAPI* PSYMBOLSERVERPROCW)(PCWSTR, PCWSTR, PVOID, DWORD, DWORD, PWSTR);
2266 typedef BOOL (WINAPI* PSYMBOLSERVEROPENPROC)(void);
2267 typedef BOOL (WINAPI* PSYMBOLSERVERCLOSEPROC)(void);
2268 typedef BOOL (WINAPI* PSYMBOLSERVERSETOPTIONSPROC)(UINT_PTR, ULONG64);
2269 typedef BOOL (CALLBACK* PSYMBOLSERVERCALLBACKPROC)(UINT_PTR, ULONG64, ULONG64);
2270 typedef UINT_PTR (WINAPI* PSYMBOLSERVERGETOPTIONSPROC)(void);
2271 typedef BOOL (WINAPI* PSYMBOLSERVERPINGPROC)(PCSTR);
2272 typedef BOOL (WINAPI* PSYMBOLSERVERPINGPROCA)(PCSTR);
2273 typedef BOOL (WINAPI* PSYMBOLSERVERPINGPROCW)(PCWSTR);
2274
2275 #define SSRVOPT_CALLBACK 0x0001
2276 #define SSRVOPT_DWORD 0x0002
2277 #define SSRVOPT_DWORDPTR 0x0004
2278 #define SSRVOPT_GUIDPTR 0x0008
2279 #define SSRVOPT_OLDGUIDPTR 0x0010
2280 #define SSRVOPT_UNATTENDED 0x0020
2281 #define SSRVOPT_NOCOPY 0x0040
2282 #define SSRVOPT_PARENTWIN 0x0080
2283 #define SSRVOPT_PARAMTYPE 0x0100
2284 #define SSRVOPT_SECURE 0x0200
2285 #define SSRVOPT_TRACE 0x0400
2286 #define SSRVOPT_SETCONTEXT 0x0800
2287 #define SSRVOPT_PROXY 0x1000
2288 #define SSRVOPT_DOWNSTREAM_STORE 0x2000
2289 #define SSRVOPT_RESET ((ULONG_PTR)-1)
2290
2291 #define SSRVACTION_TRACE 1
2292 #define SSRVACTION_QUERYCANCEL 2
2293 #define SSRVACTION_EVENT 3
2294
2295 /* 32-bit functions */
2296
2297 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
2298
2299 #define PENUMLOADED_MODULES_CALLBACK PENUMLOADED_MODULES_CALLBACK64
2300 #define PFUNCTION_TABLE_ACCESS_ROUTINE PFUNCTION_TABLE_ACCESS_ROUTINE64
2301 #define PGET_MODULE_BASE_ROUTINE PGET_MODULE_BASE_ROUTINE64
2302 #define PREAD_PROCESS_MEMORY_ROUTINE PREAD_PROCESS_MEMORY_ROUTINE64
2303 #define PSYMBOL_FUNCENTRY_CALLBACK PSYMBOL_FUNCENTRY_CALLBACK64
2304 #define PSYMBOL_REGISTERED_CALLBACK PSYMBOL_REGISTERED_CALLBACK64
2305 #define PSYM_ENUMMODULES_CALLBACK PSYM_ENUMMODULES_CALLBACK64
2306 #define PSYM_ENUMSYMBOLS_CALLBACK PSYM_ENUMSYMBOLS_CALLBACK64
2307 #define PSYM_ENUMSYMBOLS_CALLBACKW PSYM_ENUMSYMBOLS_CALLBACKW64
2308 #define PTRANSLATE_ADDRESS_ROUTINE PTRANSLATE_ADDRESS_ROUTINE64
2309
2310 #define EnumerateLoadedModules EnumerateLoadedModules64
2311 #define StackWalk StackWalk64
2312 #define SymEnumerateModules SymEnumerateModules64
2313 #define SymEnumerateSymbols SymEnumerateSymbols64
2314 #define SymEnumerateSymbolsW SymEnumerateSymbolsW64
2315 #define SymFunctionTableAccess SymFunctionTableAccess64
2316 #define SymGetLineFromAddr SymGetLineFromAddr64
2317 #define SymGetLineFromAddrW SymGetLineFromAddrW64
2318 #define SymGetLineFromName SymGetLineFromName64
2319 #define SymGetLineNext SymGetLineNext64
2320 #define SymGetLineNextW SymGetLineNextW64
2321 #define SymGetLinePrev SymGetLinePrev64
2322 #define SymGetLinePrevW SymGetLinePrevW64
2323 #define SymGetModuleBase SymGetModuleBase64
2324 #define SymGetModuleInfo SymGetModuleInfo64
2325 #define SymGetModuleInfoW SymGetModuleInfoW64
2326 #define SymGetSymFromAddr SymGetSymFromAddr64
2327 #define SymGetSymFromName SymGetSymFromName64
2328 #define SymGetSymNext SymGetSymNext64
2329 #define SymGetSymNextW SymGetSymNextW64
2330 #define SymGetSymPrev SymGetSymPrev64
2331 #define SymGetSymPrevW SymGetSymPrevW64
2332 #define SymLoadModule SymLoadModule64
2333 #define SymRegisterCallback SymRegisterCallback64
2334 #define SymRegisterFunctionEntryCallback SymRegisterFunctionEntryCallback64
2335 #define SymUnDName SymUnDName64
2336 #define SymUnloadModule SymUnloadModule64
2337
2338 #else
2339
2340 typedef BOOL
2341 (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(
2342 _In_ PCSTR,
2343 _In_ ULONG,
2344 _In_ ULONG,
2345 _In_opt_ PVOID);
2346
2347 typedef PVOID
2348 (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(
2349 _In_ HANDLE,
2350 _In_ DWORD);
2351
2352 typedef DWORD
2353 (CALLBACK *PGET_MODULE_BASE_ROUTINE)(
2354 _In_ HANDLE,
2355 _In_ DWORD);
2356
2357 typedef BOOL
2358 (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)(
2359 _In_ HANDLE,
2360 _In_ DWORD,
2361 _Out_writes_bytes_(nSize) PVOID,
2362 _In_ DWORD nSize,
2363 _Out_ PDWORD);
2364
2365 typedef BOOL
2366 (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(
2367 _In_ PCSTR,
2368 _In_ ULONG,
2369 _In_opt_ PVOID);
2370
2371 typedef BOOL
2372 (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(
2373 _In_ PCSTR,
2374 _In_ ULONG,
2375 _In_ ULONG,
2376 _In_opt_ PVOID);
2377
2378 typedef BOOL
2379 (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(
2380 _In_ PCWSTR,
2381 _In_ ULONG,
2382 _In_ ULONG,
2383 _In_opt_ PVOID);
2384
2385 typedef BOOL
2386 (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(
2387 _In_ HANDLE,
2388 _In_ ULONG,
2389 _In_opt_ PVOID,
2390 _In_opt_ PVOID);
2391
2392 typedef PVOID
2393 (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(
2394 _In_ HANDLE,
2395 _In_ DWORD,
2396 _In_opt_ PVOID);
2397
2398 typedef DWORD
2399 (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(
2400 _In_ HANDLE,
2401 _In_ HANDLE,
2402 _Out_ LPADDRESS);
2403
2404 BOOL
2405 WINAPI
2406 EnumerateLoadedModules(
2407 _In_ HANDLE,
2408 _In_ PENUMLOADED_MODULES_CALLBACK,
2409 _In_opt_ PVOID);
2410
2411 BOOL
2412 WINAPI
2413 StackWalk(
2414 _In_ DWORD,
2415 _In_ HANDLE,
2416 _In_ HANDLE,
2417 _Inout_ LPSTACKFRAME,
2418 _Inout_ PVOID,
2419 _In_opt_ PREAD_PROCESS_MEMORY_ROUTINE,
2420 _In_opt_ PFUNCTION_TABLE_ACCESS_ROUTINE,
2421 _In_opt_ PGET_MODULE_BASE_ROUTINE,
2422 _In_opt_ PTRANSLATE_ADDRESS_ROUTINE);
2423
2424 BOOL
2425 WINAPI
2426 SymEnumerateModules(
2427 _In_ HANDLE,
2428 _In_ PSYM_ENUMMODULES_CALLBACK,
2429 _In_opt_ PVOID);
2430
2431 BOOL
2432 WINAPI
2433 SymEnumerateSymbols(
2434 _In_ HANDLE,
2435 _In_ ULONG,
2436 _In_ PSYM_ENUMSYMBOLS_CALLBACK,
2437 _In_opt_ PVOID);
2438
2439 BOOL
2440 WINAPI
2441 SymEnumerateSymbolsW(
2442 _In_ HANDLE,
2443 _In_ ULONG,
2444 _In_ PSYM_ENUMSYMBOLS_CALLBACKW,
2445 _In_opt_ PVOID);
2446
2447 PVOID WINAPI SymFunctionTableAccess(_In_ HANDLE, _In_ DWORD);
2448
2449 BOOL
2450 WINAPI
2451 SymGetLineFromAddr(
2452 _In_ HANDLE,
2453 _In_ DWORD,
2454 _Out_ PDWORD,
2455 _Out_ PIMAGEHLP_LINE);
2456
2457 BOOL
2458 WINAPI
2459 SymGetLineFromAddrW(
2460 _In_ HANDLE,
2461 _In_ DWORD,
2462 _Out_ PDWORD,
2463 _Out_ PIMAGEHLP_LINEW);
2464
2465 BOOL
2466 WINAPI
2467 SymGetLineFromName(
2468 _In_ HANDLE,
2469 _In_opt_ PCSTR,
2470 _In_opt_ PCSTR,
2471 _In_ DWORD,
2472 _Out_ PLONG,
2473 _Inout_ PIMAGEHLP_LINE);
2474
2475 BOOL WINAPI SymGetLineNext(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE);
2476 BOOL WINAPI SymGetLineNextW(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW);
2477 BOOL WINAPI SymGetLinePrev(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE);
2478 BOOL WINAPI SymGetLinePrevW(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW);
2479 DWORD WINAPI SymGetModuleBase(_In_ HANDLE, _In_ DWORD);
2480
2481 BOOL
2482 WINAPI
2483 SymGetModuleInfo(
2484 _In_ HANDLE,
2485 _In_ DWORD,
2486 _Out_ PIMAGEHLP_MODULE);
2487
2488 BOOL
2489 WINAPI
2490 SymGetModuleInfoW(
2491 _In_ HANDLE,
2492 _In_ DWORD,
2493 _Out_ PIMAGEHLP_MODULEW);
2494
2495 BOOL
2496 WINAPI
2497 SymGetSymFromAddr(
2498 _In_ HANDLE,
2499 _In_ DWORD,
2500 _Out_opt_ PDWORD,
2501 _Inout_ PIMAGEHLP_SYMBOL);
2502
2503 BOOL
2504 WINAPI
2505 SymGetSymFromName(
2506 _In_ HANDLE,
2507 _In_ PCSTR,
2508 _Inout_ PIMAGEHLP_SYMBOL);
2509
2510 BOOL WINAPI SymGetSymNext(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL);
2511 BOOL WINAPI SymGetSymNextW(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW);
2512 BOOL WINAPI SymGetSymPrev(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL);
2513 BOOL WINAPI SymGetSymPrevW(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW);
2514
2515 DWORD
2516 WINAPI
2517 SymLoadModule(
2518 _In_ HANDLE,
2519 _In_opt_ HANDLE,
2520 _In_opt_ PCSTR,
2521 _In_opt_ PCSTR,
2522 _In_ DWORD,
2523 _In_ DWORD);
2524
2525 BOOL
2526 WINAPI
2527 SymRegisterCallback(
2528 _In_ HANDLE,
2529 _In_ PSYMBOL_REGISTERED_CALLBACK,
2530 _In_opt_ PVOID);
2531
2532 BOOL
2533 WINAPI
2534 SymRegisterFunctionEntryCallback(
2535 _In_ HANDLE,
2536 _In_ PSYMBOL_FUNCENTRY_CALLBACK,
2537 _In_opt_ PVOID);
2538
2539 BOOL WINAPI SymRefreshModuleList(_In_ HANDLE);
2540
2541 BOOL
2542 WINAPI
2543 SymUnDName(
2544 _In_ PIMAGEHLP_SYMBOL,
2545 _Out_writes_(UnDecNameLength) PSTR,
2546 _In_ DWORD UnDecNameLength);
2547
2548 BOOL WINAPI SymUnloadModule(_In_ HANDLE, _In_ DWORD);
2549
2550 BOOL
2551 IMAGEAPI
2552 SymSrvIsStore(
2553 _In_opt_ HANDLE hProcess,
2554 _In_ PCSTR path);
2555
2556 #endif
2557
2558 #ifdef __cplusplus
2559 } /* extern "C" */
2560 #endif /* defined(__cplusplus) */
2561
2562 #endif /* __WINE_DBGHELP_H */