[INTRIN.H] Add _mul128 and _umul128 prototypes and remove some obsolete ones from...
[reactos.git] / reactos / sdk / 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 ULONG Index;
1069 ULONG Size;
1070 ULONG64 ModBase;
1071 ULONG Flags;
1072 ULONG64 Value;
1073 ULONG64 Address;
1074 ULONG Register;
1075 ULONG Scope;
1076 ULONG Tag;
1077 ULONG NameLen;
1078 ULONG MaxNameLen;
1079 CHAR Name[1];
1080 } SYMBOL_INFO, *PSYMBOL_INFO;
1081
1082 typedef struct _SYMBOL_INFOW
1083 {
1084 ULONG SizeOfStruct;
1085 ULONG TypeIndex;
1086 ULONG64 Reserved[2];
1087 ULONG Index;
1088 ULONG Size;
1089 ULONG64 ModBase;
1090 ULONG Flags;
1091 ULONG64 Value;
1092 ULONG64 Address;
1093 ULONG Register;
1094 ULONG Scope;
1095 ULONG Tag;
1096 ULONG NameLen;
1097 ULONG MaxNameLen;
1098 WCHAR Name[1];
1099 } SYMBOL_INFOW, *PSYMBOL_INFOW;
1100
1101 typedef struct _SYMBOL_INFO_PACKAGE
1102 {
1103 SYMBOL_INFO si;
1104 CHAR name[MAX_SYM_NAME+1];
1105 } SYMBOL_INFO_PACKAGE, *PSYMBOL_INFO_PACKAGE;
1106
1107 typedef struct _SYMBOL_INFO_PACKAGEW
1108 {
1109 SYMBOL_INFOW si;
1110 WCHAR name[MAX_SYM_NAME+1];
1111 } SYMBOL_INFO_PACKAGEW, *PSYMBOL_INFO_PACKAGEW;
1112
1113 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO
1114 {
1115 TI_GET_SYMTAG,
1116 TI_GET_SYMNAME,
1117 TI_GET_LENGTH,
1118 TI_GET_TYPE,
1119 TI_GET_TYPEID,
1120 TI_GET_BASETYPE,
1121 TI_GET_ARRAYINDEXTYPEID,
1122 TI_FINDCHILDREN,
1123 TI_GET_DATAKIND,
1124 TI_GET_ADDRESSOFFSET,
1125 TI_GET_OFFSET,
1126 TI_GET_VALUE,
1127 TI_GET_COUNT,
1128 TI_GET_CHILDRENCOUNT,
1129 TI_GET_BITPOSITION,
1130 TI_GET_VIRTUALBASECLASS,
1131 TI_GET_VIRTUALTABLESHAPEID,
1132 TI_GET_VIRTUALBASEPOINTEROFFSET,
1133 TI_GET_CLASSPARENTID,
1134 TI_GET_NESTED,
1135 TI_GET_SYMINDEX,
1136 TI_GET_LEXICALPARENT,
1137 TI_GET_ADDRESS,
1138 TI_GET_THISADJUST,
1139 TI_GET_UDTKIND,
1140 TI_IS_EQUIV_TO,
1141 TI_GET_CALLING_CONVENTION,
1142 } IMAGEHLP_SYMBOL_TYPE_INFO;
1143
1144 #define IMAGEHLP_GET_TYPE_INFO_UNCACHED 0x00000001
1145 #define IMAGEHLP_GET_TYPE_INFO_CHILDREN 0x00000002
1146 typedef struct _IMAGEHLP_GET_TYPE_INFO_PARAMS
1147 {
1148 ULONG SizeOfStruct;
1149 ULONG Flags;
1150 ULONG NumIds;
1151 PULONG TypeIds;
1152 ULONG64 TagFilter;
1153 ULONG NumReqs;
1154 IMAGEHLP_SYMBOL_TYPE_INFO* ReqKinds;
1155 PULONG_PTR ReqOffsets;
1156 PULONG ReqSizes;
1157 ULONG_PTR ReqStride;
1158 ULONG_PTR BufferSize;
1159 PVOID Buffer;
1160 ULONG EntriesMatched;
1161 ULONG EntriesFilled;
1162 ULONG64 TagsFound;
1163 ULONG64 AllReqsValid;
1164 ULONG NumReqsValid;
1165 PULONG64 ReqsValid;
1166 } IMAGEHLP_GET_TYPE_INFO_PARAMS, *PIMAGEHLP_GET_TYPE_INFO_PARAMS;
1167
1168 typedef struct _TI_FINDCHILDREN_PARAMS
1169 {
1170 ULONG Count;
1171 ULONG Start;
1172 ULONG ChildId[1];
1173 } TI_FINDCHILDREN_PARAMS;
1174
1175 #define UNDNAME_COMPLETE (0x0000)
1176 #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001)
1177 #define UNDNAME_NO_MS_KEYWORDS (0x0002)
1178 #define UNDNAME_NO_FUNCTION_RETURNS (0x0004)
1179 #define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
1180 #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
1181 #define UNDNAME_NO_MS_THISTYPE (0x0020)
1182 #define UNDNAME_NO_CV_THISTYPE (0x0040)
1183 #define UNDNAME_NO_THISTYPE (0x0060)
1184 #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080)
1185 #define UNDNAME_NO_THROW_SIGNATURES (0x0100)
1186 #define UNDNAME_NO_MEMBER_TYPE (0x0200)
1187 #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
1188 #define UNDNAME_32_BIT_DECODE (0x0800)
1189 #define UNDNAME_NAME_ONLY (0x1000)
1190 #define UNDNAME_NO_ARGUMENTS (0x2000)
1191 #define UNDNAME_NO_SPECIAL_SYMS (0x4000)
1192
1193 #define SYMSEARCH_MASKOBJS 0x01
1194 #define SYMSEARCH_RECURSE 0x02
1195 #define SYMSEARCH_GLOBALSONLY 0x04
1196
1197 BOOL
1198 WINAPI
1199 SymGetTypeInfo(
1200 _In_ HANDLE,
1201 _In_ DWORD64,
1202 _In_ ULONG,
1203 _In_ IMAGEHLP_SYMBOL_TYPE_INFO,
1204 _Out_ PVOID);
1205
1206 BOOL
1207 WINAPI
1208 SymGetTypeInfoEx(
1209 _In_ HANDLE,
1210 _In_ DWORD64,
1211 _Inout_ PIMAGEHLP_GET_TYPE_INFO_PARAMS);
1212
1213 typedef BOOL
1214 (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(
1215 _In_ PSYMBOL_INFO,
1216 _In_ ULONG,
1217 _In_opt_ PVOID);
1218
1219 typedef BOOL
1220 (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACKW)(
1221 _In_ PSYMBOL_INFOW,
1222 _In_ ULONG,
1223 _In_opt_ PVOID);
1224
1225 BOOL
1226 WINAPI
1227 SymEnumTypes(
1228 _In_ HANDLE,
1229 _In_ ULONG64,
1230 _In_ PSYM_ENUMERATESYMBOLS_CALLBACK,
1231 _In_opt_ PVOID);
1232
1233 BOOL
1234 WINAPI
1235 SymEnumTypesW(
1236 _In_ HANDLE,
1237 _In_ ULONG64,
1238 _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW,
1239 _In_opt_ PVOID);
1240
1241 BOOL
1242 WINAPI
1243 SymFromAddr(
1244 _In_ HANDLE,
1245 _In_ DWORD64,
1246 _Out_opt_ DWORD64*,
1247 _Inout_ SYMBOL_INFO*);
1248
1249 BOOL
1250 WINAPI
1251 SymFromAddrW(
1252 _In_ HANDLE,
1253 _In_ DWORD64,
1254 _Out_opt_ DWORD64*,
1255 _Inout_ SYMBOL_INFOW*);
1256
1257 BOOL
1258 WINAPI
1259 SymFromToken(
1260 _In_ HANDLE,
1261 _In_ DWORD64,
1262 _In_ DWORD,
1263 _Inout_ PSYMBOL_INFO);
1264
1265 BOOL
1266 WINAPI
1267 SymFromTokenW(
1268 _In_ HANDLE,
1269 _In_ DWORD64,
1270 _In_ DWORD,
1271 _Inout_ PSYMBOL_INFOW);
1272
1273 BOOL WINAPI SymFromName(_In_ HANDLE, _In_ PCSTR, _Inout_ PSYMBOL_INFO);
1274 BOOL WINAPI SymFromNameW(_In_ HANDLE, _In_ PCWSTR, _Inout_ PSYMBOL_INFOW);
1275
1276 BOOL
1277 WINAPI
1278 SymGetSymFromAddr64(
1279 _In_ HANDLE,
1280 _In_ DWORD64,
1281 _Out_opt_ PDWORD64,
1282 _Inout_ PIMAGEHLP_SYMBOL64);
1283
1284 BOOL
1285 WINAPI
1286 SymGetSymFromName64(
1287 _In_ HANDLE,
1288 _In_ PCSTR,
1289 _Inout_ PIMAGEHLP_SYMBOL64);
1290
1291 BOOL
1292 WINAPI
1293 SymGetTypeFromName(
1294 _In_ HANDLE,
1295 _In_ ULONG64,
1296 _In_ PCSTR,
1297 _Inout_ PSYMBOL_INFO);
1298
1299 BOOL
1300 WINAPI
1301 SymGetTypeFromNameW(
1302 _In_ HANDLE,
1303 _In_ ULONG64,
1304 _In_ PCWSTR,
1305 _Inout_ PSYMBOL_INFOW);
1306
1307 BOOL WINAPI SymGetSymNext64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL64);
1308 BOOL WINAPI SymGetSymNextW64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW64);
1309 BOOL WINAPI SymGetSymPrev64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL64);
1310 BOOL WINAPI SymGetSymPrevW64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW64);
1311
1312 BOOL
1313 WINAPI
1314 SymEnumSym(
1315 _In_ HANDLE,
1316 _In_ ULONG64,
1317 _In_ PSYM_ENUMERATESYMBOLS_CALLBACK,
1318 _In_opt_ PVOID);
1319
1320 BOOL
1321 WINAPI
1322 SymEnumSymbols(
1323 _In_ HANDLE,
1324 _In_ ULONG64,
1325 _In_opt_ PCSTR,
1326 _In_ PSYM_ENUMERATESYMBOLS_CALLBACK,
1327 _In_opt_ PVOID);
1328
1329 BOOL
1330 WINAPI
1331 SymEnumSymbolsW(
1332 _In_ HANDLE,
1333 _In_ ULONG64,
1334 _In_opt_ PCWSTR,
1335 _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW,
1336 _In_opt_ PVOID);
1337
1338 typedef BOOL
1339 (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(
1340 _In_ PCSTR,
1341 _In_ DWORD64,
1342 _In_ ULONG,
1343 _In_opt_ PVOID);
1344
1345 typedef BOOL
1346 (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)(
1347 _In_ PCWSTR,
1348 _In_ DWORD64,
1349 _In_ ULONG,
1350 _In_opt_ PVOID);
1351
1352 BOOL
1353 WINAPI
1354 SymEnumerateSymbols64(
1355 _In_ HANDLE,
1356 _In_ ULONG64,
1357 _In_ PSYM_ENUMSYMBOLS_CALLBACK64,
1358 _In_opt_ PVOID);
1359
1360 BOOL
1361 WINAPI
1362 SymEnumerateSymbolsW64(
1363 _In_ HANDLE,
1364 _In_ ULONG64,
1365 _In_ PSYM_ENUMSYMBOLS_CALLBACK64W,
1366 _In_opt_ PVOID);
1367
1368 BOOL
1369 WINAPI
1370 SymEnumSymbolsForAddr(
1371 _In_ HANDLE,
1372 _In_ DWORD64,
1373 _In_ PSYM_ENUMERATESYMBOLS_CALLBACK,
1374 _In_opt_ PVOID);
1375
1376 BOOL
1377 WINAPI
1378 SymEnumSymbolsForAddrW(
1379 _In_ HANDLE,
1380 _In_ DWORD64,
1381 _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW,
1382 _In_opt_ PVOID);
1383
1384 typedef BOOL
1385 (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(
1386 _In_ HANDLE,
1387 _In_ ULONG,
1388 _In_opt_ ULONG64,
1389 _In_opt_ ULONG64);
1390
1391 BOOL
1392 WINAPI
1393 SymRegisterCallback64(
1394 _In_ HANDLE,
1395 _In_ PSYMBOL_REGISTERED_CALLBACK64,
1396 _In_ ULONG64);
1397
1398 BOOL
1399 WINAPI
1400 SymRegisterCallbackW64(
1401 _In_ HANDLE,
1402 _In_ PSYMBOL_REGISTERED_CALLBACK64,
1403 _In_ ULONG64);
1404
1405 BOOL
1406 WINAPI
1407 SymUnDName64(
1408 _In_ PIMAGEHLP_SYMBOL64,
1409 _Out_writes_(UnDecNameLength) PSTR,
1410 _In_ DWORD UnDecNameLength);
1411
1412 BOOL WINAPI SymMatchString(_In_ PCSTR, _In_ PCSTR, _In_ BOOL);
1413 BOOL WINAPI SymMatchStringA(_In_ PCSTR, _In_ PCSTR, _In_ BOOL);
1414 BOOL WINAPI SymMatchStringW(_In_ PCWSTR, _In_ PCWSTR, _In_ BOOL);
1415
1416 BOOL
1417 WINAPI
1418 SymSearch(
1419 _In_ HANDLE,
1420 _In_ ULONG64,
1421 _In_opt_ DWORD,
1422 _In_opt_ DWORD,
1423 _In_opt_ PCSTR,
1424 _In_opt_ DWORD64,
1425 _In_ PSYM_ENUMERATESYMBOLS_CALLBACK,
1426 _In_opt_ PVOID,
1427 _In_ DWORD);
1428
1429 BOOL
1430 WINAPI
1431 SymSearchW(
1432 _In_ HANDLE,
1433 _In_ ULONG64,
1434 _In_opt_ DWORD,
1435 _In_opt_ DWORD,
1436 _In_opt_ PCWSTR,
1437 _In_opt_ DWORD64,
1438 _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW,
1439 _In_opt_ PVOID,
1440 _In_ DWORD);
1441
1442 DWORD
1443 WINAPI
1444 UnDecorateSymbolName(
1445 _In_ PCSTR,
1446 _Out_writes_(maxStringLength) PSTR,
1447 _In_ DWORD maxStringLength,
1448 _In_ DWORD);
1449
1450 DWORD
1451 WINAPI
1452 UnDecorateSymbolNameW(
1453 _In_ PCWSTR,
1454 _Out_writes_(maxStringLength) PWSTR,
1455 _In_ DWORD maxStringLength,
1456 _In_ DWORD);
1457
1458 BOOL
1459 WINAPI
1460 SymGetScope(
1461 _In_ HANDLE,
1462 _In_ ULONG64,
1463 _In_ DWORD,
1464 _Inout_ PSYMBOL_INFO);
1465
1466 BOOL
1467 WINAPI
1468 SymGetScopeW(
1469 _In_ HANDLE,
1470 _In_ ULONG64,
1471 _In_ DWORD,
1472 _Inout_ PSYMBOL_INFOW);
1473
1474 BOOL
1475 WINAPI
1476 SymFromIndex(
1477 _In_ HANDLE,
1478 _In_ ULONG64,
1479 _In_ DWORD,
1480 _Inout_ PSYMBOL_INFO);
1481
1482 BOOL
1483 WINAPI
1484 SymFromIndexW(
1485 _In_ HANDLE,
1486 _In_ ULONG64,
1487 _In_ DWORD,
1488 _Inout_ PSYMBOL_INFOW);
1489
1490 BOOL
1491 WINAPI
1492 SymAddSymbol(
1493 _In_ HANDLE,
1494 _In_ ULONG64,
1495 _In_ PCSTR,
1496 _In_ DWORD64,
1497 _In_ DWORD,
1498 _In_ DWORD);
1499
1500 BOOL
1501 WINAPI
1502 SymAddSymbolW(
1503 _In_ HANDLE,
1504 _In_ ULONG64,
1505 _In_ PCWSTR,
1506 _In_ DWORD64,
1507 _In_ DWORD,
1508 _In_ DWORD);
1509
1510 BOOL
1511 WINAPI
1512 SymDeleteSymbol(
1513 _In_ HANDLE,
1514 _In_ ULONG64,
1515 _In_opt_ PCSTR,
1516 _In_ DWORD64,
1517 _In_ DWORD);
1518
1519 BOOL
1520 WINAPI
1521 SymDeleteSymbolW(
1522 _In_ HANDLE,
1523 _In_ ULONG64,
1524 _In_opt_ PCWSTR,
1525 _In_ DWORD64,
1526 _In_ DWORD);
1527
1528 /*************************
1529 * Source Files *
1530 *************************/
1531
1532 typedef BOOL
1533 (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)(
1534 _In_ PSOURCEFILE,
1535 _In_opt_ PVOID);
1536
1537 typedef BOOL
1538 (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACKW)(
1539 _In_ PSOURCEFILEW,
1540 _In_opt_ PVOID);
1541
1542 BOOL
1543 WINAPI
1544 SymEnumSourceFiles(
1545 _In_ HANDLE,
1546 _In_ ULONG64,
1547 _In_opt_ PCSTR,
1548 _In_ PSYM_ENUMSOURCEFILES_CALLBACK,
1549 _In_opt_ PVOID);
1550
1551 BOOL
1552 WINAPI
1553 SymEnumSourceFilesW(
1554 _In_ HANDLE,
1555 _In_ ULONG64,
1556 _In_opt_ PCWSTR,
1557 _In_ PSYM_ENUMSOURCEFILES_CALLBACKW,
1558 _In_opt_ PVOID);
1559
1560 BOOL
1561 WINAPI
1562 SymGetLineFromAddr64(
1563 _In_ HANDLE,
1564 _In_ DWORD64,
1565 _Out_ PDWORD,
1566 _Out_ PIMAGEHLP_LINE64);
1567
1568 BOOL
1569 WINAPI
1570 SymGetLineFromAddrW64(
1571 _In_ HANDLE,
1572 _In_ DWORD64,
1573 _Out_ PDWORD,
1574 _Out_ PIMAGEHLP_LINEW64);
1575
1576 BOOL WINAPI SymGetLinePrev64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE64);
1577 BOOL WINAPI SymGetLinePrevW64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW64);
1578 BOOL WINAPI SymGetLineNext64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE64);
1579 BOOL WINAPI SymGetLineNextW64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW64);
1580
1581 BOOL
1582 WINAPI
1583 SymGetLineFromName64(
1584 _In_ HANDLE,
1585 _In_opt_ PCSTR,
1586 _In_opt_ PCSTR,
1587 _In_ DWORD,
1588 _Out_ PLONG,
1589 _Inout_ PIMAGEHLP_LINE64);
1590
1591 BOOL
1592 WINAPI
1593 SymGetLineFromNameW64(
1594 _In_ HANDLE,
1595 _In_opt_ PCWSTR,
1596 _In_opt_ PCWSTR,
1597 _In_ DWORD,
1598 _Out_ PLONG,
1599 _Inout_ PIMAGEHLP_LINEW64);
1600
1601 ULONG
1602 WINAPI
1603 SymGetFileLineOffsets64(
1604 _In_ HANDLE,
1605 _In_opt_ PCSTR,
1606 _In_ PCSTR,
1607 _Out_writes_(BufferLines) PDWORD64,
1608 _In_ ULONG BufferLines);
1609
1610 BOOL
1611 WINAPI
1612 SymGetSourceFile(
1613 _In_ HANDLE,
1614 _In_ ULONG64,
1615 _In_opt_ PCSTR,
1616 _In_ PCSTR,
1617 _Out_writes_(Size) PSTR,
1618 _In_ DWORD Size);
1619
1620 BOOL
1621 WINAPI
1622 SymGetSourceFileW(
1623 _In_ HANDLE,
1624 _In_ ULONG64,
1625 _In_opt_ PCWSTR,
1626 _In_ PCWSTR,
1627 _Out_writes_(Size) PWSTR,
1628 _In_ DWORD Size);
1629
1630 BOOL
1631 WINAPI
1632 SymGetSourceFileToken(
1633 _In_ HANDLE,
1634 _In_ ULONG64,
1635 _In_ PCSTR,
1636 _Outptr_ PVOID*,
1637 _Out_ DWORD*);
1638
1639 BOOL
1640 WINAPI
1641 SymGetSourceFileTokenW(
1642 _In_ HANDLE,
1643 _In_ ULONG64,
1644 _In_ PCWSTR,
1645 _Outptr_ PVOID*,
1646 _Out_ DWORD*);
1647
1648 BOOL
1649 WINAPI
1650 SymGetSourceFileFromToken(
1651 _In_ HANDLE,
1652 _In_ PVOID,
1653 _In_opt_ PCSTR,
1654 _Out_writes_(Size) PSTR,
1655 _In_ DWORD Size);
1656
1657 BOOL
1658 WINAPI
1659 SymGetSourceFileFromTokenW(
1660 _In_ HANDLE,
1661 _In_ PVOID,
1662 _In_opt_ PCWSTR,
1663 _Out_writes_(Size) PWSTR,
1664 _In_ DWORD Size);
1665
1666 BOOL
1667 WINAPI
1668 SymGetSourceVarFromToken(
1669 _In_ HANDLE,
1670 _In_ PVOID,
1671 _In_opt_ PCSTR,
1672 _In_ PCSTR,
1673 _Out_writes_(Size) PSTR,
1674 _In_ DWORD Size);
1675
1676 BOOL
1677 WINAPI
1678 SymGetSourceVarFromTokenW(
1679 _In_ HANDLE,
1680 _In_ PVOID,
1681 _In_opt_ PCWSTR,
1682 _In_ PCWSTR,
1683 _Out_writes_(Size) PWSTR,
1684 _In_ DWORD Size);
1685
1686 typedef struct _SRCCODEINFO
1687 {
1688 DWORD SizeOfStruct;
1689 PVOID Key;
1690 DWORD64 ModBase;
1691 CHAR Obj[MAX_PATH+1];
1692 CHAR FileName[MAX_PATH+1];
1693 DWORD LineNumber;
1694 DWORD64 Address;
1695 } SRCCODEINFO, *PSRCCODEINFO;
1696
1697 typedef struct _SRCCODEINFOW
1698 {
1699 DWORD SizeOfStruct;
1700 PVOID Key;
1701 DWORD64 ModBase;
1702 WCHAR Obj[MAX_PATH+1];
1703 WCHAR FileName[MAX_PATH+1];
1704 DWORD LineNumber;
1705 DWORD64 Address;
1706 } SRCCODEINFOW, *PSRCCODEINFOW;
1707
1708 typedef BOOL
1709 (CALLBACK* PSYM_ENUMLINES_CALLBACK)(
1710 _In_ PSRCCODEINFO,
1711 _In_opt_ PVOID);
1712
1713 typedef BOOL
1714 (CALLBACK* PSYM_ENUMLINES_CALLBACKW)(
1715 _In_ PSRCCODEINFOW,
1716 _In_opt_ PVOID);
1717
1718 BOOL
1719 WINAPI
1720 SymEnumLines(
1721 _In_ HANDLE,
1722 _In_ ULONG64,
1723 _In_opt_ PCSTR,
1724 _In_opt_ PCSTR,
1725 _In_ PSYM_ENUMLINES_CALLBACK,
1726 _In_opt_ PVOID);
1727
1728 BOOL
1729 WINAPI
1730 SymEnumLinesW(
1731 _In_ HANDLE,
1732 _In_ ULONG64,
1733 _In_opt_ PCWSTR,
1734 _In_opt_ PCWSTR,
1735 _In_ PSYM_ENUMLINES_CALLBACKW,
1736 _In_opt_ PVOID);
1737
1738 BOOL
1739 WINAPI
1740 SymEnumSourceLines(
1741 _In_ HANDLE,
1742 _In_ ULONG64,
1743 _In_opt_ PCSTR,
1744 _In_opt_ PCSTR,
1745 _In_opt_ DWORD,
1746 _In_ DWORD,
1747 _In_ PSYM_ENUMLINES_CALLBACK,
1748 _In_opt_ PVOID);
1749
1750 BOOL
1751 WINAPI
1752 SymEnumSourceLinesW(
1753 _In_ HANDLE,
1754 _In_ ULONG64,
1755 _In_opt_ PCWSTR,
1756 _In_opt_ PCWSTR,
1757 _In_opt_ DWORD,
1758 _In_ DWORD,
1759 _In_ PSYM_ENUMLINES_CALLBACKW,
1760 _In_opt_ PVOID);
1761
1762 /*************************
1763 * File & image handling *
1764 *************************/
1765
1766 BOOL WINAPI SymInitialize(_In_ HANDLE, _In_opt_ PCSTR, _In_ BOOL);
1767 BOOL WINAPI SymInitializeW(_In_ HANDLE, _In_opt_ PCWSTR, _In_ BOOL);
1768 BOOL WINAPI SymCleanup(_In_ HANDLE);
1769
1770 HANDLE
1771 WINAPI
1772 FindDebugInfoFile(
1773 _In_ PCSTR,
1774 _In_ PCSTR,
1775 _Out_writes_(MAX_PATH + 1) PSTR);
1776
1777 typedef BOOL
1778 (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(
1779 _In_ HANDLE,
1780 _In_ PCSTR,
1781 _In_ PVOID);
1782
1783 typedef BOOL
1784 (CALLBACK *PFIND_DEBUG_FILE_CALLBACKW)(
1785 _In_ HANDLE,
1786 _In_ PCWSTR,
1787 _In_ PVOID);
1788
1789 HANDLE
1790 WINAPI
1791 FindDebugInfoFileEx(
1792 _In_ PCSTR,
1793 _In_ PCSTR,
1794 _Out_writes_(MAX_PATH + 1) PSTR,
1795 _In_opt_ PFIND_DEBUG_FILE_CALLBACK,
1796 _In_opt_ PVOID);
1797
1798 HANDLE
1799 WINAPI
1800 FindDebugInfoFileExW(
1801 _In_ PCWSTR,
1802 _In_ PCWSTR,
1803 _Out_writes_(MAX_PATH + 1) PWSTR,
1804 _In_opt_ PFIND_DEBUG_FILE_CALLBACKW,
1805 _In_opt_ PVOID);
1806
1807 HANDLE
1808 WINAPI
1809 SymFindDebugInfoFile(
1810 _In_ HANDLE,
1811 _In_ PCSTR,
1812 _Out_writes_(MAX_PATH + 1) PSTR,
1813 _In_opt_ PFIND_DEBUG_FILE_CALLBACK,
1814 _In_opt_ PVOID);
1815
1816 HANDLE
1817 WINAPI
1818 SymFindDebugInfoFileW(
1819 _In_ HANDLE,
1820 _In_ PCWSTR,
1821 _Out_writes_(MAX_PATH + 1) PWSTR,
1822 _In_opt_ PFIND_DEBUG_FILE_CALLBACKW,
1823 _In_opt_ PVOID);
1824
1825 typedef BOOL
1826 (CALLBACK *PFINDFILEINPATHCALLBACK)(
1827 _In_ PCSTR,
1828 _In_ PVOID);
1829
1830 typedef BOOL
1831 (CALLBACK *PFINDFILEINPATHCALLBACKW)(
1832 _In_ PCWSTR,
1833 _In_ PVOID);
1834
1835 BOOL WINAPI FindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD,
1836 PSTR, PFINDFILEINPATHCALLBACK, PVOID);
1837
1838 BOOL
1839 WINAPI
1840 SymFindFileInPath(
1841 _In_ HANDLE,
1842 _In_opt_ PCSTR,
1843 _In_ PCSTR,
1844 _In_opt_ PVOID,
1845 _In_ DWORD,
1846 _In_ DWORD,
1847 _In_ DWORD,
1848 _Out_writes_(MAX_PATH + 1) PSTR,
1849 _In_opt_ PFINDFILEINPATHCALLBACK,
1850 _In_opt_ PVOID);
1851
1852 BOOL
1853 WINAPI
1854 SymFindFileInPathW(
1855 _In_ HANDLE,
1856 _In_opt_ PCWSTR,
1857 _In_ PCWSTR,
1858 _In_opt_ PVOID,
1859 _In_ DWORD,
1860 _In_ DWORD,
1861 _In_ DWORD,
1862 _Out_writes_(MAX_PATH + 1) PWSTR,
1863 _In_opt_ PFINDFILEINPATHCALLBACKW,
1864 _In_opt_ PVOID);
1865
1866 HANDLE
1867 WINAPI
1868 FindExecutableImage(
1869 _In_ PCSTR,
1870 _In_ PCSTR,
1871 _Out_writes_(MAX_PATH + 1) PSTR);
1872
1873 typedef BOOL
1874 (CALLBACK *PFIND_EXE_FILE_CALLBACK)(
1875 _In_ HANDLE,
1876 _In_ PCSTR,
1877 _In_opt_ PVOID);
1878
1879 typedef BOOL
1880 (CALLBACK *PFIND_EXE_FILE_CALLBACKW)(
1881 _In_ HANDLE,
1882 _In_ PCWSTR,
1883 _In_opt_ PVOID);
1884
1885 HANDLE
1886 WINAPI
1887 FindExecutableImageEx(
1888 _In_ PCSTR,
1889 _In_ PCSTR,
1890 _Out_writes_(MAX_PATH + 1) PSTR,
1891 _In_opt_ PFIND_EXE_FILE_CALLBACK,
1892 _In_opt_ PVOID);
1893
1894 HANDLE
1895 WINAPI
1896 FindExecutableImageExW(
1897 _In_ PCWSTR,
1898 _In_ PCWSTR,
1899 _Out_writes_(MAX_PATH + 1) PWSTR,
1900 _In_opt_ PFIND_EXE_FILE_CALLBACKW,
1901 _In_opt_ PVOID);
1902
1903 HANDLE
1904 WINAPI
1905 SymFindExecutableImage(
1906 _In_ HANDLE,
1907 _In_ PCSTR,
1908 _Out_writes_(MAX_PATH + 1) PSTR,
1909 _In_ PFIND_EXE_FILE_CALLBACK,
1910 _In_ PVOID);
1911
1912 HANDLE
1913 WINAPI
1914 SymFindExecutableImageW(
1915 _In_ HANDLE,
1916 _In_ PCWSTR,
1917 _Out_writes_(MAX_PATH + 1) PWSTR,
1918 _In_ PFIND_EXE_FILE_CALLBACKW,
1919 _In_ PVOID);
1920
1921 PIMAGE_NT_HEADERS WINAPI ImageNtHeader(_In_ PVOID);
1922
1923 PVOID
1924 WINAPI
1925 ImageDirectoryEntryToDataEx(
1926 _In_ PVOID,
1927 _In_ BOOLEAN,
1928 _In_ USHORT,
1929 _Out_ PULONG,
1930 _Out_opt_ PIMAGE_SECTION_HEADER *);
1931
1932 PVOID
1933 WINAPI
1934 ImageDirectoryEntryToData(
1935 _In_ PVOID,
1936 _In_ BOOLEAN,
1937 _In_ USHORT,
1938 _Out_ PULONG);
1939
1940 PIMAGE_SECTION_HEADER
1941 WINAPI
1942 ImageRvaToSection(
1943 _In_ PIMAGE_NT_HEADERS,
1944 _In_ PVOID,
1945 _In_ ULONG);
1946
1947 PVOID
1948 WINAPI
1949 ImageRvaToVa(
1950 _In_ PIMAGE_NT_HEADERS,
1951 _In_ PVOID,
1952 _In_ ULONG,
1953 _In_opt_ PIMAGE_SECTION_HEADER*);
1954
1955 BOOL
1956 WINAPI
1957 SymGetSearchPath(
1958 _In_ HANDLE,
1959 _Out_writes_(SearchPathLength) PSTR,
1960 _In_ DWORD SearchPathLength);
1961
1962 BOOL
1963 WINAPI
1964 SymGetSearchPathW(
1965 _In_ HANDLE,
1966 _Out_writes_(SearchPathLength) PWSTR,
1967 _In_ DWORD SearchPathLength);
1968
1969 BOOL WINAPI SymSetSearchPath(_In_ HANDLE, _In_opt_ PCSTR);
1970 BOOL WINAPI SymSetSearchPathW(_In_ HANDLE, _In_opt_ PCWSTR);
1971 DWORD WINAPI GetTimestampForLoadedLibrary(_In_ HMODULE);
1972 BOOL WINAPI MakeSureDirectoryPathExists(_In_ PCSTR);
1973
1974 BOOL
1975 WINAPI
1976 SearchTreeForFile(
1977 _In_ PCSTR,
1978 _In_ PCSTR,
1979 _Out_writes_(MAX_PATH + 1) PSTR);
1980
1981 BOOL
1982 WINAPI
1983 SearchTreeForFileW(
1984 _In_ PCWSTR,
1985 _In_ PCWSTR,
1986 _Out_writes_(MAX_PATH + 1) PWSTR);
1987
1988 typedef BOOL
1989 (CALLBACK *PENUMDIRTREE_CALLBACK)(
1990 _In_ PCSTR,
1991 _In_opt_ PVOID);
1992
1993 typedef BOOL
1994 (CALLBACK *PENUMDIRTREE_CALLBACKW)(
1995 _In_ PCWSTR,
1996 _In_opt_ PVOID);
1997
1998 BOOL
1999 WINAPI
2000 EnumDirTree(
2001 _In_opt_ HANDLE,
2002 _In_ PCSTR,
2003 _In_ PCSTR,
2004 _Out_writes_opt_(MAX_PATH + 1) PSTR,
2005 _In_opt_ PENUMDIRTREE_CALLBACK,
2006 _In_opt_ PVOID);
2007
2008 BOOL
2009 WINAPI
2010 EnumDirTreeW(
2011 _In_opt_ HANDLE,
2012 _In_ PCWSTR,
2013 _In_ PCWSTR,
2014 _Out_writes_opt_(MAX_PATH + 1) PWSTR,
2015 _In_opt_ PENUMDIRTREE_CALLBACKW,
2016 _In_opt_ PVOID);
2017
2018 BOOL
2019 WINAPI
2020 SymMatchFileName(
2021 _In_ PCSTR,
2022 _In_ PCSTR,
2023 _Outptr_opt_ PSTR*,
2024 _Outptr_opt_ PSTR*);
2025
2026 BOOL
2027 WINAPI
2028 SymMatchFileNameW(
2029 _In_ PCWSTR,
2030 _In_ PCWSTR,
2031 _Outptr_opt_ PWSTR*,
2032 _Outptr_opt_ PWSTR*);
2033
2034 PCHAR WINAPI SymSetHomeDirectory(_In_opt_ HANDLE, _In_opt_ PCSTR);
2035 PWSTR WINAPI SymSetHomeDirectoryW(_In_opt_ HANDLE, _In_opt_ PCWSTR);
2036
2037 PCHAR
2038 WINAPI
2039 SymGetHomeDirectory(
2040 _In_ DWORD,
2041 _Out_writes_(size) PSTR,
2042 _In_ size_t size);
2043
2044 PWSTR
2045 WINAPI
2046 SymGetHomeDirectoryW(
2047 _In_ DWORD,
2048 _Out_writes_(size) PWSTR,
2049 _In_ size_t size);
2050
2051 #define hdBase 0
2052 #define hdSym 1
2053 #define hdSrc 2
2054 #define hdMax 3
2055
2056 /*************************
2057 * Context management *
2058 *************************/
2059
2060 BOOL
2061 WINAPI
2062 SymSetContext(
2063 _In_ HANDLE,
2064 _In_ PIMAGEHLP_STACK_FRAME,
2065 _In_opt_ PIMAGEHLP_CONTEXT);
2066
2067
2068 /*************************
2069 * Stack management *
2070 *************************/
2071
2072 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
2073 #define KDHELP KDHELP64
2074 #define PKDHELP PKDHELP64
2075 #else
2076 typedef struct _KDHELP
2077 {
2078 DWORD Thread;
2079 DWORD ThCallbackStack;
2080 DWORD NextCallback;
2081 DWORD FramePointer;
2082 DWORD KiCallUserMode;
2083 DWORD KeUserCallbackDispatcher;
2084 DWORD SystemRangeStart;
2085 } KDHELP, *PKDHELP;
2086 #endif
2087
2088 typedef struct _KDHELP64
2089 {
2090 DWORD64 Thread;
2091 DWORD ThCallbackStack;
2092 DWORD ThCallbackBStore;
2093 DWORD NextCallback;
2094 DWORD FramePointer;
2095 DWORD64 KiCallUserMode;
2096 DWORD64 KeUserCallbackDispatcher;
2097 DWORD64 SystemRangeStart;
2098 DWORD64 Reserved[8];
2099 } KDHELP64, *PKDHELP64;
2100
2101 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
2102 #define STACKFRAME STACKFRAME64
2103 #define LPSTACKFRAME LPSTACKFRAME64
2104 #else
2105 typedef struct _STACKFRAME
2106 {
2107 ADDRESS AddrPC;
2108 ADDRESS AddrReturn;
2109 ADDRESS AddrFrame;
2110 ADDRESS AddrStack;
2111 PVOID FuncTableEntry;
2112 DWORD Params[4];
2113 BOOL Far;
2114 BOOL Virtual;
2115 DWORD Reserved[3];
2116 KDHELP KdHelp;
2117 ADDRESS AddrBStore;
2118 } STACKFRAME, *LPSTACKFRAME;
2119 #endif
2120
2121 typedef struct _STACKFRAME64
2122 {
2123 ADDRESS64 AddrPC;
2124 ADDRESS64 AddrReturn;
2125 ADDRESS64 AddrFrame;
2126 ADDRESS64 AddrStack;
2127 ADDRESS64 AddrBStore;
2128 PVOID FuncTableEntry;
2129 DWORD64 Params[4];
2130 BOOL Far;
2131 BOOL Virtual;
2132 DWORD64 Reserved[3];
2133 KDHELP64 KdHelp;
2134 } STACKFRAME64, *LPSTACKFRAME64;
2135
2136 typedef BOOL
2137 (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE64)(
2138 _In_ HANDLE,
2139 _In_ DWORD64,
2140 _Out_writes_bytes_(nSize) PVOID,
2141 _In_ DWORD nSize,
2142 _Out_ PDWORD);
2143
2144 typedef PVOID
2145 (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE64)(
2146 _In_ HANDLE,
2147 _In_ DWORD64);
2148
2149 typedef DWORD64
2150 (CALLBACK *PGET_MODULE_BASE_ROUTINE64)(
2151 _In_ HANDLE,
2152 _In_ DWORD64);
2153
2154 typedef DWORD64
2155 (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE64)(
2156 _In_ HANDLE,
2157 _In_ HANDLE,
2158 _In_ LPADDRESS64);
2159
2160 BOOL
2161 WINAPI
2162 StackWalk64(
2163 _In_ DWORD,
2164 _In_ HANDLE,
2165 _In_ HANDLE,
2166 _Inout_ LPSTACKFRAME64,
2167 _Inout_ PVOID,
2168 _In_opt_ PREAD_PROCESS_MEMORY_ROUTINE64,
2169 _In_opt_ PFUNCTION_TABLE_ACCESS_ROUTINE64,
2170 _In_opt_ PGET_MODULE_BASE_ROUTINE64,
2171 _In_opt_ PTRANSLATE_ADDRESS_ROUTINE64);
2172
2173 PVOID WINAPI SymFunctionTableAccess64(_In_ HANDLE, _In_ DWORD64);
2174
2175 typedef PVOID
2176 (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(
2177 _In_ HANDLE,
2178 _In_ ULONG64,
2179 _In_ ULONG64);
2180
2181 BOOL
2182 WINAPI
2183 SymRegisterFunctionEntryCallback64(
2184 _In_ HANDLE,
2185 _In_ PSYMBOL_FUNCENTRY_CALLBACK64,
2186 _In_ ULONG64);
2187
2188 /*************************
2189 * Version, global stuff *
2190 *************************/
2191
2192 #define API_VERSION_NUMBER 9
2193
2194 typedef struct API_VERSION
2195 {
2196 USHORT MajorVersion;
2197 USHORT MinorVersion;
2198 USHORT Revision;
2199 USHORT Reserved;
2200 } API_VERSION, *LPAPI_VERSION;
2201
2202 LPAPI_VERSION WINAPI ImagehlpApiVersion(void);
2203 LPAPI_VERSION WINAPI ImagehlpApiVersionEx(_In_ LPAPI_VERSION);
2204
2205 typedef struct _IMAGE_DEBUG_INFORMATION
2206 {
2207 LIST_ENTRY List;
2208 DWORD ReservedSize;
2209 PVOID ReservedMappedBase;
2210 USHORT ReservedMachine;
2211 USHORT ReservedCharacteristics;
2212 DWORD ReservedCheckSum;
2213 DWORD ImageBase;
2214 DWORD SizeOfImage;
2215 DWORD ReservedNumberOfSections;
2216 PIMAGE_SECTION_HEADER ReservedSections;
2217 DWORD ReservedExportedNamesSize;
2218 PSTR ReservedExportedNames;
2219 DWORD ReservedNumberOfFunctionTableEntries;
2220 PIMAGE_FUNCTION_ENTRY ReservedFunctionTableEntries;
2221 DWORD ReservedLowestFunctionStartingAddress;
2222 DWORD ReservedHighestFunctionEndingAddress;
2223 DWORD ReservedNumberOfFpoTableEntries;
2224 PFPO_DATA ReservedFpoTableEntries;
2225 DWORD SizeOfCoffSymbols;
2226 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols;
2227 DWORD ReservedSizeOfCodeViewSymbols;
2228 PVOID ReservedCodeViewSymbols;
2229 PSTR ImageFilePath;
2230 PSTR ImageFileName;
2231 PSTR ReservedDebugFilePath;
2232 DWORD ReservedTimeDateStamp;
2233 BOOL ReservedRomImage;
2234 PIMAGE_DEBUG_DIRECTORY ReservedDebugDirectory;
2235 DWORD ReservedNumberOfDebugDirectories;
2236 DWORD ReservedOriginalFunctionTableBaseAddress;
2237 DWORD Reserved[ 2 ];
2238 } IMAGE_DEBUG_INFORMATION, *PIMAGE_DEBUG_INFORMATION;
2239
2240
2241 PIMAGE_DEBUG_INFORMATION
2242 WINAPI
2243 MapDebugInformation(
2244 _In_opt_ HANDLE,
2245 _In_ PCSTR,
2246 _In_opt_ PCSTR,
2247 _In_ ULONG);
2248
2249 BOOL WINAPI UnmapDebugInformation(_Out_ PIMAGE_DEBUG_INFORMATION);
2250
2251 DWORD WINAPI SymGetOptions(void);
2252 DWORD WINAPI SymSetOptions(_In_ DWORD);
2253
2254 BOOL WINAPI SymSetParentWindow(_In_ HWND);
2255
2256 /*************************
2257 * Version, global stuff *
2258 *************************/
2259
2260 typedef BOOL (WINAPI* PSYMBOLSERVERPROC)(PCSTR, PCSTR, PVOID, DWORD, DWORD, PSTR);
2261 typedef BOOL (WINAPI* PSYMBOLSERVERPROCA)(PCSTR, PCSTR, PVOID, DWORD, DWORD, PSTR);
2262 typedef BOOL (WINAPI* PSYMBOLSERVERPROCW)(PCWSTR, PCWSTR, PVOID, DWORD, DWORD, PWSTR);
2263 typedef BOOL (WINAPI* PSYMBOLSERVEROPENPROC)(void);
2264 typedef BOOL (WINAPI* PSYMBOLSERVERCLOSEPROC)(void);
2265 typedef BOOL (WINAPI* PSYMBOLSERVERSETOPTIONSPROC)(UINT_PTR, ULONG64);
2266 typedef BOOL (CALLBACK* PSYMBOLSERVERCALLBACKPROC)(UINT_PTR, ULONG64, ULONG64);
2267 typedef UINT_PTR (WINAPI* PSYMBOLSERVERGETOPTIONSPROC)(void);
2268 typedef BOOL (WINAPI* PSYMBOLSERVERPINGPROC)(PCSTR);
2269 typedef BOOL (WINAPI* PSYMBOLSERVERPINGPROCA)(PCSTR);
2270 typedef BOOL (WINAPI* PSYMBOLSERVERPINGPROCW)(PCWSTR);
2271
2272 #define SSRVOPT_CALLBACK 0x0001
2273 #define SSRVOPT_DWORD 0x0002
2274 #define SSRVOPT_DWORDPTR 0x0004
2275 #define SSRVOPT_GUIDPTR 0x0008
2276 #define SSRVOPT_OLDGUIDPTR 0x0010
2277 #define SSRVOPT_UNATTENDED 0x0020
2278 #define SSRVOPT_NOCOPY 0x0040
2279 #define SSRVOPT_PARENTWIN 0x0080
2280 #define SSRVOPT_PARAMTYPE 0x0100
2281 #define SSRVOPT_SECURE 0x0200
2282 #define SSRVOPT_TRACE 0x0400
2283 #define SSRVOPT_SETCONTEXT 0x0800
2284 #define SSRVOPT_PROXY 0x1000
2285 #define SSRVOPT_DOWNSTREAM_STORE 0x2000
2286 #define SSRVOPT_RESET ((ULONG_PTR)-1)
2287
2288 #define SSRVACTION_TRACE 1
2289 #define SSRVACTION_QUERYCANCEL 2
2290 #define SSRVACTION_EVENT 3
2291
2292 /* 32-bit functions */
2293
2294 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
2295
2296 #define PENUMLOADED_MODULES_CALLBACK PENUMLOADED_MODULES_CALLBACK64
2297 #define PFUNCTION_TABLE_ACCESS_ROUTINE PFUNCTION_TABLE_ACCESS_ROUTINE64
2298 #define PGET_MODULE_BASE_ROUTINE PGET_MODULE_BASE_ROUTINE64
2299 #define PREAD_PROCESS_MEMORY_ROUTINE PREAD_PROCESS_MEMORY_ROUTINE64
2300 #define PSYMBOL_FUNCENTRY_CALLBACK PSYMBOL_FUNCENTRY_CALLBACK64
2301 #define PSYMBOL_REGISTERED_CALLBACK PSYMBOL_REGISTERED_CALLBACK64
2302 #define PSYM_ENUMMODULES_CALLBACK PSYM_ENUMMODULES_CALLBACK64
2303 #define PSYM_ENUMSYMBOLS_CALLBACK PSYM_ENUMSYMBOLS_CALLBACK64
2304 #define PSYM_ENUMSYMBOLS_CALLBACKW PSYM_ENUMSYMBOLS_CALLBACKW64
2305 #define PTRANSLATE_ADDRESS_ROUTINE PTRANSLATE_ADDRESS_ROUTINE64
2306
2307 #define EnumerateLoadedModules EnumerateLoadedModules64
2308 #define StackWalk StackWalk64
2309 #define SymEnumerateModules SymEnumerateModules64
2310 #define SymEnumerateSymbols SymEnumerateSymbols64
2311 #define SymEnumerateSymbolsW SymEnumerateSymbolsW64
2312 #define SymFunctionTableAccess SymFunctionTableAccess64
2313 #define SymGetLineFromAddr SymGetLineFromAddr64
2314 #define SymGetLineFromAddrW SymGetLineFromAddrW64
2315 #define SymGetLineFromName SymGetLineFromName64
2316 #define SymGetLineNext SymGetLineNext64
2317 #define SymGetLineNextW SymGetLineNextW64
2318 #define SymGetLinePrev SymGetLinePrev64
2319 #define SymGetLinePrevW SymGetLinePrevW64
2320 #define SymGetModuleBase SymGetModuleBase64
2321 #define SymGetModuleInfo SymGetModuleInfo64
2322 #define SymGetModuleInfoW SymGetModuleInfoW64
2323 #define SymGetSymFromAddr SymGetSymFromAddr64
2324 #define SymGetSymFromName SymGetSymFromName64
2325 #define SymGetSymNext SymGetSymNext64
2326 #define SymGetSymNextW SymGetSymNextW64
2327 #define SymGetSymPrev SymGetSymPrev64
2328 #define SymGetSymPrevW SymGetSymPrevW64
2329 #define SymLoadModule SymLoadModule64
2330 #define SymRegisterCallback SymRegisterCallback64
2331 #define SymRegisterFunctionEntryCallback SymRegisterFunctionEntryCallback64
2332 #define SymUnDName SymUnDName64
2333 #define SymUnloadModule SymUnloadModule64
2334
2335 #else
2336
2337 typedef BOOL
2338 (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(
2339 _In_ PCSTR,
2340 _In_ ULONG,
2341 _In_ ULONG,
2342 _In_opt_ PVOID);
2343
2344 typedef PVOID
2345 (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(
2346 _In_ HANDLE,
2347 _In_ DWORD);
2348
2349 typedef DWORD
2350 (CALLBACK *PGET_MODULE_BASE_ROUTINE)(
2351 _In_ HANDLE,
2352 _In_ DWORD);
2353
2354 typedef BOOL
2355 (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)(
2356 _In_ HANDLE,
2357 _In_ DWORD,
2358 _Out_writes_bytes_(nSize) PVOID,
2359 _In_ DWORD nSize,
2360 _Out_ PDWORD);
2361
2362 typedef BOOL
2363 (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(
2364 _In_ PCSTR,
2365 _In_ ULONG,
2366 _In_opt_ PVOID);
2367
2368 typedef BOOL
2369 (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(
2370 _In_ PCSTR,
2371 _In_ ULONG,
2372 _In_ ULONG,
2373 _In_opt_ PVOID);
2374
2375 typedef BOOL
2376 (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(
2377 _In_ PCWSTR,
2378 _In_ ULONG,
2379 _In_ ULONG,
2380 _In_opt_ PVOID);
2381
2382 typedef BOOL
2383 (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(
2384 _In_ HANDLE,
2385 _In_ ULONG,
2386 _In_opt_ PVOID,
2387 _In_opt_ PVOID);
2388
2389 typedef PVOID
2390 (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(
2391 _In_ HANDLE,
2392 _In_ DWORD,
2393 _In_opt_ PVOID);
2394
2395 typedef DWORD
2396 (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(
2397 _In_ HANDLE,
2398 _In_ HANDLE,
2399 _Out_ LPADDRESS);
2400
2401 BOOL
2402 WINAPI
2403 EnumerateLoadedModules(
2404 _In_ HANDLE,
2405 _In_ PENUMLOADED_MODULES_CALLBACK,
2406 _In_opt_ PVOID);
2407
2408 BOOL
2409 WINAPI
2410 StackWalk(
2411 _In_ DWORD,
2412 _In_ HANDLE,
2413 _In_ HANDLE,
2414 _Inout_ LPSTACKFRAME,
2415 _Inout_ PVOID,
2416 _In_opt_ PREAD_PROCESS_MEMORY_ROUTINE,
2417 _In_opt_ PFUNCTION_TABLE_ACCESS_ROUTINE,
2418 _In_opt_ PGET_MODULE_BASE_ROUTINE,
2419 _In_opt_ PTRANSLATE_ADDRESS_ROUTINE);
2420
2421 BOOL
2422 WINAPI
2423 SymEnumerateModules(
2424 _In_ HANDLE,
2425 _In_ PSYM_ENUMMODULES_CALLBACK,
2426 _In_opt_ PVOID);
2427
2428 BOOL
2429 WINAPI
2430 SymEnumerateSymbols(
2431 _In_ HANDLE,
2432 _In_ ULONG,
2433 _In_ PSYM_ENUMSYMBOLS_CALLBACK,
2434 _In_opt_ PVOID);
2435
2436 BOOL
2437 WINAPI
2438 SymEnumerateSymbolsW(
2439 _In_ HANDLE,
2440 _In_ ULONG,
2441 _In_ PSYM_ENUMSYMBOLS_CALLBACKW,
2442 _In_opt_ PVOID);
2443
2444 PVOID WINAPI SymFunctionTableAccess(_In_ HANDLE, _In_ DWORD);
2445
2446 BOOL
2447 WINAPI
2448 SymGetLineFromAddr(
2449 _In_ HANDLE,
2450 _In_ DWORD,
2451 _Out_ PDWORD,
2452 _Out_ PIMAGEHLP_LINE);
2453
2454 BOOL
2455 WINAPI
2456 SymGetLineFromAddrW(
2457 _In_ HANDLE,
2458 _In_ DWORD,
2459 _Out_ PDWORD,
2460 _Out_ PIMAGEHLP_LINEW);
2461
2462 BOOL
2463 WINAPI
2464 SymGetLineFromName(
2465 _In_ HANDLE,
2466 _In_opt_ PCSTR,
2467 _In_opt_ PCSTR,
2468 _In_ DWORD,
2469 _Out_ PLONG,
2470 _Inout_ PIMAGEHLP_LINE);
2471
2472 BOOL WINAPI SymGetLineNext(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE);
2473 BOOL WINAPI SymGetLineNextW(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW);
2474 BOOL WINAPI SymGetLinePrev(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE);
2475 BOOL WINAPI SymGetLinePrevW(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW);
2476 DWORD WINAPI SymGetModuleBase(_In_ HANDLE, _In_ DWORD);
2477
2478 BOOL
2479 WINAPI
2480 SymGetModuleInfo(
2481 _In_ HANDLE,
2482 _In_ DWORD,
2483 _Out_ PIMAGEHLP_MODULE);
2484
2485 BOOL
2486 WINAPI
2487 SymGetModuleInfoW(
2488 _In_ HANDLE,
2489 _In_ DWORD,
2490 _Out_ PIMAGEHLP_MODULEW);
2491
2492 BOOL
2493 WINAPI
2494 SymGetSymFromAddr(
2495 _In_ HANDLE,
2496 _In_ DWORD,
2497 _Out_opt_ PDWORD,
2498 _Inout_ PIMAGEHLP_SYMBOL);
2499
2500 BOOL
2501 WINAPI
2502 SymGetSymFromName(
2503 _In_ HANDLE,
2504 _In_ PCSTR,
2505 _Inout_ PIMAGEHLP_SYMBOL);
2506
2507 BOOL WINAPI SymGetSymNext(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL);
2508 BOOL WINAPI SymGetSymNextW(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW);
2509 BOOL WINAPI SymGetSymPrev(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL);
2510 BOOL WINAPI SymGetSymPrevW(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW);
2511
2512 DWORD
2513 WINAPI
2514 SymLoadModule(
2515 _In_ HANDLE,
2516 _In_opt_ HANDLE,
2517 _In_opt_ PCSTR,
2518 _In_opt_ PCSTR,
2519 _In_ DWORD,
2520 _In_ DWORD);
2521
2522 BOOL
2523 WINAPI
2524 SymRegisterCallback(
2525 _In_ HANDLE,
2526 _In_ PSYMBOL_REGISTERED_CALLBACK,
2527 _In_opt_ PVOID);
2528
2529 BOOL
2530 WINAPI
2531 SymRegisterFunctionEntryCallback(
2532 _In_ HANDLE,
2533 _In_ PSYMBOL_FUNCENTRY_CALLBACK,
2534 _In_opt_ PVOID);
2535
2536 BOOL WINAPI SymRefreshModuleList(_In_ HANDLE);
2537
2538 BOOL
2539 WINAPI
2540 SymUnDName(
2541 _In_ PIMAGEHLP_SYMBOL,
2542 _Out_writes_(UnDecNameLength) PSTR,
2543 _In_ DWORD UnDecNameLength);
2544
2545 BOOL WINAPI SymUnloadModule(_In_ HANDLE, _In_ DWORD);
2546
2547 BOOL
2548 IMAGEAPI
2549 SymSrvIsStore(
2550 _In_opt_ HANDLE hProcess,
2551 _In_ PCSTR path);
2552
2553 #endif
2554
2555 #ifdef __cplusplus
2556 } /* extern "C" */
2557 #endif /* defined(__cplusplus) */
2558
2559 #endif /* __WINE_DBGHELP_H */