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