source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/psdk_inc/_dbg_common.h@ 1181

Last change on this file since 1181 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 65.2 KB
Line 
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#pragma once
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12 typedef WINBOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(HANDLE FileHandle,PCSTR FileName,PVOID CallerData);
13 typedef WINBOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACKW)(HANDLE FileHandle,PCWSTR FileName,PVOID CallerData);
14 typedef WINBOOL (CALLBACK *PFINDFILEINPATHCALLBACK)(PCSTR filename,PVOID context);
15 typedef WINBOOL (CALLBACK *PFINDFILEINPATHCALLBACKW)(PCWSTR filename,PVOID context);
16 typedef WINBOOL (CALLBACK *PFIND_EXE_FILE_CALLBACK)(HANDLE FileHandle,PCSTR FileName,PVOID CallerData);
17 typedef WINBOOL (CALLBACK *PFIND_EXE_FILE_CALLBACKW)(HANDLE FileHandle,PCWSTR FileName,PVOID CallerData);
18
19 typedef WINBOOL (WINAPI *PSYMBOLSERVERPROC)(LPCSTR,LPCSTR,PVOID,DWORD,DWORD,LPSTR);
20 typedef WINBOOL (WINAPI *PSYMBOLSERVEROPENPROC)(VOID);
21 typedef WINBOOL (WINAPI *PSYMBOLSERVERCLOSEPROC)(VOID);
22 typedef WINBOOL (WINAPI *PSYMBOLSERVERSETOPTIONSPROC)(UINT_PTR,ULONG64);
23 typedef WINBOOL (CALLBACK WINAPI *PSYMBOLSERVERCALLBACKPROC)(UINT_PTR action,ULONG64 data,ULONG64 context);
24 typedef UINT_PTR (WINAPI *PSYMBOLSERVERGETOPTIONSPROC)();
25 typedef WINBOOL (WINAPI *PSYMBOLSERVERPINGPROC)(LPCSTR);
26
27 HANDLE IMAGEAPI FindDebugInfoFile(PCSTR FileName,PCSTR SymbolPath,PSTR DebugFilePath);
28 HANDLE IMAGEAPI FindDebugInfoFileEx(PCSTR FileName,PCSTR SymbolPath,PSTR DebugFilePath,PFIND_DEBUG_FILE_CALLBACK Callback,PVOID CallerData);
29 HANDLE IMAGEAPI FindDebugInfoFileExW(PCWSTR FileName,PCWSTR SymbolPath,PWSTR DebugFilePath,PFIND_DEBUG_FILE_CALLBACKW Callback,PVOID CallerData);
30 WINBOOL IMAGEAPI SymFindFileInPath(HANDLE hprocess,PCSTR SearchPath,PCSTR FileName,PVOID id,DWORD two,DWORD three,DWORD flags,LPSTR FoundFile,PFINDFILEINPATHCALLBACK callback,PVOID context);
31 WINBOOL IMAGEAPI SymFindFileInPathW(HANDLE hprocess,PCWSTR SearchPath,PCWSTR FileName,PVOID id,DWORD two,DWORD three,DWORD flags,LPSTR FoundFile,PFINDFILEINPATHCALLBACKW callback,PVOID context);
32 HANDLE IMAGEAPI FindExecutableImage(PCSTR FileName,PCSTR SymbolPath,PSTR ImageFilePath);
33 HANDLE IMAGEAPI FindExecutableImageEx(PCSTR FileName,PCSTR SymbolPath,PSTR ImageFilePath,PFIND_EXE_FILE_CALLBACK Callback,PVOID CallerData);
34 HANDLE IMAGEAPI FindExecutableImageExW(PCWSTR FileName,PCWSTR SymbolPath,PWSTR ImageFilePath,PFIND_EXE_FILE_CALLBACKW Callback,PVOID CallerData);
35 PIMAGE_NT_HEADERS IMAGEAPI ImageNtHeader(PVOID Base);
36 PVOID IMAGEAPI ImageDirectoryEntryToDataEx(PVOID Base,BOOLEAN MappedAsImage,USHORT DirectoryEntry,PULONG Size,PIMAGE_SECTION_HEADER *FoundHeader);
37 PVOID IMAGEAPI ImageDirectoryEntryToData(PVOID Base,BOOLEAN MappedAsImage,USHORT DirectoryEntry,PULONG Size);
38 PIMAGE_SECTION_HEADER IMAGEAPI ImageRvaToSection(PIMAGE_NT_HEADERS NtHeaders,PVOID Base,ULONG Rva);
39 PVOID IMAGEAPI ImageRvaToVa(PIMAGE_NT_HEADERS NtHeaders,PVOID Base,ULONG Rva,PIMAGE_SECTION_HEADER *LastRvaSection);
40
41#define SSRVOPT_CALLBACK 0x0001
42#define SSRVOPT_DWORD 0x0002
43#define SSRVOPT_DWORDPTR 0x0004
44#define SSRVOPT_GUIDPTR 0x0008
45#define SSRVOPT_OLDGUIDPTR 0x0010
46#define SSRVOPT_UNATTENDED 0x0020
47#define SSRVOPT_NOCOPY 0x0040
48#define SSRVOPT_PARENTWIN 0x0080
49#define SSRVOPT_PARAMTYPE 0x0100
50#define SSRVOPT_SECURE 0x0200
51#define SSRVOPT_TRACE 0x0400
52#define SSRVOPT_SETCONTEXT 0x0800
53#define SSRVOPT_PROXY 0x1000
54#define SSRVOPT_DOWNSTREAM_STORE 0x2000
55#define SSRVOPT_RESET ((ULONG_PTR)-1)
56
57#define SSRVACTION_TRACE 1
58#define SSRVACTION_QUERYCANCEL 2
59#define SSRVACTION_EVENT 3
60
61#ifndef _WIN64
62 typedef struct _IMAGE_DEBUG_INFORMATION {
63 LIST_ENTRY List;
64 DWORD ReservedSize;
65 PVOID ReservedMappedBase;
66 USHORT ReservedMachine;
67 USHORT ReservedCharacteristics;
68 DWORD ReservedCheckSum;
69 DWORD ImageBase;
70 DWORD SizeOfImage;
71 DWORD ReservedNumberOfSections;
72 PIMAGE_SECTION_HEADER ReservedSections;
73 DWORD ReservedExportedNamesSize;
74 PSTR ReservedExportedNames;
75 DWORD ReservedNumberOfFunctionTableEntries;
76 PIMAGE_FUNCTION_ENTRY ReservedFunctionTableEntries;
77 DWORD ReservedLowestFunctionStartingAddress;
78 DWORD ReservedHighestFunctionEndingAddress;
79 DWORD ReservedNumberOfFpoTableEntries;
80 PFPO_DATA ReservedFpoTableEntries;
81 DWORD SizeOfCoffSymbols;
82 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols;
83 DWORD ReservedSizeOfCodeViewSymbols;
84 PVOID ReservedCodeViewSymbols;
85 PSTR ImageFilePath;
86 PSTR ImageFileName;
87 PSTR ReservedDebugFilePath;
88 DWORD ReservedTimeDateStamp;
89 WINBOOL ReservedRomImage;
90 PIMAGE_DEBUG_DIRECTORY ReservedDebugDirectory;
91 DWORD ReservedNumberOfDebugDirectories;
92 DWORD ReservedOriginalFunctionTableBaseAddress;
93 DWORD Reserved[2];
94 } IMAGE_DEBUG_INFORMATION,*PIMAGE_DEBUG_INFORMATION;
95
96 PIMAGE_DEBUG_INFORMATION IMAGEAPI MapDebugInformation(HANDLE FileHandle,PSTR FileName,PSTR SymbolPath,DWORD ImageBase);
97 WINBOOL IMAGEAPI UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION DebugInfo);
98#endif
99
100 typedef WINBOOL (CALLBACK *PENUMDIRTREE_CALLBACK)(LPCSTR FilePath,PVOID CallerData);
101
102 WINBOOL IMAGEAPI SearchTreeForFile(PSTR RootPath,PSTR InputPathName,PSTR OutputPathBuffer);
103 WINBOOL IMAGEAPI SearchTreeForFileW(PWSTR RootPath,PWSTR InputPathName,PWSTR OutputPathBuffer);
104 WINBOOL IMAGEAPI EnumDirTree(HANDLE hProcess,PSTR RootPath,PSTR InputPathName,PSTR OutputPathBuffer,PENUMDIRTREE_CALLBACK Callback,PVOID CallbackData);
105 WINBOOL IMAGEAPI MakeSureDirectoryPathExists(PCSTR DirPath);
106
107#define UNDNAME_COMPLETE (0x0000)
108#define UNDNAME_NO_LEADING_UNDERSCORES (0x0001)
109#define UNDNAME_NO_MS_KEYWORDS (0x0002)
110#define UNDNAME_NO_FUNCTION_RETURNS (0x0004)
111#define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
112#define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
113#define UNDNAME_NO_MS_THISTYPE (0x0020)
114#define UNDNAME_NO_CV_THISTYPE (0x0040)
115#define UNDNAME_NO_THISTYPE (0x0060)
116#define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080)
117#define UNDNAME_NO_THROW_SIGNATURES (0x0100)
118#define UNDNAME_NO_MEMBER_TYPE (0x0200)
119#define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
120#define UNDNAME_32_BIT_DECODE (0x0800)
121#define UNDNAME_NAME_ONLY (0x1000)
122#define UNDNAME_NO_ARGUMENTS (0x2000)
123#define UNDNAME_NO_SPECIAL_SYMS (0x4000)
124
125#define UNDNAME_NO_ARGUMENTS (0x2000)
126#define UNDNAME_NO_SPECIAL_SYMS (0x4000)
127
128 DWORD IMAGEAPI WINAPI UnDecorateSymbolName(PCSTR DecoratedName,PSTR UnDecoratedName,DWORD UndecoratedLength,DWORD Flags);
129 DWORD IMAGEAPI WINAPI UnDecorateSymbolNameW(PCWSTR DecoratedName,PWSTR UnDecoratedName,DWORD UndecoratedLength,DWORD Flags);
130
131#ifdef DBGHELP_TRANSLATE_TCHAR
132#define UnDecorateSymbolName UnDecorateSymbolNameW
133#endif
134
135#define DBHHEADER_DEBUGDIRS 0x1
136#define DBHHEADER_CVMISC 0x2
137
138 typedef struct _MODLOAD_CVMISC {
139 DWORD oCV;
140 size_t cCV;
141 DWORD oMisc;
142 size_t cMisc;
143 DWORD dtImage;
144 DWORD cImage;
145 } MODLOAD_CVMISC, *PMODLOAD_CVMISC;
146
147 typedef enum {
148 AddrMode1616,
149 AddrMode1632,
150 AddrModeReal,
151 AddrModeFlat
152 } ADDRESS_MODE;
153
154 typedef struct _tagADDRESS64 {
155 DWORD64 Offset;
156 WORD Segment;
157 ADDRESS_MODE Mode;
158 } ADDRESS64,*LPADDRESS64;
159
160#ifdef _IMAGEHLP64
161#define ADDRESS ADDRESS64
162#define LPADDRESS LPADDRESS64
163#else
164 typedef struct _tagADDRESS {
165 DWORD Offset;
166 WORD Segment;
167 ADDRESS_MODE Mode;
168 } ADDRESS,*LPADDRESS;
169
170 static __inline void Address32To64(LPADDRESS a32,LPADDRESS64 a64) {
171 a64->Offset = (ULONG64)(LONG64)(LONG)a32->Offset;
172 a64->Segment = a32->Segment;
173 a64->Mode = a32->Mode;
174 }
175
176 static __inline void Address64To32(LPADDRESS64 a64,LPADDRESS a32) {
177 a32->Offset = (ULONG)a64->Offset;
178 a32->Segment = a64->Segment;
179 a32->Mode = a64->Mode;
180 }
181#endif
182
183 typedef struct _KDHELP64 {
184 DWORD64 Thread;
185 DWORD ThCallbackStack;
186 DWORD ThCallbackBStore;
187 DWORD NextCallback;
188 DWORD FramePointer;
189 DWORD64 KiCallUserMode;
190 DWORD64 KeUserCallbackDispatcher;
191 DWORD64 SystemRangeStart;
192 DWORD64 KiUserExceptionDispatcher;
193 DWORD64 StackBase;
194 DWORD64 StackLimit;
195 DWORD BuildVersion;
196 DWORD RetpolineStubFunctionTableSize;
197 DWORD64 RetpolineStubFunctionTable;
198 DWORD RetpolineStubOffset;
199 DWORD RetpolineStubSize;
200 DWORD64 Reserved0[2];
201 } KDHELP64,*PKDHELP64;
202
203#ifdef _IMAGEHLP64
204#define KDHELP KDHELP64
205#define PKDHELP PKDHELP64
206#else
207 typedef struct _KDHELP {
208 DWORD Thread;
209 DWORD ThCallbackStack;
210 DWORD NextCallback;
211 DWORD FramePointer;
212 DWORD KiCallUserMode;
213 DWORD KeUserCallbackDispatcher;
214 DWORD SystemRangeStart;
215 DWORD ThCallbackBStore;
216 DWORD KiUserExceptionDispatcher;
217 DWORD StackBase;
218 DWORD StackLimit;
219 DWORD Reserved[5];
220 } KDHELP,*PKDHELP;
221
222 static __inline void KdHelp32To64(PKDHELP p32,PKDHELP64 p64) {
223 p64->Thread = p32->Thread;
224 p64->ThCallbackStack = p32->ThCallbackStack;
225 p64->NextCallback = p32->NextCallback;
226 p64->FramePointer = p32->FramePointer;
227 p64->KiCallUserMode = p32->KiCallUserMode;
228 p64->KeUserCallbackDispatcher = p32->KeUserCallbackDispatcher;
229 p64->SystemRangeStart = p32->SystemRangeStart;
230 p64->KiUserExceptionDispatcher = p32->KiUserExceptionDispatcher;
231 p64->StackBase = p32->StackBase;
232 p64->StackLimit = p32->StackLimit;
233 }
234#endif
235
236 typedef struct _tagSTACKFRAME64 {
237 ADDRESS64 AddrPC;
238 ADDRESS64 AddrReturn;
239 ADDRESS64 AddrFrame;
240 ADDRESS64 AddrStack;
241 ADDRESS64 AddrBStore;
242 PVOID FuncTableEntry;
243 DWORD64 Params[4];
244 WINBOOL Far;
245 WINBOOL Virtual;
246 DWORD64 Reserved[3];
247 KDHELP64 KdHelp;
248 } STACKFRAME64,*LPSTACKFRAME64;
249
250#define INLINE_FRAME_CONTEXT_INIT 0
251#define INLINE_FRAME_CONTEXT_IGNORE 0xFFFFFFFF
252
253 typedef struct _tagSTACKFRAME_EX {
254 ADDRESS64 AddrPC;
255 ADDRESS64 AddrReturn;
256 ADDRESS64 AddrFrame;
257 ADDRESS64 AddrStack;
258 ADDRESS64 AddrBStore;
259 PVOID FuncTableEntry;
260 DWORD64 Params[4];
261 WINBOOL Far;
262 WINBOOL Virtual;
263 DWORD64 Reserved[3];
264 KDHELP64 KdHelp;
265 DWORD StackFrameSize;
266 DWORD InlineFrameContext;
267 } STACKFRAME_EX,*LPSTACKFRAME_EX;
268
269#ifdef _IMAGEHLP64
270#define STACKFRAME STACKFRAME64
271#define LPSTACKFRAME LPSTACKFRAME64
272#else
273 typedef struct _tagSTACKFRAME {
274 ADDRESS AddrPC;
275 ADDRESS AddrReturn;
276 ADDRESS AddrFrame;
277 ADDRESS AddrStack;
278 PVOID FuncTableEntry;
279 DWORD Params[4];
280 WINBOOL Far;
281 WINBOOL Virtual;
282 DWORD Reserved[3];
283 KDHELP KdHelp;
284 ADDRESS AddrBStore;
285 } STACKFRAME,*LPSTACKFRAME;
286#endif
287
288 typedef WINBOOL (WINAPI *PREAD_PROCESS_MEMORY_ROUTINE64)(HANDLE hProcess,DWORD64 qwBaseAddress,PVOID lpBuffer,DWORD nSize,LPDWORD lpNumberOfBytesRead);
289 typedef PVOID (WINAPI *PFUNCTION_TABLE_ACCESS_ROUTINE64)(HANDLE hProcess,DWORD64 AddrBase);
290 typedef DWORD64 (WINAPI *PGET_MODULE_BASE_ROUTINE64)(HANDLE hProcess,DWORD64 Address);
291 typedef DWORD64 (WINAPI *PTRANSLATE_ADDRESS_ROUTINE64)(HANDLE hProcess,HANDLE hThread,LPADDRESS64 lpaddr);
292
293 WINBOOL IMAGEAPI StackWalk64(DWORD MachineType,HANDLE hProcess,HANDLE hThread,LPSTACKFRAME64 StackFrame,PVOID ContextRecord,PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine,PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine,PGET_MODULE_BASE_ROUTINE64
294GetModuleBaseRoutine,PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress);
295
296#ifdef _IMAGEHLP64
297#define PREAD_PROCESS_MEMORY_ROUTINE PREAD_PROCESS_MEMORY_ROUTINE64
298#define PFUNCTION_TABLE_ACCESS_ROUTINE PFUNCTION_TABLE_ACCESS_ROUTINE64
299#define PGET_MODULE_BASE_ROUTINE PGET_MODULE_BASE_ROUTINE64
300#define PTRANSLATE_ADDRESS_ROUTINE PTRANSLATE_ADDRESS_ROUTINE64
301#define StackWalk StackWalk64
302#else
303 typedef WINBOOL (WINAPI *PREAD_PROCESS_MEMORY_ROUTINE)(HANDLE hProcess,DWORD lpBaseAddress,PVOID lpBuffer,DWORD nSize,PDWORD lpNumberOfBytesRead);
304 typedef PVOID (WINAPI *PFUNCTION_TABLE_ACCESS_ROUTINE)(HANDLE hProcess,DWORD AddrBase);
305 typedef DWORD (WINAPI *PGET_MODULE_BASE_ROUTINE)(HANDLE hProcess,DWORD Address);
306 typedef DWORD (WINAPI *PTRANSLATE_ADDRESS_ROUTINE)(HANDLE hProcess,HANDLE hThread,LPADDRESS lpaddr);
307
308 WINBOOL IMAGEAPI StackWalk(DWORD MachineType,HANDLE hProcess,HANDLE hThread,LPSTACKFRAME StackFrame,PVOID ContextRecord,PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine,PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,PGET_MODULE_BASE_ROUTINE
309GetModuleBaseRoutine,PTRANSLATE_ADDRESS_ROUTINE TranslateAddress);
310#endif
311
312#define API_VERSION_NUMBER 11
313
314 typedef struct API_VERSION {
315 USHORT MajorVersion;
316 USHORT MinorVersion;
317 USHORT Revision;
318 USHORT Reserved;
319 } API_VERSION,*LPAPI_VERSION;
320
321 LPAPI_VERSION IMAGEAPI ImagehlpApiVersion(VOID);
322 LPAPI_VERSION IMAGEAPI ImagehlpApiVersionEx(LPAPI_VERSION AppVersion);
323 DWORD IMAGEAPI GetTimestampForLoadedLibrary(HMODULE Module);
324
325 typedef WINBOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(PCSTR ModuleName,DWORD64 BaseOfDll,PVOID UserContext);
326 typedef WINBOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACKW64)(PCWSTR ModuleName,DWORD64 BaseOfDll,PVOID UserContext);
327 typedef WINBOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(PCSTR SymbolName,DWORD64 SymbolAddress,ULONG SymbolSize,PVOID UserContext);
328 typedef WINBOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)(PCWSTR SymbolName,DWORD64 SymbolAddress,ULONG SymbolSize,PVOID UserContext);
329 typedef WINBOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK64)(PCSTR ModuleName,DWORD64 ModuleBase,ULONG ModuleSize,PVOID UserContext);
330 typedef WINBOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACKW64)(PCWSTR ModuleName,DWORD64 ModuleBase,ULONG ModuleSize,PVOID UserContext);
331 typedef WINBOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(HANDLE hProcess,ULONG ActionCode,ULONG64 CallbackData,ULONG64 UserContext);
332 typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(HANDLE hProcess,DWORD AddrBase,PVOID UserContext);
333 typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(HANDLE hProcess,ULONG64 AddrBase,ULONG64 UserContext);
334
335#ifdef _IMAGEHLP64
336#define PSYM_ENUMMODULES_CALLBACK PSYM_ENUMMODULES_CALLBACK64
337#define PSYM_ENUMSYMBOLS_CALLBACK PSYM_ENUMSYMBOLS_CALLBACK64
338#define PSYM_ENUMSYMBOLS_CALLBACKW PSYM_ENUMSYMBOLS_CALLBACK64W
339#define PENUMLOADED_MODULES_CALLBACK PENUMLOADED_MODULES_CALLBACK64
340#define PSYMBOL_REGISTERED_CALLBACK PSYMBOL_REGISTERED_CALLBACK64
341#define PSYMBOL_FUNCENTRY_CALLBACK PSYMBOL_FUNCENTRY_CALLBACK64
342#else
343 typedef WINBOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PCSTR ModuleName,ULONG BaseOfDll,PVOID UserContext);
344 typedef WINBOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(PCSTR SymbolName,ULONG SymbolAddress,ULONG SymbolSize,PVOID UserContext);
345 typedef WINBOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(PCWSTR SymbolName,ULONG SymbolAddress,ULONG SymbolSize,PVOID UserContext);
346 typedef WINBOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(PCSTR ModuleName,ULONG ModuleBase,ULONG ModuleSize,PVOID UserContext);
347 typedef WINBOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(HANDLE hProcess,ULONG ActionCode,PVOID CallbackData,PVOID UserContext);
348#endif
349
350#define SYMFLAG_VALUEPRESENT 0x00000001
351#define SYMFLAG_REGISTER 0x00000008
352#define SYMFLAG_REGREL 0x00000010
353#define SYMFLAG_FRAMEREL 0x00000020
354#define SYMFLAG_PARAMETER 0x00000040
355#define SYMFLAG_LOCAL 0x00000080
356#define SYMFLAG_CONSTANT 0x00000100
357#define SYMFLAG_EXPORT 0x00000200
358#define SYMFLAG_FORWARDER 0x00000400
359#define SYMFLAG_FUNCTION 0x00000800
360#define SYMFLAG_VIRTUAL 0x00001000
361#define SYMFLAG_THUNK 0x00002000
362#define SYMFLAG_TLSREL 0x00004000
363#define SYMFLAG_SLOT 0x00008000
364#define SYMFLAG_ILREL 0x00010000
365#define SYMFLAG_METADATA 0x00020000
366#define SYMFLAG_CLR_TOKEN 0x00040000
367#define SYMFLAG_NULL 0x00080000
368#define SYMFLAG_FUNC_NO_RETURN 0x00100000
369#define SYMFLAG_SYNTHETIC_ZEROBASE 0x00200000
370#define SYMFLAG_PUBLIC_CODE 0x00400000
371#define SYMFLAG_REGREL_ALIASINDIR 0x00800000
372#define SYMFLAG_FIXUP_ARM64X 0x01000000
373#define SYMFLAG_GLOBAL 0x02000000
374#define SYMFLAG_RESET 0x80000000
375
376 typedef enum {
377 SymNone = 0,
378 SymCoff,
379 SymCv,
380 SymPdb,
381 SymExport,
382 SymDeferred,
383 SymSym,
384 SymDia,
385 SymVirtual,
386 NumSymTypes
387 } SYM_TYPE;
388
389 typedef struct _IMAGEHLP_SYMBOL64 {
390 DWORD SizeOfStruct;
391 DWORD64 Address;
392 DWORD Size;
393 DWORD Flags;
394 DWORD MaxNameLength;
395 CHAR Name[1];
396 } IMAGEHLP_SYMBOL64,*PIMAGEHLP_SYMBOL64;
397
398 typedef struct _IMAGEHLP_SYMBOL64_PACKAGE {
399 IMAGEHLP_SYMBOL64 sym;
400 CHAR name[MAX_SYM_NAME + 1];
401 } IMAGEHLP_SYMBOL64_PACKAGE,*PIMAGEHLP_SYMBOL64_PACKAGE;
402
403#ifdef _IMAGEHLP64
404
405#define IMAGEHLP_SYMBOL IMAGEHLP_SYMBOL64
406#define PIMAGEHLP_SYMBOL PIMAGEHLP_SYMBOL64
407#define IMAGEHLP_SYMBOL_PACKAGE IMAGEHLP_SYMBOL64_PACKAGE
408#define PIMAGEHLP_SYMBOL_PACKAGE PIMAGEHLP_SYMBOL64_PACKAGE
409#else
410
411 typedef struct _IMAGEHLP_SYMBOL {
412 DWORD SizeOfStruct;
413 DWORD Address;
414 DWORD Size;
415 DWORD Flags;
416 DWORD MaxNameLength;
417 CHAR Name[1];
418 } IMAGEHLP_SYMBOL,*PIMAGEHLP_SYMBOL;
419
420 typedef struct _IMAGEHLP_SYMBOL_PACKAGE {
421 IMAGEHLP_SYMBOL sym;
422 CHAR name[MAX_SYM_NAME + 1];
423 } IMAGEHLP_SYMBOL_PACKAGE,*PIMAGEHLP_SYMBOL_PACKAGE;
424#endif
425
426 typedef struct _IMAGEHLP_MODULE64 {
427 DWORD SizeOfStruct;
428 DWORD64 BaseOfImage;
429 DWORD ImageSize;
430 DWORD TimeDateStamp;
431 DWORD CheckSum;
432 DWORD NumSyms;
433 SYM_TYPE SymType;
434 CHAR ModuleName[32];
435 CHAR ImageName[256];
436 CHAR LoadedImageName[256];
437 CHAR LoadedPdbName[256];
438 DWORD CVSig;
439 CHAR CVData[MAX_PATH*3];
440 DWORD PdbSig;
441 GUID PdbSig70;
442 DWORD PdbAge;
443 WINBOOL PdbUnmatched;
444 WINBOOL DbgUnmatched;
445 WINBOOL LineNumbers;
446 WINBOOL GlobalSymbols;
447 WINBOOL TypeInfo;
448 WINBOOL SourceIndexed;
449 WINBOOL Publics;
450 DWORD MachineType;
451 DWORD Reserved;
452 } IMAGEHLP_MODULE64,*PIMAGEHLP_MODULE64;
453
454 typedef struct _IMAGEHLP_MODULE64_EX {
455 IMAGEHLP_MODULE64 Module;
456 DWORD RegionFlags;
457 } IMAGEHLP_MODULE64_EX,*PIMAGEHLP_MODULE64_EX;
458
459 typedef struct _IMAGEHLP_MODULE64W {
460 DWORD SizeOfStruct;
461 DWORD64 BaseOfImage;
462 DWORD ImageSize;
463 DWORD TimeDateStamp;
464 DWORD CheckSum;
465 DWORD NumSyms;
466 SYM_TYPE SymType;
467 WCHAR ModuleName[32];
468 WCHAR ImageName[256];
469 WCHAR LoadedImageName[256];
470 WCHAR LoadedPdbName[256];
471 DWORD CVSig;
472 WCHAR CVData[MAX_PATH*3];
473 DWORD PdbSig;
474 GUID PdbSig70;
475 DWORD PdbAge;
476 WINBOOL PdbUnmatched;
477 WINBOOL DbgUnmatched;
478 WINBOOL LineNumbers;
479 WINBOOL GlobalSymbols;
480 WINBOOL TypeInfo;
481 WINBOOL SourceIndexed;
482 WINBOOL Publics;
483 DWORD MachineType;
484 DWORD Reserved;
485 } IMAGEHLP_MODULEW64,*PIMAGEHLP_MODULEW64;
486
487 typedef struct _IMAGEHLP_MODULEW64_EX {
488 IMAGEHLP_MODULEW64 Module;
489 DWORD RegionFlags;
490 } IMAGEHLP_MODULEW64_EX,*PIMAGEHLP_MODULEW64_EX;
491
492#ifdef _IMAGEHLP64
493#define IMAGEHLP_MODULE IMAGEHLP_MODULE64
494#define PIMAGEHLP_MODULE PIMAGEHLP_MODULE64
495#define IMAGEHLP_MODULEW IMAGEHLP_MODULEW64
496#define PIMAGEHLP_MODULEW PIMAGEHLP_MODULEW64
497#else
498 typedef struct _IMAGEHLP_MODULE {
499 DWORD SizeOfStruct;
500 DWORD BaseOfImage;
501 DWORD ImageSize;
502 DWORD TimeDateStamp;
503 DWORD CheckSum;
504 DWORD NumSyms;
505 SYM_TYPE SymType;
506 CHAR ModuleName[32];
507 CHAR ImageName[256];
508 CHAR LoadedImageName[256];
509 } IMAGEHLP_MODULE,*PIMAGEHLP_MODULE;
510
511 typedef struct _IMAGEHLP_MODULEW {
512 DWORD SizeOfStruct;
513 DWORD BaseOfImage;
514 DWORD ImageSize;
515 DWORD TimeDateStamp;
516 DWORD CheckSum;
517 DWORD NumSyms;
518 SYM_TYPE SymType;
519 WCHAR ModuleName[32];
520 WCHAR ImageName[256];
521 WCHAR LoadedImageName[256];
522 } IMAGEHLP_MODULEW,*PIMAGEHLP_MODULEW;
523#endif
524
525 typedef struct _IMAGEHLP_LINE64 {
526 DWORD SizeOfStruct;
527 PVOID Key;
528 DWORD LineNumber;
529 PCHAR FileName;
530 DWORD64 Address;
531 } IMAGEHLP_LINE64,*PIMAGEHLP_LINE64;
532
533 typedef struct _IMAGEHLP_LINEW64 {
534 DWORD SizeOfStruct;
535 PVOID Key;
536 DWORD LineNumber;
537 PWSTR FileName;
538 DWORD64 Address;
539 } IMAGEHLP_LINEW64, *PIMAGEHLP_LINEW64;
540
541#ifdef _IMAGEHLP64
542#define IMAGEHLP_LINE IMAGEHLP_LINE64
543#define PIMAGEHLP_LINE PIMAGEHLP_LINE64
544#else
545 typedef struct _IMAGEHLP_LINE {
546 DWORD SizeOfStruct;
547 PVOID Key;
548 DWORD LineNumber;
549 PCHAR FileName;
550 DWORD Address;
551 } IMAGEHLP_LINE,*PIMAGEHLP_LINE;
552#endif
553
554 typedef struct _SOURCEFILE {
555 DWORD64 ModBase;
556 PCHAR FileName;
557 } SOURCEFILE,*PSOURCEFILE;
558
559 typedef struct _SOURCEFILEW {
560 DWORD64 ModBase;
561 PWCHAR FileName;
562 } SOURCEFILEW,*PSOURCEFILEW;
563
564#define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001
565#define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002
566#define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003
567#define CBA_SYMBOLS_UNLOADED 0x00000004
568#define CBA_DUPLICATE_SYMBOL 0x00000005
569#define CBA_READ_MEMORY 0x00000006
570#define CBA_DEFERRED_SYMBOL_LOAD_CANCEL 0x00000007
571#define CBA_SET_OPTIONS 0x00000008
572#define CBA_EVENT 0x00000010
573#define CBA_DEFERRED_SYMBOL_LOAD_PARTIAL 0x00000020
574#define CBA_DEBUG_INFO 0x10000000
575#define CBA_SRCSRV_INFO 0x20000000
576#define CBA_SRCSRV_EVENT 0x40000000
577
578 typedef struct _IMAGEHLP_CBA_READ_MEMORY {
579 DWORD64 addr;
580 PVOID buf;
581 DWORD bytes;
582 DWORD *bytesread;
583 } IMAGEHLP_CBA_READ_MEMORY,*PIMAGEHLP_CBA_READ_MEMORY;
584
585 enum {
586 sevInfo = 0,
587 sevProblem,
588 sevAttn,
589 sevFatal,
590 sevMax
591 };
592
593 typedef struct _IMAGEHLP_CBA_EVENT {
594 DWORD severity;
595 DWORD code;
596 PCHAR desc;
597 PVOID object;
598 } IMAGEHLP_CBA_EVENT,*PIMAGEHLP_CBA_EVENT;
599
600 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD64 {
601 DWORD SizeOfStruct;
602 DWORD64 BaseOfImage;
603 DWORD CheckSum;
604 DWORD TimeDateStamp;
605 CHAR FileName[MAX_PATH];
606 BOOLEAN Reparse;
607 HANDLE hFile;
608 DWORD Flags;
609 } IMAGEHLP_DEFERRED_SYMBOL_LOAD64,*PIMAGEHLP_DEFERRED_SYMBOL_LOAD64;
610
611#define DSLFLAG_MISMATCHED_PDB 0x1
612#define DSLFLAG_MISMATCHED_DBG 0x2
613
614#ifdef _IMAGEHLP64
615#define IMAGEHLP_DEFERRED_SYMBOL_LOAD IMAGEHLP_DEFERRED_SYMBOL_LOAD64
616#define PIMAGEHLP_DEFERRED_SYMBOL_LOAD PIMAGEHLP_DEFERRED_SYMBOL_LOAD64
617#else
618 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD {
619 DWORD SizeOfStruct;
620 DWORD BaseOfImage;
621 DWORD CheckSum;
622 DWORD TimeDateStamp;
623 CHAR FileName[MAX_PATH];
624 BOOLEAN Reparse;
625 HANDLE hFile;
626 } IMAGEHLP_DEFERRED_SYMBOL_LOAD,*PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
627#endif
628
629 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL64 {
630 DWORD SizeOfStruct;
631 DWORD NumberOfDups;
632 PIMAGEHLP_SYMBOL64 Symbol;
633 DWORD SelectedSymbol;
634 } IMAGEHLP_DUPLICATE_SYMBOL64,*PIMAGEHLP_DUPLICATE_SYMBOL64;
635
636#ifdef _IMAGEHLP64
637#define IMAGEHLP_DUPLICATE_SYMBOL IMAGEHLP_DUPLICATE_SYMBOL64
638#define PIMAGEHLP_DUPLICATE_SYMBOL PIMAGEHLP_DUPLICATE_SYMBOL64
639#else
640 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL {
641 DWORD SizeOfStruct;
642 DWORD NumberOfDups;
643 PIMAGEHLP_SYMBOL Symbol;
644 DWORD SelectedSymbol;
645 } IMAGEHLP_DUPLICATE_SYMBOL,*PIMAGEHLP_DUPLICATE_SYMBOL;
646#endif
647
648typedef struct _SYMSRV_INDEX_INFO {
649 DWORD sizeofstruct;
650 CHAR file[MAX_PATH +1];
651 WINBOOL stripped;
652 DWORD timestamp;
653 DWORD size;
654 CHAR dbgfile[MAX_PATH +1];
655 CHAR pdbfile[MAX_PATH + 1];
656 GUID guid;
657 DWORD sig;
658 DWORD age;
659} SYMSRV_INDEX_INFO, *PSYMSRV_INDEX_INFO;
660
661typedef struct _SYMSRV_INDEX_INFOW {
662 DWORD sizeofstruct;
663 WCHAR file[MAX_PATH +1];
664 WINBOOL stripped;
665 DWORD timestamp;
666 DWORD size;
667 WCHAR dbgfile[MAX_PATH +1];
668 WCHAR pdbfile[MAX_PATH + 1];
669 GUID guid;
670 DWORD sig;
671 DWORD age;
672} SYMSRV_INDEX_INFOW, *PSYMSRV_INDEX_INFOW;
673
674 WINBOOL IMAGEAPI SymSetParentWindow(HWND hwnd);
675 PCHAR IMAGEAPI SymSetHomeDirectory(HANDLE hProcess,PCSTR dir);
676 PCHAR IMAGEAPI SymSetHomeDirectoryW(HANDLE hProcess,PCWSTR dir);
677 PCHAR IMAGEAPI SymGetHomeDirectory(DWORD type,PSTR dir,size_t size);
678 PWCHAR IMAGEAPI SymGetHomeDirectoryW(DWORD type,PWSTR dir,size_t size);
679
680#define hdBase 0
681#define hdSym 1
682#define hdSrc 2
683#define hdMax 3
684
685#define SYMOPT_CASE_INSENSITIVE 0x00000001
686#define SYMOPT_UNDNAME 0x00000002
687#define SYMOPT_DEFERRED_LOADS 0x00000004
688#define SYMOPT_NO_CPP 0x00000008
689#define SYMOPT_LOAD_LINES 0x00000010
690#define SYMOPT_OMAP_FIND_NEAREST 0x00000020
691#define SYMOPT_LOAD_ANYTHING 0x00000040
692#define SYMOPT_IGNORE_CVREC 0x00000080
693#define SYMOPT_NO_UNQUALIFIED_LOADS 0x00000100
694#define SYMOPT_FAIL_CRITICAL_ERRORS 0x00000200
695#define SYMOPT_EXACT_SYMBOLS 0x00000400
696#define SYMOPT_ALLOW_ABSOLUTE_SYMBOLS 0x00000800
697#define SYMOPT_IGNORE_NT_SYMPATH 0x00001000
698#define SYMOPT_INCLUDE_32BIT_MODULES 0x00002000
699#define SYMOPT_PUBLICS_ONLY 0x00004000
700#define SYMOPT_NO_PUBLICS 0x00008000
701#define SYMOPT_AUTO_PUBLICS 0x00010000
702#define SYMOPT_NO_IMAGE_SEARCH 0x00020000
703#define SYMOPT_SECURE 0x00040000
704#define SYMOPT_NO_PROMPTS 0x00080000
705#define SYMOPT_ALLOW_ZERO_ADDRESS 0x01000000
706#define SYMOPT_DISABLE_SYMSRV_AUTODETECT 0x02000000
707#define SYMOPT_FAVOR_COMPRESSED 0x00800000
708#define SYMOPT_FLAT_DIRECTORY 0x00400000
709#define SYMOPT_IGNORE_IMAGEDIR 0x00200000
710#define SYMOPT_OVERWRITE 0x00100000
711
712#define SYMOPT_DEBUG 0x80000000
713
714 DWORD IMAGEAPI SymSetOptions(DWORD SymOptions);
715 DWORD IMAGEAPI SymGetOptions(VOID);
716 WINBOOL IMAGEAPI SymCleanup(HANDLE hProcess);
717 WINBOOL IMAGEAPI SymMatchString(PCSTR string,PCSTR expression,WINBOOL fCase);
718 WINBOOL IMAGEAPI SymMatchStringW(PCWSTR string,PCWSTR expression,WINBOOL fCase);
719
720 typedef WINBOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)(PSOURCEFILE pSourceFile,PVOID UserContext);
721 typedef WINBOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACKW)(PSOURCEFILEW pSourceFile,PVOID UserContext);
722#define PSYM_ENUMSOURCFILES_CALLBACK PSYM_ENUMSOURCEFILES_CALLBACK
723
724 WINBOOL IMAGEAPI SymEnumSourceFiles(HANDLE hProcess,ULONG64 ModBase,PCSTR Mask,PSYM_ENUMSOURCEFILES_CALLBACK cbSrcFiles,PVOID UserContext);
725 WINBOOL IMAGEAPI SymEnumSourceFilesW(HANDLE hProcess,ULONG64 ModBase,PCWSTR Mask,PSYM_ENUMSOURCEFILES_CALLBACKW cbSrcFiles,PVOID UserContext);
726 WINBOOL IMAGEAPI SymEnumerateModules64(HANDLE hProcess,PSYM_ENUMMODULES_CALLBACK64 EnumModulesCallback,PVOID UserContext);
727 WINBOOL IMAGEAPI SymEnumerateModulesW64(HANDLE hProcess,PSYM_ENUMMODULES_CALLBACKW64 EnumModulesCallback,PVOID UserContext);
728
729#ifdef _IMAGEHLP64
730#define SymEnumerateModules SymEnumerateModules64
731#else
732 WINBOOL IMAGEAPI SymEnumerateModules(HANDLE hProcess,PSYM_ENUMMODULES_CALLBACK EnumModulesCallback,PVOID UserContext);
733#endif
734
735 WINBOOL IMAGEAPI SymEnumerateSymbols64(HANDLE hProcess,DWORD64 BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACK64 EnumSymbolsCallback,PVOID UserContext);
736 WINBOOL IMAGEAPI SymEnumerateSymbolsW64(HANDLE hProcess,DWORD64 BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACK64W EnumSymbolsCallback,PVOID UserContext);
737
738#ifdef _IMAGEHLP64
739#define SymEnumerateSymbols SymEnumerateSymbols64
740#define SymEnumerateSymbolsW SymEnumerateSymbolsW64
741#else
742 WINBOOL IMAGEAPI SymEnumerateSymbols(HANDLE hProcess,DWORD BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext);
743 WINBOOL IMAGEAPI SymEnumerateSymbolsW(HANDLE hProcess,DWORD BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACKW EnumSymbolsCallback,PVOID UserContext);
744#endif
745
746 WINBOOL IMAGEAPI EnumerateLoadedModules64(HANDLE hProcess,PENUMLOADED_MODULES_CALLBACK64 EnumLoadedModulesCallback,PVOID UserContext);
747 WINBOOL IMAGEAPI EnumerateLoadedModulesW64(HANDLE hProcess,PENUMLOADED_MODULES_CALLBACKW64 EnumLoadedModulesCallback,PVOID UserContext);
748
749#ifdef DBGHELP_TRANSLATE_TCHAR
750 #define EnumerateLoadedModules64 EnumerateLoadedModulesW64
751#endif
752
753#ifdef _IMAGEHLP64
754#define EnumerateLoadedModules EnumerateLoadedModules64
755#else
756 WINBOOL IMAGEAPI EnumerateLoadedModules(HANDLE hProcess,PENUMLOADED_MODULES_CALLBACK EnumLoadedModulesCallback,PVOID UserContext);
757#endif
758
759 PVOID IMAGEAPI SymFunctionTableAccess64(HANDLE hProcess,DWORD64 AddrBase);
760
761#ifdef _IMAGEHLP64
762#define SymFunctionTableAccess SymFunctionTableAccess64
763#else
764 PVOID IMAGEAPI SymFunctionTableAccess(HANDLE hProcess,DWORD AddrBase);
765#endif
766
767 WINBOOL IMAGEAPI SymGetModuleInfo64(HANDLE hProcess,DWORD64 qwAddr,PIMAGEHLP_MODULE64 ModuleInfo);
768 WINBOOL IMAGEAPI SymGetModuleInfoW64(HANDLE hProcess,DWORD64 qwAddr,PIMAGEHLP_MODULEW64 ModuleInfo);
769
770#ifdef _IMAGEHLP64
771#define SymGetModuleInfo SymGetModuleInfo64
772#define SymGetModuleInfoW SymGetModuleInfoW64
773#else
774 WINBOOL IMAGEAPI SymGetModuleInfo(HANDLE hProcess,DWORD dwAddr,PIMAGEHLP_MODULE ModuleInfo);
775 WINBOOL IMAGEAPI SymGetModuleInfoW(HANDLE hProcess,DWORD dwAddr,PIMAGEHLP_MODULEW ModuleInfo);
776#endif
777
778 DWORD64 IMAGEAPI SymGetModuleBase64(HANDLE hProcess,DWORD64 qwAddr);
779
780#ifdef _IMAGEHLP64
781#define SymGetModuleBase SymGetModuleBase64
782#else
783 DWORD IMAGEAPI SymGetModuleBase(HANDLE hProcess,DWORD dwAddr);
784#endif
785
786 WINBOOL IMAGEAPI SymGetSymNext64(HANDLE hProcess,PIMAGEHLP_SYMBOL64 Symbol);
787
788#ifdef _IMAGEHLP64
789#define SymGetSymNext SymGetSymNext64
790#else
791 WINBOOL IMAGEAPI SymGetSymNext(HANDLE hProcess,PIMAGEHLP_SYMBOL Symbol);
792#endif
793
794 WINBOOL IMAGEAPI SymGetSymPrev64(HANDLE hProcess,PIMAGEHLP_SYMBOL64 Symbol);
795
796#ifdef _IMAGEHLP64
797#define SymGetSymPrev SymGetSymPrev64
798#else
799 WINBOOL IMAGEAPI SymGetSymPrev(HANDLE hProcess,PIMAGEHLP_SYMBOL Symbol);
800#endif
801
802 typedef struct _SRCCODEINFO {
803 DWORD SizeOfStruct;
804 PVOID Key;
805 DWORD64 ModBase;
806 CHAR Obj[MAX_PATH + 1];
807 CHAR FileName[MAX_PATH + 1];
808 DWORD LineNumber;
809 DWORD64 Address;
810 } SRCCODEINFO,*PSRCCODEINFO;
811
812 typedef struct _SRCCODEINFOW {
813 DWORD SizeOfStruct;
814 PVOID Key;
815 DWORD64 ModBase;
816 WCHAR Obj[MAX_PATH + 1];
817 WCHAR FileName[MAX_PATH + 1];
818 DWORD LineNumber;
819 DWORD64 Address;
820 } SRCCODEINFOW,*PSRCCODEINFOW;
821
822 typedef WINBOOL (CALLBACK *PSYM_ENUMLINES_CALLBACK)(PSRCCODEINFO LineInfo,PVOID UserContext);
823 typedef WINBOOL (CALLBACK *PSYM_ENUMLINES_CALLBACKW)(PSRCCODEINFOW LineInfo,PVOID UserContext);
824
825 WINBOOL IMAGEAPI SymEnumLines(HANDLE hProcess,ULONG64 Base,PCSTR Obj,PCSTR File,PSYM_ENUMLINES_CALLBACK EnumLinesCallback,PVOID UserContext);
826 WINBOOL IMAGEAPI SymEnumLinesW(HANDLE hProcess,ULONG64 Base,PCWSTR Obj,PCSTR File,PSYM_ENUMLINES_CALLBACKW EnumLinesCallback,PVOID UserContext);
827 WINBOOL IMAGEAPI SymGetLineFromAddr64(HANDLE hProcess,DWORD64 qwAddr,PDWORD pdwDisplacement,PIMAGEHLP_LINE64 Line64);
828 WINBOOL IMAGEAPI SymGetLineFromAddrW64(HANDLE hProcess,DWORD64 qwAddr,PDWORD pdwDisplacement,PIMAGEHLP_LINEW64 Line64);
829
830#ifdef _IMAGEHLP64
831#define SymGetLineFromAddr SymGetLineFromAddr64
832#else
833 WINBOOL IMAGEAPI SymGetLineFromAddr(HANDLE hProcess,DWORD dwAddr,PDWORD pdwDisplacement,PIMAGEHLP_LINE Line);
834#endif
835
836 WINBOOL IMAGEAPI SymGetLineFromName64(HANDLE hProcess,PCSTR ModuleName,PCSTR FileName,DWORD dwLineNumber,PLONG plDisplacement,PIMAGEHLP_LINE64 Line);
837 WINBOOL IMAGEAPI SymGetLineFromNameW64(HANDLE hProcess,PCWSTR ModuleName,PCWSTR FileName,DWORD dwLineNumber,PLONG plDisplacement,PIMAGEHLP_LINEW64 Line);
838
839#ifdef _IMAGEHLP64
840#define SymGetLineFromName SymGetLineFromName64
841#else
842 WINBOOL IMAGEAPI SymGetLineFromName(HANDLE hProcess,PCSTR ModuleName,PCSTR FileName,DWORD dwLineNumber,PLONG plDisplacement,PIMAGEHLP_LINE Line);
843#endif
844
845 WINBOOL IMAGEAPI SymGetLineNext64(HANDLE hProcess,PIMAGEHLP_LINE64 Line);
846 WINBOOL IMAGEAPI SymGetLineNextW64(HANDLE hProcess,PIMAGEHLP_LINEW64 Line);
847
848#ifdef _IMAGEHLP64
849#define SymGetLineNext SymGetLineNext64
850#else
851 WINBOOL IMAGEAPI SymGetLineNext(HANDLE hProcess,PIMAGEHLP_LINE Line);
852#endif
853
854 WINBOOL IMAGEAPI SymGetLinePrev64(HANDLE hProcess,PIMAGEHLP_LINE64 Line);
855 WINBOOL IMAGEAPI SymGetLinePrevW64(HANDLE hProcess,PIMAGEHLP_LINEW64 Line);
856
857#ifdef _IMAGEHLP64
858#define SymGetLinePrev SymGetLinePrev64
859#else
860 WINBOOL IMAGEAPI SymGetLinePrev(HANDLE hProcess,PIMAGEHLP_LINE Line);
861#endif
862
863 WINBOOL IMAGEAPI SymMatchFileName(PCSTR FileName,PCSTR Match,PSTR *FileNameStop,PSTR *MatchStop);
864 WINBOOL IMAGEAPI SymMatchFileNameW(PCWSTR FileName,PCWSTR Match,PWSTR *FileNameStop,PWSTR *MatchStop);
865 WINBOOL IMAGEAPI SymInitialize(HANDLE hProcess,PCSTR UserSearchPath,WINBOOL fInvadeProcess);
866 WINBOOL IMAGEAPI SymInitializeW(HANDLE hProcess,PCWSTR UserSearchPath,WINBOOL fInvadeProcess);
867 WINBOOL IMAGEAPI SymGetSearchPath(HANDLE hProcess,PSTR SearchPath,DWORD SearchPathLength);
868 WINBOOL IMAGEAPI SymGetSearchPathW(HANDLE hProcess,PWSTR SearchPath,DWORD SearchPathLength);
869 WINBOOL IMAGEAPI SymSetSearchPath(HANDLE hProcess,PCSTR SearchPath);
870 WINBOOL IMAGEAPI SymSetSearchPathW(HANDLE hProcess,PCWSTR SearchPath);
871 DWORD64 IMAGEAPI SymLoadModule64(HANDLE hProcess,HANDLE hFile,PCSTR ImageName,PCSTR ModuleName,DWORD64 BaseOfDll,DWORD SizeOfDll);
872
873#define SLMFLAG_VIRTUAL 0x1
874
875 DWORD64 IMAGEAPI SymLoadModuleEx(HANDLE hProcess,HANDLE hFile,PCSTR ImageName,PCSTR ModuleName,DWORD64 BaseOfDll,DWORD DllSize,PMODLOAD_DATA Data,DWORD Flags);
876 DWORD64 IMAGEAPI SymLoadModuleExW(HANDLE hProcess,HANDLE hFile,PCWSTR ImageName,PCWSTR ModuleName,DWORD64 BaseOfDll,DWORD DllSize,PMODLOAD_DATA Data,DWORD Flags);
877
878#ifdef _IMAGEHLP64
879#define SymLoadModule SymLoadModule64
880#else
881 DWORD IMAGEAPI SymLoadModule(HANDLE hProcess,HANDLE hFile,PCSTR ImageName,PCSTR ModuleName,DWORD BaseOfDll,DWORD SizeOfDll);
882#endif
883
884 WINBOOL IMAGEAPI SymUnloadModule64(HANDLE hProcess,DWORD64 BaseOfDll);
885
886#ifdef _IMAGEHLP64
887#define SymUnloadModule SymUnloadModule64
888#else
889 WINBOOL IMAGEAPI SymUnloadModule(HANDLE hProcess,DWORD BaseOfDll);
890#endif
891
892 WINBOOL IMAGEAPI SymUnDName64(PIMAGEHLP_SYMBOL64 sym,PSTR UnDecName,DWORD UnDecNameLength);
893
894#ifdef _IMAGEHLP64
895#define SymUnDName SymUnDName64
896#else
897 WINBOOL IMAGEAPI SymUnDName(PIMAGEHLP_SYMBOL sym,PSTR UnDecName,DWORD UnDecNameLength);
898#endif
899
900 WINBOOL IMAGEAPI SymRegisterCallback64(HANDLE hProcess,PSYMBOL_REGISTERED_CALLBACK64 CallbackFunction,ULONG64 UserContext);
901 WINBOOL IMAGEAPI SymRegisterCallback64W(HANDLE hProcess,PSYMBOL_REGISTERED_CALLBACK64 CallbackFunction,ULONG64 UserContext);
902
903 WINBOOL IMAGEAPI SymRegisterFunctionEntryCallback64(HANDLE hProcess,PSYMBOL_FUNCENTRY_CALLBACK64 CallbackFunction,ULONG64 UserContext);
904
905#ifdef _IMAGEHLP64
906#define SymRegisterCallback SymRegisterCallback64
907#define SymRegisterFunctionEntryCallback SymRegisterFunctionEntryCallback64
908#else
909 WINBOOL IMAGEAPI SymRegisterCallback(HANDLE hProcess,PSYMBOL_REGISTERED_CALLBACK CallbackFunction,PVOID UserContext);
910 WINBOOL IMAGEAPI SymRegisterFunctionEntryCallback(HANDLE hProcess,PSYMBOL_FUNCENTRY_CALLBACK CallbackFunction,PVOID UserContext);
911#endif
912
913 typedef struct _IMAGEHLP_SYMBOL_SRC {
914 DWORD sizeofstruct;
915 DWORD type;
916 char file[MAX_PATH];
917 } IMAGEHLP_SYMBOL_SRC,*PIMAGEHLP_SYMBOL_SRC;
918
919 typedef struct _MODULE_TYPE_INFO {
920 USHORT dataLength;
921 USHORT leaf;
922 BYTE data[1];
923 } MODULE_TYPE_INFO,*PMODULE_TYPE_INFO;
924
925 typedef struct _SYMBOL_INFO {
926 ULONG SizeOfStruct;
927 ULONG TypeIndex;
928 ULONG64 Reserved[2];
929 ULONG info;
930 ULONG Size;
931 ULONG64 ModBase;
932 ULONG Flags;
933 ULONG64 Value;
934 ULONG64 Address;
935 ULONG Register;
936 ULONG Scope;
937 ULONG Tag;
938 ULONG NameLen;
939 ULONG MaxNameLen;
940 CHAR Name[1];
941 } SYMBOL_INFO,*PSYMBOL_INFO;
942
943 typedef struct _SYMBOL_INFOW {
944 ULONG SizeOfStruct;
945 ULONG TypeIndex;
946 ULONG64 Reserved[2];
947 ULONG info;
948 ULONG Size;
949 ULONG64 ModBase;
950 ULONG Flags;
951 ULONG64 Value;
952 ULONG64 Address;
953 ULONG Register;
954 ULONG Scope;
955 ULONG Tag;
956 ULONG NameLen;
957 ULONG MaxNameLen;
958 WCHAR Name[1];
959 } SYMBOL_INFOW,*PSYMBOL_INFOW;
960
961#define SYMFLAG_CLR_TOKEN 0x00040000
962#define SYMFLAG_CONSTANT 0x00000100
963#define SYMFLAG_EXPORT 0x00000200
964#define SYMFLAG_FORWARDER 0x00000400
965#define SYMFLAG_FRAMEREL 0x00000020
966#define SYMFLAG_FUNCTION 0x00000800
967#define SYMFLAG_ILREL 0x00010000
968#define SYMFLAG_LOCAL 0x00000080
969#define SYMFLAG_METADATA 0x00020000
970#define SYMFLAG_PARAMETER 0x00000040
971#define SYMFLAG_REGISTER 0x00000008
972#define SYMFLAG_REGREL 0x00000010
973#define SYMFLAG_SLOT 0x00008000
974#define SYMFLAG_THUNK 0x00002000
975#define SYMFLAG_TLSREL 0x00004000
976#define SYMFLAG_VALUEPRESENT 0x00000001
977#define SYMFLAG_VIRTUAL 0x00001000
978
979 typedef struct _SYMBOL_INFO_PACKAGE {
980 SYMBOL_INFO si;
981 CHAR name[MAX_SYM_NAME + 1];
982 } SYMBOL_INFO_PACKAGE,*PSYMBOL_INFO_PACKAGE;
983
984 typedef struct _IMAGEHLP_STACK_FRAME {
985 ULONG64 InstructionOffset;
986 ULONG64 ReturnOffset;
987 ULONG64 FrameOffset;
988 ULONG64 StackOffset;
989 ULONG64 BackingStoreOffset;
990 ULONG64 FuncTableEntry;
991 ULONG64 Params[4];
992 ULONG64 Reserved[5];
993 WINBOOL Virtual;
994 ULONG Reserved2;
995 } IMAGEHLP_STACK_FRAME,*PIMAGEHLP_STACK_FRAME;
996
997 typedef VOID IMAGEHLP_CONTEXT,*PIMAGEHLP_CONTEXT;
998
999 WINBOOL IMAGEAPI SymSetContext(HANDLE hProcess,PIMAGEHLP_STACK_FRAME StackFrame,PIMAGEHLP_CONTEXT Context);
1000 WINBOOL IMAGEAPI SymFromAddr(HANDLE hProcess,DWORD64 Address,PDWORD64 Displacement,PSYMBOL_INFO Symbol);
1001 WINBOOL IMAGEAPI SymFromAddrW(HANDLE hProcess,DWORD64 Address,PDWORD64 Displacement,PSYMBOL_INFOW Symbol);
1002 WINBOOL IMAGEAPI SymFromToken(HANDLE hProcess,DWORD64 Base,DWORD Token,PSYMBOL_INFO Symbol);
1003 WINBOOL IMAGEAPI SymFromTokenW(HANDLE hProcess,DWORD64 Base,DWORD Token,PSYMBOL_INFOW Symbol);
1004 WINBOOL IMAGEAPI SymFromName(HANDLE hProcess,PCSTR Name,PSYMBOL_INFO Symbol);
1005 WINBOOL IMAGEAPI SymFromNameW(HANDLE hProcess,PCWSTR Name,PSYMBOL_INFOW Symbol);
1006
1007 typedef WINBOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(PSYMBOL_INFO pSymInfo,ULONG SymbolSize,PVOID UserContext);
1008 typedef WINBOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACKW)(PSYMBOL_INFOW pSymInfo,ULONG SymbolSize,PVOID UserContext);
1009
1010 WINBOOL IMAGEAPI SymEnumSymbols(HANDLE hProcess,ULONG64 BaseOfDll,PCSTR Mask,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext);
1011 WINBOOL IMAGEAPI SymEnumSymbolsW(HANDLE hProcess,ULONG64 BaseOfDll,PCWSTR Mask,PSYM_ENUMERATESYMBOLS_CALLBACKW EnumSymbolsCallback,PVOID UserContext);
1012 WINBOOL IMAGEAPI SymEnumSymbolsForAddr(HANDLE hProcess,DWORD64 Address,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext);
1013 WINBOOL IMAGEAPI SymEnumSymbolsForAddrW(HANDLE hProcess,DWORD64 Address,PSYM_ENUMERATESYMBOLS_CALLBACKW EnumSymbolsCallback,PVOID UserContext);
1014
1015#define SYMENUMFLAG_FULLSRCH 1
1016#define SYMENUMFLAG_SPEEDSRCH 2
1017
1018 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO {
1019 TI_GET_SYMTAG,
1020 TI_GET_SYMNAME,
1021 TI_GET_LENGTH,
1022 TI_GET_TYPE,
1023 TI_GET_TYPEID,
1024 TI_GET_BASETYPE,
1025 TI_GET_ARRAYINDEXTYPEID,
1026 TI_FINDCHILDREN,
1027 TI_GET_DATAKIND,
1028 TI_GET_ADDRESSOFFSET,
1029 TI_GET_OFFSET,
1030 TI_GET_VALUE,
1031 TI_GET_COUNT,
1032 TI_GET_CHILDRENCOUNT,
1033 TI_GET_BITPOSITION,
1034 TI_GET_VIRTUALBASECLASS,
1035 TI_GET_VIRTUALTABLESHAPEID,
1036 TI_GET_VIRTUALBASEPOINTEROFFSET,
1037 TI_GET_CLASSPARENTID,
1038 TI_GET_NESTED,
1039 TI_GET_SYMINDEX,
1040 TI_GET_LEXICALPARENT,
1041 TI_GET_ADDRESS,
1042 TI_GET_THISADJUST,
1043 TI_GET_UDTKIND,
1044 TI_IS_EQUIV_TO,
1045 TI_GET_CALLING_CONVENTION
1046 } IMAGEHLP_SYMBOL_TYPE_INFO;
1047
1048 typedef struct _TI_FINDCHILDREN_PARAMS {
1049 ULONG Count;
1050 ULONG Start;
1051 ULONG ChildId[1];
1052 } TI_FINDCHILDREN_PARAMS;
1053
1054 WINBOOL IMAGEAPI SymGetTypeInfo(HANDLE hProcess,DWORD64 ModBase,ULONG TypeId,IMAGEHLP_SYMBOL_TYPE_INFO GetType,PVOID pInfo);
1055 WINBOOL IMAGEAPI SymEnumTypes(HANDLE hProcess,ULONG64 BaseOfDll,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext);
1056 WINBOOL IMAGEAPI SymEnumTypesW(HANDLE hProcess,ULONG64 BaseOfDll,PSYM_ENUMERATESYMBOLS_CALLBACKW EnumSymbolsCallback,PVOID UserContext);
1057 WINBOOL IMAGEAPI SymGetTypeFromName(HANDLE hProcess,ULONG64 BaseOfDll,PCSTR Name,PSYMBOL_INFO Symbol);
1058 WINBOOL IMAGEAPI SymGetTypeFromNameW(HANDLE hProcess,ULONG64 BaseOfDll,PCWSTR Name,PSYMBOL_INFOW Symbol);
1059 WINBOOL IMAGEAPI SymAddSymbol(HANDLE hProcess,ULONG64 BaseOfDll,PCSTR Name,DWORD64 Address,DWORD Size,DWORD Flags);
1060 WINBOOL IMAGEAPI SymAddSymbolW(HANDLE hProcess,ULONG64 BaseOfDll,PCWSTR Name,DWORD64 Address,DWORD Size,DWORD Flags);
1061 WINBOOL IMAGEAPI SymDeleteSymbol(HANDLE hProcess,ULONG64 BaseOfDll,PCSTR Name,DWORD64 Address,DWORD Flags);
1062 WINBOOL IMAGEAPI SymDeleteSymbolW(HANDLE hProcess,ULONG64 BaseOfDll,PCWSTR Name,DWORD64 Address,DWORD Flags);
1063
1064 typedef WINBOOL (WINAPI *PDBGHELP_CREATE_USER_DUMP_CALLBACK)(DWORD DataType,PVOID *Data,LPDWORD DataLength,PVOID UserData);
1065
1066 WINBOOL WINAPI DbgHelpCreateUserDump(LPCSTR FileName,PDBGHELP_CREATE_USER_DUMP_CALLBACK Callback,PVOID UserData);
1067 WINBOOL WINAPI DbgHelpCreateUserDumpW(LPCWSTR FileName,PDBGHELP_CREATE_USER_DUMP_CALLBACK Callback,PVOID UserData);
1068 WINBOOL IMAGEAPI SymGetSymFromAddr64(HANDLE hProcess,DWORD64 qwAddr,PDWORD64 pdwDisplacement,PIMAGEHLP_SYMBOL64 Symbol);
1069
1070#ifdef _IMAGEHLP64
1071#define SymGetSymFromAddr SymGetSymFromAddr64
1072#else
1073 WINBOOL IMAGEAPI SymGetSymFromAddr(HANDLE hProcess,DWORD dwAddr,PDWORD pdwDisplacement,PIMAGEHLP_SYMBOL Symbol);
1074#endif
1075
1076 WINBOOL IMAGEAPI SymGetSymFromName64(HANDLE hProcess,PCSTR Name,PIMAGEHLP_SYMBOL64 Symbol);
1077
1078#ifdef _IMAGEHLP64
1079#define SymGetSymFromName SymGetSymFromName64
1080#else
1081 WINBOOL IMAGEAPI SymGetSymFromName(HANDLE hProcess,PCSTR Name,PIMAGEHLP_SYMBOL Symbol);
1082#endif
1083
1084 DBHLP_DEPRECIATED WINBOOL IMAGEAPI FindFileInPath(HANDLE hprocess,PCSTR SearchPath,PCSTR FileName,PVOID id,DWORD two,DWORD three,DWORD flags,PSTR FilePath);
1085 DBHLP_DEPRECIATED WINBOOL IMAGEAPI FindFileInSearchPath(HANDLE hprocess,PCSTR SearchPath,PCSTR FileName,DWORD one,DWORD two,DWORD three,PSTR FilePath);
1086 DBHLP_DEPRECIATED WINBOOL IMAGEAPI SymEnumSym(HANDLE hProcess,ULONG64 BaseOfDll,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext);
1087
1088#ifdef __cplusplus
1089}
1090#endif
1091
1092#define SYMF_OMAP_GENERATED 0x00000001
1093#define SYMF_OMAP_MODIFIED 0x00000002
1094#define SYMF_REGISTER 0x00000008
1095#define SYMF_REGREL 0x00000010
1096#define SYMF_FRAMEREL 0x00000020
1097#define SYMF_PARAMETER 0x00000040
1098#define SYMF_LOCAL 0x00000080
1099#define SYMF_CONSTANT 0x00000100
1100#define SYMF_EXPORT 0x00000200
1101#define SYMF_FORWARDER 0x00000400
1102#define SYMF_FUNCTION 0x00000800
1103#define SYMF_VIRTUAL 0x00001000
1104#define SYMF_THUNK 0x00002000
1105#define SYMF_TLSREL 0x00004000
1106
1107#define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
1108#define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER
1109#define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL
1110#define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL
1111#define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER
1112#define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL
1113#define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT
1114#define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION
1115#define IMAGEHLP_SYMBOL_VIRTUAL SYMF_VIRTUAL
1116#define IMAGEHLP_SYMBOL_THUNK SYMF_THUNK
1117#define IMAGEHLP_SYMBOL_INFO_TLSRELATIVE SYMF_TLSREL
1118
1119#include <pshpack4.h>
1120
1121#define MINIDUMP_SIGNATURE ('PMDM')
1122#define MINIDUMP_VERSION (42899)
1123 typedef DWORD RVA;
1124 typedef ULONG64 RVA64;
1125
1126 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR {
1127 ULONG32 DataSize;
1128 RVA Rva;
1129 } MINIDUMP_LOCATION_DESCRIPTOR;
1130
1131 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR64 {
1132 ULONG64 DataSize;
1133 RVA64 Rva;
1134 } MINIDUMP_LOCATION_DESCRIPTOR64;
1135
1136 typedef struct _MINIDUMP_MEMORY_DESCRIPTOR {
1137 ULONG64 StartOfMemoryRange;
1138 MINIDUMP_LOCATION_DESCRIPTOR Memory;
1139 } MINIDUMP_MEMORY_DESCRIPTOR,*PMINIDUMP_MEMORY_DESCRIPTOR;
1140
1141 typedef struct _MINIDUMP_MEMORY_DESCRIPTOR64 {
1142 ULONG64 StartOfMemoryRange;
1143 ULONG64 DataSize;
1144 } MINIDUMP_MEMORY_DESCRIPTOR64,*PMINIDUMP_MEMORY_DESCRIPTOR64;
1145
1146 typedef struct _MINIDUMP_HEADER {
1147 ULONG32 Signature;
1148 ULONG32 Version;
1149 ULONG32 NumberOfStreams;
1150 RVA StreamDirectoryRva;
1151 ULONG32 CheckSum;
1152 __C89_NAMELESS union {
1153 ULONG32 Reserved;
1154 ULONG32 TimeDateStamp;
1155 };
1156 ULONG64 Flags;
1157 } MINIDUMP_HEADER,*PMINIDUMP_HEADER;
1158
1159 typedef struct _MINIDUMP_DIRECTORY {
1160 ULONG32 StreamType;
1161 MINIDUMP_LOCATION_DESCRIPTOR Location;
1162 } MINIDUMP_DIRECTORY,*PMINIDUMP_DIRECTORY;
1163
1164 typedef struct _MINIDUMP_STRING {
1165 ULONG32 Length;
1166 WCHAR Buffer[0];
1167 } MINIDUMP_STRING,*PMINIDUMP_STRING;
1168
1169 typedef enum _MINIDUMP_STREAM_TYPE {
1170 UnusedStream = 0,
1171 ReservedStream0 = 1,
1172 ReservedStream1 = 2,
1173 ThreadListStream = 3,
1174 ModuleListStream = 4,
1175 MemoryListStream = 5,
1176 ExceptionStream = 6,
1177 SystemInfoStream = 7,
1178 ThreadExListStream = 8,
1179 Memory64ListStream = 9,
1180 CommentStreamA = 10,
1181 CommentStreamW = 11,
1182 HandleDataStream = 12,
1183 FunctionTableStream = 13,
1184 UnloadedModuleListStream = 14,
1185 MiscInfoStream = 15,
1186 MemoryInfoListStream = 16,
1187 ThreadInfoListStream = 17,
1188 HandleOperationListStream = 18,
1189 TokenStream = 19,
1190 JavaScriptDataStream = 20,
1191 SystemMemoryInfoStream = 21,
1192 ProcessVmCountersStream = 22,
1193 IptTraceStream = 23,
1194 ThreadNamesStream = 24,
1195 ceStreamNull = 0x8000,
1196 ceStreamSystemInfo = 0x8001,
1197 ceStreamException = 0x8002,
1198 ceStreamModuleList = 0x8003,
1199 ceStreamProcessList = 0x8004,
1200 ceStreamThreadList = 0x8005,
1201 ceStreamThreadContextList = 0x8006,
1202 ceStreamThreadCallStackList = 0x8007,
1203 ceStreamMemoryVirtualList = 0x8008,
1204 ceStreamMemoryPhysicalList = 0x8009,
1205 ceStreamBucketParameters = 0x800a,
1206 ceStreamProcessModuleMap = 0x800b,
1207 ceStreamDiagnosisList = 0x800c,
1208 LastReservedStream = 0xffff
1209 } MINIDUMP_STREAM_TYPE;
1210
1211 typedef union _CPU_INFORMATION {
1212 struct {
1213 ULONG32 VendorId[3];
1214 ULONG32 VersionInformation;
1215 ULONG32 FeatureInformation;
1216 ULONG32 AMDExtendedCpuFeatures;
1217 } X86CpuInfo;
1218 struct {
1219 ULONG64 ProcessorFeatures[2];
1220 } OtherCpuInfo;
1221 } CPU_INFORMATION,*PCPU_INFORMATION;
1222
1223 typedef struct _MINIDUMP_SYSTEM_INFO {
1224 USHORT ProcessorArchitecture;
1225 USHORT ProcessorLevel;
1226 USHORT ProcessorRevision;
1227 __C89_NAMELESS union {
1228 USHORT Reserved0;
1229 __C89_NAMELESS struct {
1230 UCHAR NumberOfProcessors;
1231 UCHAR ProductType;
1232 };
1233 };
1234 ULONG32 MajorVersion;
1235 ULONG32 MinorVersion;
1236 ULONG32 BuildNumber;
1237 ULONG32 PlatformId;
1238 RVA CSDVersionRva;
1239 __C89_NAMELESS union {
1240 ULONG32 Reserved1;
1241 __C89_NAMELESS struct {
1242 USHORT SuiteMask;
1243 USHORT Reserved2;
1244 };
1245 };
1246 CPU_INFORMATION Cpu;
1247 } MINIDUMP_SYSTEM_INFO,*PMINIDUMP_SYSTEM_INFO;
1248
1249 C_ASSERT(sizeof(((PPROCESS_INFORMATION)0)->dwThreadId)==4);
1250
1251 typedef struct _MINIDUMP_THREAD {
1252 ULONG32 ThreadId;
1253 ULONG32 SuspendCount;
1254 ULONG32 PriorityClass;
1255 ULONG32 Priority;
1256 ULONG64 Teb;
1257 MINIDUMP_MEMORY_DESCRIPTOR Stack;
1258 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
1259 } MINIDUMP_THREAD,*PMINIDUMP_THREAD;
1260
1261 typedef struct _MINIDUMP_THREAD_LIST {
1262 ULONG32 NumberOfThreads;
1263 MINIDUMP_THREAD Threads[0];
1264 } MINIDUMP_THREAD_LIST,*PMINIDUMP_THREAD_LIST;
1265
1266 typedef struct _MINIDUMP_THREAD_EX {
1267 ULONG32 ThreadId;
1268 ULONG32 SuspendCount;
1269 ULONG32 PriorityClass;
1270 ULONG32 Priority;
1271 ULONG64 Teb;
1272 MINIDUMP_MEMORY_DESCRIPTOR Stack;
1273 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
1274 MINIDUMP_MEMORY_DESCRIPTOR BackingStore;
1275 } MINIDUMP_THREAD_EX,*PMINIDUMP_THREAD_EX;
1276
1277 typedef struct _MINIDUMP_THREAD_EX_LIST {
1278 ULONG32 NumberOfThreads;
1279 MINIDUMP_THREAD_EX Threads[0];
1280 } MINIDUMP_THREAD_EX_LIST,*PMINIDUMP_THREAD_EX_LIST;
1281
1282 typedef struct _MINIDUMP_EXCEPTION {
1283 ULONG32 ExceptionCode;
1284 ULONG32 ExceptionFlags;
1285 ULONG64 ExceptionRecord;
1286 ULONG64 ExceptionAddress;
1287 ULONG32 NumberParameters;
1288 ULONG32 __unusedAlignment;
1289 ULONG64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
1290 } MINIDUMP_EXCEPTION,*PMINIDUMP_EXCEPTION;
1291
1292 typedef struct MINIDUMP_EXCEPTION_STREAM {
1293 ULONG32 ThreadId;
1294 ULONG32 __alignment;
1295 MINIDUMP_EXCEPTION ExceptionRecord;
1296 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
1297 } MINIDUMP_EXCEPTION_STREAM,*PMINIDUMP_EXCEPTION_STREAM;
1298
1299 typedef struct _MINIDUMP_MODULE {
1300 ULONG64 BaseOfImage;
1301 ULONG32 SizeOfImage;
1302 ULONG32 CheckSum;
1303 ULONG32 TimeDateStamp;
1304 RVA ModuleNameRva;
1305 VS_FIXEDFILEINFO VersionInfo;
1306 MINIDUMP_LOCATION_DESCRIPTOR CvRecord;
1307 MINIDUMP_LOCATION_DESCRIPTOR MiscRecord;
1308 ULONG64 Reserved0;
1309 ULONG64 Reserved1;
1310 } MINIDUMP_MODULE,*PMINIDUMP_MODULE;
1311
1312 typedef struct _MINIDUMP_MODULE_LIST {
1313 ULONG32 NumberOfModules;
1314 MINIDUMP_MODULE Modules[0];
1315 } MINIDUMP_MODULE_LIST,*PMINIDUMP_MODULE_LIST;
1316
1317 typedef struct _MINIDUMP_MEMORY_LIST {
1318 ULONG32 NumberOfMemoryRanges;
1319 MINIDUMP_MEMORY_DESCRIPTOR MemoryRanges[0];
1320 } MINIDUMP_MEMORY_LIST,*PMINIDUMP_MEMORY_LIST;
1321
1322 typedef struct _MINIDUMP_MEMORY64_LIST {
1323 ULONG64 NumberOfMemoryRanges;
1324 RVA64 BaseRva;
1325 MINIDUMP_MEMORY_DESCRIPTOR64 MemoryRanges[0];
1326 } MINIDUMP_MEMORY64_LIST,*PMINIDUMP_MEMORY64_LIST;
1327
1328 typedef struct _MINIDUMP_EXCEPTION_INFORMATION {
1329 DWORD ThreadId;
1330 PEXCEPTION_POINTERS ExceptionPointers;
1331 WINBOOL ClientPointers;
1332 } MINIDUMP_EXCEPTION_INFORMATION,*PMINIDUMP_EXCEPTION_INFORMATION;
1333
1334 typedef struct _MINIDUMP_EXCEPTION_INFORMATION64 {
1335 DWORD ThreadId;
1336 ULONG64 ExceptionRecord;
1337 ULONG64 ContextRecord;
1338 WINBOOL ClientPointers;
1339 } MINIDUMP_EXCEPTION_INFORMATION64,*PMINIDUMP_EXCEPTION_INFORMATION64;
1340
1341 typedef enum _MINIDUMP_HANDLE_OBJECT_INFORMATION_TYPE {
1342 MiniHandleObjectInformationNone,
1343 MiniThreadInformation1,
1344 MiniMutantInformation1,
1345 MiniMutantInformation2,
1346 MiniProcessInformation1,
1347 MiniProcessInformation2,
1348 MiniEventInformation1,
1349 MiniSectionInformation1,
1350 MiniSemaphoreInformation1,
1351 MiniHandleObjectInformationTypeMax
1352 } MINIDUMP_HANDLE_OBJECT_INFORMATION_TYPE;
1353
1354 typedef struct _MINIDUMP_HANDLE_OBJECT_INFORMATION {
1355 RVA NextInfoRva;
1356 ULONG32 InfoType;
1357 ULONG32 SizeOfInfo;
1358 } MINIDUMP_HANDLE_OBJECT_INFORMATION;
1359
1360 typedef struct _MINIDUMP_HANDLE_DESCRIPTOR {
1361 ULONG64 Handle;
1362 RVA TypeNameRva;
1363 RVA ObjectNameRva;
1364 ULONG32 Attributes;
1365 ULONG32 GrantedAccess;
1366 ULONG32 HandleCount;
1367 ULONG32 PointerCount;
1368 } MINIDUMP_HANDLE_DESCRIPTOR,*PMINIDUMP_HANDLE_DESCRIPTOR;
1369
1370 typedef struct _MINIDUMP_HANDLE_DATA_STREAM {
1371 ULONG32 SizeOfHeader;
1372 ULONG32 SizeOfDescriptor;
1373 ULONG32 NumberOfDescriptors;
1374 ULONG32 Reserved;
1375 } MINIDUMP_HANDLE_DATA_STREAM,*PMINIDUMP_HANDLE_DATA_STREAM;
1376
1377 typedef struct _MINIDUMP_FUNCTION_TABLE_DESCRIPTOR {
1378 ULONG64 MinimumAddress;
1379 ULONG64 MaximumAddress;
1380 ULONG64 BaseAddress;
1381 ULONG32 EntryCount;
1382 ULONG32 SizeOfAlignPad;
1383 } MINIDUMP_FUNCTION_TABLE_DESCRIPTOR,*PMINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
1384
1385 typedef struct _MINIDUMP_FUNCTION_TABLE_STREAM {
1386 ULONG32 SizeOfHeader;
1387 ULONG32 SizeOfDescriptor;
1388 ULONG32 SizeOfNativeDescriptor;
1389 ULONG32 SizeOfFunctionEntry;
1390 ULONG32 NumberOfDescriptors;
1391 ULONG32 SizeOfAlignPad;
1392 } MINIDUMP_FUNCTION_TABLE_STREAM,*PMINIDUMP_FUNCTION_TABLE_STREAM;
1393
1394 typedef struct _MINIDUMP_UNLOADED_MODULE {
1395 ULONG64 BaseOfImage;
1396 ULONG32 SizeOfImage;
1397 ULONG32 CheckSum;
1398 ULONG32 TimeDateStamp;
1399 RVA ModuleNameRva;
1400 } MINIDUMP_UNLOADED_MODULE,*PMINIDUMP_UNLOADED_MODULE;
1401
1402 typedef struct _MINIDUMP_UNLOADED_MODULE_LIST {
1403 ULONG32 SizeOfHeader;
1404 ULONG32 SizeOfEntry;
1405 ULONG32 NumberOfEntries;
1406 } MINIDUMP_UNLOADED_MODULE_LIST,*PMINIDUMP_UNLOADED_MODULE_LIST;
1407
1408#define MINIDUMP_MISC1_PROCESS_ID 0x00000001
1409#define MINIDUMP_MISC1_PROCESS_TIMES 0x00000002
1410#define MINIDUMP_MISC1_PROCESSOR_POWER_INFO 0x00000004
1411
1412 typedef struct _MINIDUMP_MISC_INFO {
1413 ULONG32 SizeOfInfo;
1414 ULONG32 Flags1;
1415 ULONG32 ProcessId;
1416 ULONG32 ProcessCreateTime;
1417 ULONG32 ProcessUserTime;
1418 ULONG32 ProcessKernelTime;
1419 } MINIDUMP_MISC_INFO,*PMINIDUMP_MISC_INFO;
1420
1421 typedef struct _MINIDUMP_USER_RECORD {
1422 ULONG32 Type;
1423 MINIDUMP_LOCATION_DESCRIPTOR Memory;
1424 } MINIDUMP_USER_RECORD,*PMINIDUMP_USER_RECORD;
1425
1426 typedef struct _MINIDUMP_USER_STREAM {
1427 ULONG32 Type;
1428 ULONG BufferSize;
1429 PVOID Buffer;
1430 } MINIDUMP_USER_STREAM,*PMINIDUMP_USER_STREAM;
1431
1432 typedef struct _MINIDUMP_USER_STREAM_INFORMATION {
1433 ULONG UserStreamCount;
1434 PMINIDUMP_USER_STREAM UserStreamArray;
1435 } MINIDUMP_USER_STREAM_INFORMATION,*PMINIDUMP_USER_STREAM_INFORMATION;
1436
1437 typedef enum _MINIDUMP_CALLBACK_TYPE {
1438 ModuleCallback,
1439 ThreadCallback,
1440 ThreadExCallback,
1441 IncludeThreadCallback,
1442 IncludeModuleCallback,
1443 MemoryCallback,
1444 CancelCallback,
1445 WriteKernelMinidumpCallback,
1446 KernelMinidumpStatusCallback,
1447 RemoveMemoryCallback,
1448 IncludeVmRegionCallback,
1449 IoStartCallback,
1450 IoWriteAllCallback,
1451 IoFinishCallback,
1452 ReadMemoryFailureCallback,
1453 SecondaryFlagsCallback,
1454 IsProcessSnapshotCallback,
1455 VmStartCallback,
1456 VmQueryCallback,
1457 VmPreReadCallback,
1458 VmPostReadCallback
1459 } MINIDUMP_CALLBACK_TYPE;
1460
1461 typedef struct _MINIDUMP_THREAD_CALLBACK {
1462 ULONG ThreadId;
1463 HANDLE ThreadHandle;
1464#if defined(__aarch64__)
1465 ULONG Pad;
1466#endif
1467 CONTEXT Context;
1468 ULONG SizeOfContext;
1469 ULONG64 StackBase;
1470 ULONG64 StackEnd;
1471 } MINIDUMP_THREAD_CALLBACK,*PMINIDUMP_THREAD_CALLBACK;
1472
1473 typedef struct _MINIDUMP_THREAD_EX_CALLBACK {
1474 ULONG ThreadId;
1475 HANDLE ThreadHandle;
1476#if defined(__aarch64__)
1477 ULONG Pad;
1478#endif
1479 CONTEXT Context;
1480 ULONG SizeOfContext;
1481 ULONG64 StackBase;
1482 ULONG64 StackEnd;
1483 ULONG64 BackingStoreBase;
1484 ULONG64 BackingStoreEnd;
1485 } MINIDUMP_THREAD_EX_CALLBACK,*PMINIDUMP_THREAD_EX_CALLBACK;
1486
1487 typedef struct _MINIDUMP_INCLUDE_THREAD_CALLBACK {
1488 ULONG ThreadId;
1489 } MINIDUMP_INCLUDE_THREAD_CALLBACK,*PMINIDUMP_INCLUDE_THREAD_CALLBACK;
1490
1491 typedef enum _THREAD_WRITE_FLAGS {
1492 ThreadWriteThread = 0x0001,
1493 ThreadWriteStack = 0x0002,
1494 ThreadWriteContext = 0x0004,
1495 ThreadWriteBackingStore = 0x0008,
1496 ThreadWriteInstructionWindow = 0x0010,
1497 ThreadWriteThreadData = 0x0020,
1498 ThreadWriteThreadInfo = 0x0040
1499 } THREAD_WRITE_FLAGS;
1500
1501 typedef struct _MINIDUMP_MODULE_CALLBACK {
1502 PWCHAR FullPath;
1503 ULONG64 BaseOfImage;
1504 ULONG SizeOfImage;
1505 ULONG CheckSum;
1506 ULONG TimeDateStamp;
1507 VS_FIXEDFILEINFO VersionInfo;
1508 PVOID CvRecord;
1509 ULONG SizeOfCvRecord;
1510 PVOID MiscRecord;
1511 ULONG SizeOfMiscRecord;
1512 } MINIDUMP_MODULE_CALLBACK,*PMINIDUMP_MODULE_CALLBACK;
1513
1514 typedef struct _MINIDUMP_INCLUDE_MODULE_CALLBACK {
1515 ULONG64 BaseOfImage;
1516 } MINIDUMP_INCLUDE_MODULE_CALLBACK,*PMINIDUMP_INCLUDE_MODULE_CALLBACK;
1517
1518 typedef enum _MODULE_WRITE_FLAGS {
1519 ModuleWriteModule = 0x0001,
1520 ModuleWriteDataSeg = 0x0002,
1521 ModuleWriteMiscRecord = 0x0004,
1522 ModuleWriteCvRecord = 0x0008,
1523 ModuleReferencedByMemory = 0x0010,
1524 ModuleWriteTlsData = 0x0020,
1525 ModuleWriteCodeSegs = 0x0040
1526 } MODULE_WRITE_FLAGS;
1527
1528 typedef enum _MINIDUMP_SECONDARY_FLAGS {
1529 MiniSecondaryWithoutPowerInfo = 0x00000001
1530 } MINIDUMP_SECONDARY_FLAGS;
1531
1532 typedef struct _MINIDUMP_CALLBACK_INPUT {
1533 ULONG ProcessId;
1534 HANDLE ProcessHandle;
1535 ULONG CallbackType;
1536 __C89_NAMELESS union {
1537 MINIDUMP_THREAD_CALLBACK Thread;
1538 MINIDUMP_THREAD_EX_CALLBACK ThreadEx;
1539 MINIDUMP_MODULE_CALLBACK Module;
1540 MINIDUMP_INCLUDE_THREAD_CALLBACK IncludeThread;
1541 MINIDUMP_INCLUDE_MODULE_CALLBACK IncludeModule;
1542 };
1543 } MINIDUMP_CALLBACK_INPUT,*PMINIDUMP_CALLBACK_INPUT;
1544
1545typedef struct _MINIDUMP_MEMORY_INFO {
1546 ULONG64 BaseAddress;
1547 ULONG64 AllocationBase;
1548 ULONG32 AllocationProtect;
1549 ULONG32 __alignment1;
1550 ULONG64 RegionSize;
1551 ULONG32 State;
1552 ULONG32 Protect;
1553 ULONG32 Type;
1554 ULONG32 __alignment2;
1555} MINIDUMP_MEMORY_INFO, *PMINIDUMP_MEMORY_INFO;
1556
1557typedef struct _MINIDUMP_MISC_INFO_2 {
1558 ULONG32 SizeOfInfo;
1559 ULONG32 Flags1;
1560 ULONG32 ProcessId;
1561 ULONG32 ProcessCreateTime;
1562 ULONG32 ProcessUserTime;
1563 ULONG32 ProcessKernelTime;
1564 ULONG32 ProcessorMaxMhz;
1565 ULONG32 ProcessorCurrentMhz;
1566 ULONG32 ProcessorMhzLimit;
1567 ULONG32 ProcessorMaxIdleState;
1568 ULONG32 ProcessorCurrentIdleState;
1569} MINIDUMP_MISC_INFO_2, *PMINIDUMP_MISC_INFO_2;
1570
1571typedef struct _MINIDUMP_MEMORY_INFO_LIST {
1572 ULONG SizeOfHeader;
1573 ULONG SizeOfEntry;
1574 ULONG64 NumberOfEntries;
1575} MINIDUMP_MEMORY_INFO_LIST, *PMINIDUMP_MEMORY_INFO_LIST;
1576
1577 typedef struct _MINIDUMP_CALLBACK_OUTPUT {
1578 __C89_NAMELESS union {
1579 ULONG ModuleWriteFlags;
1580 ULONG ThreadWriteFlags;
1581 ULONG SecondaryFlags;
1582 __C89_NAMELESS struct {
1583 ULONG64 MemoryBase;
1584 ULONG MemorySize;
1585 };
1586 __C89_NAMELESS struct {
1587 WINBOOL CheckCancel;
1588 WINBOOL Cancel;
1589 };
1590 HANDLE Handle;
1591 };
1592 __C89_NAMELESS struct {
1593 MINIDUMP_MEMORY_INFO VmRegion;
1594 WINBOOL Continue;
1595 };
1596 HRESULT Status;
1597 } MINIDUMP_CALLBACK_OUTPUT, *PMINIDUMP_CALLBACK_OUTPUT;
1598
1599 typedef enum _MINIDUMP_TYPE {
1600 MiniDumpNormal = 0x00000000,
1601 MiniDumpWithDataSegs = 0x00000001,
1602 MiniDumpWithFullMemory = 0x00000002,
1603 MiniDumpWithHandleData = 0x00000004,
1604 MiniDumpFilterMemory = 0x00000008,
1605 MiniDumpScanMemory = 0x00000010,
1606 MiniDumpWithUnloadedModules = 0x00000020,
1607 MiniDumpWithIndirectlyReferencedMemory = 0x00000040,
1608 MiniDumpFilterModulePaths = 0x00000080,
1609 MiniDumpWithProcessThreadData = 0x00000100,
1610 MiniDumpWithPrivateReadWriteMemory = 0x00000200,
1611 MiniDumpWithoutOptionalData = 0x00000400,
1612 MiniDumpWithFullMemoryInfo = 0x00000800,
1613 MiniDumpWithThreadInfo = 0x00001000,
1614 MiniDumpWithCodeSegs = 0x00002000,
1615 MiniDumpWithoutAuxiliaryState = 0x00004000,
1616 MiniDumpWithFullAuxiliaryState = 0x00008000,
1617 MiniDumpWithPrivateWriteCopyMemory = 0x00010000,
1618 MiniDumpIgnoreInaccessibleMemory = 0x00020000,
1619 MiniDumpWithTokenInformation = 0x00040000,
1620 MiniDumpWithModuleHeaders = 0x00080000,
1621 MiniDumpFilterTriage = 0x00100000,
1622 MiniDumpWithAvxXStateContext = 0x00200000,
1623 MiniDumpWithIptTrace = 0x00400000,
1624 MiniDumpScanInaccessiblePartialPages = 0x00800000,
1625 MiniDumpValidTypeFlags = 0x00ffffff
1626 } MINIDUMP_TYPE;
1627
1628#define MINIDUMP_THREAD_INFO_ERROR_THREAD 0x00000001
1629#define MINIDUMP_THREAD_INFO_WRITING_THREAD 0x00000002
1630#define MINIDUMP_THREAD_INFO_EXITED_THREAD 0x00000004
1631#define MINIDUMP_THREAD_INFO_INVALID_INFO 0x00000008
1632#define MINIDUMP_THREAD_INFO_INVALID_CONTEXT 0x00000010
1633#define MINIDUMP_THREAD_INFO_INVALID_TEB 0x00000020
1634
1635typedef struct _MINIDUMP_THREAD_INFO {
1636 ULONG32 ThreadId;
1637 ULONG32 DumpFlags;
1638 ULONG32 DumpError;
1639 ULONG32 ExitStatus;
1640 ULONG64 CreateTime;
1641 ULONG64 ExitTime;
1642 ULONG64 KernelTime;
1643 ULONG64 UserTime;
1644 ULONG64 StartAddress;
1645 ULONG64 Affinity;
1646} MINIDUMP_THREAD_INFO, *PMINIDUMP_THREAD_INFO;
1647
1648typedef struct _MINIDUMP_THREAD_INFO_LIST {
1649 ULONG SizeOfHeader;
1650 ULONG SizeOfEntry;
1651 ULONG NumberOfEntries;
1652} MINIDUMP_THREAD_INFO_LIST, *PMINIDUMP_THREAD_INFO_LIST;
1653
1654typedef struct _MINIDUMP_HANDLE_OPERATION_LIST {
1655 ULONG32 SizeOfHeader;
1656 ULONG32 SizeOfEntry;
1657 ULONG32 NumberOfEntries;
1658 ULONG32 Reserved;
1659} MINIDUMP_HANDLE_OPERATION_LIST, *PMINIDUMP_HANDLE_OPERATION_LIST;
1660
1661#ifdef __cplusplus
1662extern "C" {
1663#endif
1664
1665 typedef WINBOOL (WINAPI *MINIDUMP_CALLBACK_ROUTINE)(PVOID CallbackParam,CONST PMINIDUMP_CALLBACK_INPUT CallbackInput,PMINIDUMP_CALLBACK_OUTPUT CallbackOutput);
1666
1667 typedef struct _MINIDUMP_CALLBACK_INFORMATION {
1668 MINIDUMP_CALLBACK_ROUTINE CallbackRoutine;
1669 PVOID CallbackParam;
1670 } MINIDUMP_CALLBACK_INFORMATION,*PMINIDUMP_CALLBACK_INFORMATION;
1671
1672#define RVA_TO_ADDR(Mapping,Rva) ((PVOID)(((ULONG_PTR) (Mapping)) + (Rva)))
1673
1674 WINBOOL WINAPI MiniDumpWriteDump(HANDLE hProcess,DWORD ProcessId,HANDLE hFile,MINIDUMP_TYPE DumpType,CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam);
1675 WINBOOL WINAPI MiniDumpReadDumpStream(PVOID BaseOfDump,ULONG StreamNumber,PMINIDUMP_DIRECTORY *Dir,PVOID *StreamPointer,ULONG *StreamSize);
1676
1677WINBOOL WINAPI EnumerateLoadedModulesEx(
1678 HANDLE hProcess,
1679 PENUMLOADED_MODULES_CALLBACK64 EnumLoadedModulesCallback,
1680 PVOID UserContext
1681);
1682
1683WINBOOL WINAPI EnumerateLoadedModulesExW(
1684 HANDLE hProcess,
1685 PENUMLOADED_MODULES_CALLBACKW64 EnumLoadedModulesCallback,
1686 PVOID UserContext
1687);
1688
1689WINBOOL WINAPI SymAddSourceStream(
1690 HANDLE hProcess,
1691 ULONG64 Base,
1692 PCSTR StreamFile,
1693 PBYTE Buffer,
1694 size_t Size
1695);
1696
1697WINBOOL WINAPI SymAddSourceStreamW(
1698 HANDLE hProcess,
1699 ULONG64 Base,
1700 PCWSTR StreamFile,
1701 PBYTE Buffer,
1702 size_t Size
1703);
1704
1705WINBOOL WINAPI SymEnumSourceLines(
1706 HANDLE hProcess,
1707 ULONG64 Base,
1708 PCSTR Obj,
1709 PCSTR File,
1710 DWORD Line,
1711 DWORD Flags,
1712 PSYM_ENUMLINES_CALLBACK EnumLinesCallback,
1713 PVOID UserContext
1714);
1715
1716WINBOOL WINAPI SymEnumSourceLinesW(
1717 HANDLE hProcess,
1718 ULONG64 Base,
1719 PCWSTR Obj,
1720 PCWSTR File,
1721 DWORD Line,
1722 DWORD Flags,
1723 PSYM_ENUMLINES_CALLBACKW EnumLinesCallback,
1724 PVOID UserContext
1725);
1726
1727WINBOOL WINAPI SymEnumTypesByName(
1728 HANDLE hProcess,
1729 ULONG64 BaseOfDll,
1730 PCSTR mask,
1731 PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,
1732 PVOID UserContext
1733);
1734
1735WINBOOL WINAPI SymEnumTypesByNameW(
1736 HANDLE hProcess,
1737 ULONG64 BaseOfDll,
1738 PCSTR mask,
1739 PSYM_ENUMERATESYMBOLS_CALLBACKW EnumSymbolsCallback,
1740 PVOID UserContext
1741);
1742
1743HANDLE WINAPI SymFindDebugInfoFile(
1744 HANDLE hProcess,
1745 PCSTR FileName,
1746 PSTR DebugFilePath,
1747 PFIND_DEBUG_FILE_CALLBACK Callback,
1748 PVOID CallerData
1749);
1750
1751HANDLE WINAPI SymFindDebugInfoFileW(
1752 HANDLE hProcess,
1753 PCWSTR FileName,
1754 PWSTR DebugFilePath,
1755 PFIND_DEBUG_FILE_CALLBACKW Callback,
1756 PVOID CallerData
1757);
1758
1759HANDLE WINAPI SymFindExecutableImage(
1760 HANDLE hProcess,
1761 PCSTR FileName,
1762 PSTR ImageFilePath,
1763 PFIND_EXE_FILE_CALLBACK Callback,
1764 PVOID CallerData
1765);
1766
1767HANDLE WINAPI SymFindExecutableImageW(
1768 HANDLE hProcess,
1769 PCWSTR FileName,
1770 PWSTR ImageFilePath,
1771 PFIND_EXE_FILE_CALLBACKW Callback,
1772 PVOID CallerData
1773);
1774
1775WINBOOL WINAPI SymFromIndex(
1776 HANDLE hProcess,
1777 ULONG64 BaseOfDll,
1778 DWORD Index,
1779 PSYMBOL_INFO Symbol
1780);
1781
1782WINBOOL WINAPI SymFromIndexW(
1783 HANDLE hProcess,
1784 ULONG64 BaseOfDll,
1785 DWORD Index,
1786 PSYMBOL_INFOW Symbol
1787);
1788
1789WINBOOL WINAPI SymGetScope(
1790 HANDLE hProcess,
1791 ULONG64 BaseOfDll,
1792 DWORD Index,
1793 PSYMBOL_INFO Symbol
1794);
1795
1796WINBOOL WINAPI SymGetScopeW(
1797 HANDLE hProcess,
1798 ULONG64 BaseOfDll,
1799 DWORD Index,
1800 PSYMBOL_INFOW Symbol
1801);
1802
1803WINBOOL WINAPI SymGetSourceFileFromToken(
1804 HANDLE hProcess,
1805 PVOID Token,
1806 PCSTR Params,
1807 PSTR FilePath,
1808 DWORD Size
1809);
1810
1811WINBOOL WINAPI SymGetSourceFileFromTokenW(
1812 HANDLE hProcess,
1813 PVOID Token,
1814 PCWSTR Params,
1815 PWSTR FilePath,
1816 DWORD Size
1817);
1818
1819WINBOOL WINAPI SymGetSourceFileToken(
1820 HANDLE hProcess,
1821 ULONG64 Base,
1822 PCSTR FileSpec,
1823 PVOID *Token,
1824 DWORD *Size
1825);
1826
1827WINBOOL WINAPI SymGetSourceFileTokenW(
1828 HANDLE hProcess,
1829 ULONG64 Base,
1830 PCWSTR FileSpec,
1831 PVOID *Token,
1832 DWORD *Size
1833);
1834
1835WINBOOL WINAPI SymGetSourceFile(
1836 HANDLE hProcess,
1837 ULONG64 Base,
1838 PCSTR Params,
1839 PCSTR FileSpec,
1840 PSTR FilePath,
1841 DWORD Size
1842);
1843
1844WINBOOL WINAPI SymGetSourceFileW(
1845 HANDLE hProcess,
1846 ULONG64 Base,
1847 PCWSTR Params,
1848 PCWSTR FileSpec,
1849 PWSTR FilePath,
1850 DWORD Size
1851);
1852
1853WINBOOL WINAPI SymGetSourceVarFromToken(
1854 HANDLE hProcess,
1855 PVOID Token,
1856 PCSTR Params,
1857 PCSTR VarName,
1858 PSTR Value,
1859 DWORD Size
1860);
1861
1862WINBOOL WINAPI SymGetSourceVarFromTokenW(
1863 HANDLE hProcess,
1864 PVOID Token,
1865 PCWSTR Params,
1866 PCWSTR VarName,
1867 PWSTR Value,
1868 DWORD Size
1869);
1870
1871WINBOOL WINAPI SymGetSymbolFile(
1872 HANDLE hProcess,
1873 PCSTR SymPath,
1874 PCSTR ImageFile,
1875 DWORD Type,
1876 PSTR SymbolFile,
1877 size_t cSymbolFile,
1878 PSTR DbgFile,
1879 size_t cDbgFile
1880);
1881
1882WINBOOL WINAPI SymGetSymbolFileW(
1883 HANDLE hProcess,
1884 PCWSTR SymPath,
1885 PCWSTR ImageFile,
1886 DWORD Type,
1887 PWSTR SymbolFile,
1888 size_t cSymbolFile,
1889 PWSTR DbgFile,
1890 size_t cDbgFile
1891);
1892
1893WINBOOL WINAPI SymNext(
1894 HANDLE hProcess,
1895 PSYMBOL_INFO Symbol
1896);
1897
1898WINBOOL WINAPI SymNextW(
1899 HANDLE hProcess,
1900 PSYMBOL_INFOW Symbol
1901);
1902
1903WINBOOL WINAPI SymPrev(
1904 HANDLE hProcess,
1905 PSYMBOL_INFO Symbol
1906);
1907
1908WINBOOL WINAPI SymPrevW(
1909 HANDLE hProcess,
1910 PSYMBOL_INFOW Symbol
1911);
1912
1913WINBOOL WINAPI SymRefreshModuleList(
1914 HANDLE hProcess
1915);
1916
1917#define SYMSEARCH_MASKOBJS 0x01
1918#define SYMSEARCH_RECURSE 0x02
1919#define SYMSEARCH_GLOBALSONLY 0x04
1920#define SYMSEARCH_ALLITEMS 0x08
1921
1922WINBOOL WINAPI SymSearch(
1923 HANDLE hProcess,
1924 ULONG64 BaseOfDll,
1925 DWORD Index,
1926 DWORD SymTag,
1927 PCSTR Mask,
1928 DWORD64 Address,
1929 PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,
1930 PVOID UserContext,
1931 DWORD Options
1932);
1933
1934WINBOOL WINAPI SymSearchW(
1935 HANDLE hProcess,
1936 ULONG64 BaseOfDll,
1937 DWORD Index,
1938 DWORD SymTag,
1939 PCWSTR Mask,
1940 DWORD64 Address,
1941 PSYM_ENUMERATESYMBOLS_CALLBACKW EnumSymbolsCallback,
1942 PVOID UserContext,
1943 DWORD Options
1944);
1945
1946WINBOOL WINAPI SymSrvGetFileIndexString(
1947 HANDLE hProcess,
1948 PCSTR SrvPath,
1949 PCSTR File,
1950 PSTR Index,
1951 size_t Size,
1952 DWORD Flags
1953);
1954
1955WINBOOL WINAPI SymSrvGetFileIndexStringW(
1956 HANDLE hProcess,
1957 PCWSTR SrvPath,
1958 PCWSTR File,
1959 PWSTR Index,
1960 size_t Size,
1961 DWORD Flags
1962);
1963
1964#ifdef DBGHELP_TRANSLATE_TCHAR
1965#define SymSrvGetFileIndexString SymSrvGetFileIndexStringW
1966#endif
1967
1968WINBOOL WINAPI SymSrvGetFileIndexInfo(
1969 PCSTR File,
1970 PSYMSRV_INDEX_INFO Info,
1971 DWORD Flags
1972);
1973
1974WINBOOL WINAPI SymSrvGetFileIndexInfoW(
1975 PCWSTR File,
1976 PSYMSRV_INDEX_INFOW Info,
1977 DWORD Flags
1978);
1979
1980#ifdef DBGHELP_TRANSLATE_TCHAR
1981#define SymSrvGetFileIndexInfo SymSrvGetFileIndexInfoW
1982#endif
1983
1984WINBOOL WINAPI SymSrvGetFileIndexes(
1985 PCTSTR File,
1986 GUID *Id,
1987 DWORD *Val1,
1988 DWORD *Val2,
1989 DWORD Flags
1990);
1991
1992WINBOOL WINAPI SymSrvGetFileIndexesW(
1993 PCWSTR File,
1994 GUID *Id,
1995 DWORD *Val1,
1996 DWORD *Val2,
1997 DWORD Flags
1998);
1999
2000#ifdef DBGHELP_TRANSLATE_TCHAR
2001#define SymSrvGetFileIndexes SymSrvGetFileIndexesW
2002#endif
2003
2004PCSTR WINAPI SymSrvGetSupplement(
2005 HANDLE hProcess,
2006 PCSTR SymPath,
2007 PCSTR Node,
2008 PCSTR File
2009);
2010
2011PCWSTR WINAPI SymSrvGetSupplementW(
2012 HANDLE hProcess,
2013 PCWSTR SymPath,
2014 PCWSTR Node,
2015 PCWSTR File
2016);
2017
2018#ifdef DBGHELP_TRANSLATE_TCHAR
2019#define SymSrvGetSupplement SymSrvGetSupplementW
2020#endif
2021
2022WINBOOL WINAPI SymSrvIsStore(
2023 HANDLE hProcess,
2024 PCSTR path
2025);
2026
2027WINBOOL WINAPI SymSrvIsStoreW(
2028 HANDLE hProcess,
2029 PCWSTR path
2030);
2031
2032#ifdef DBGHELP_TRANSLATE_TCHAR
2033#define SymSrvIsStore SymSrvIsStoreW
2034#endif
2035
2036PCSTR WINAPI SymSrvStoreFile(
2037 HANDLE hProcess,
2038 PCSTR SrvPath,
2039 PCSTR File,
2040 DWORD Flags
2041);
2042
2043PCWSTR WINAPI SymSrvStoreFileW(
2044 HANDLE hProcess,
2045 PCWSTR SrvPath,
2046 PCWSTR File,
2047 DWORD Flags
2048);
2049
2050#define SYMSTOREOPT_COMPRESS 0x01
2051#define SYMSTOREOPT_OVERWRITE 0x02
2052#define SYMSTOREOPT_RETURNINDEX 0x04
2053#define SYMSTOREOPT_POINTER 0x08
2054#define SYMSTOREOPT_PASS_IF_EXISTS 0x40
2055
2056#ifdef DBGHELP_TRANSLATE_TCHAR
2057#define SymSrvStoreFile SymSrvStoreFileW
2058#endif
2059
2060PCSTR WINAPI SymSrvStoreSupplement(
2061 HANDLE hProcess,
2062 const PCTSTR SymPath,
2063 PCSTR Node,
2064 PCSTR File,
2065 DWORD Flags
2066);
2067
2068PCWSTR WINAPI SymSrvStoreSupplementW(
2069 HANDLE hProcess,
2070 const PCWSTR SymPath,
2071 PCWSTR Node,
2072 PCWSTR File,
2073 DWORD Flags
2074);
2075
2076#ifdef DBGHELP_TRANSLATE_TCHAR
2077#define SymSrvStoreSupplement SymSrvStoreSupplementW
2078#endif
2079
2080PCSTR WINAPI SymSrvDeltaName(
2081 HANDLE hProcess,
2082 PCSTR SymPath,
2083 PCSTR Type,
2084 PCSTR File1,
2085 PCSTR File2
2086);
2087
2088PCWSTR WINAPI SymSrvDeltaNameW(
2089 HANDLE hProcess,
2090 PCWSTR SymPath,
2091 PCWSTR Type,
2092 PCWSTR File1,
2093 PCWSTR File2
2094);
2095
2096#ifdef DBGHELP_TRANSLATE_TCHAR
2097#define SymSrvDeltaName SymSrvDeltaNameW
2098#endif
2099
2100#include <poppack.h>
2101
2102#ifdef __cplusplus
2103}
2104#endif
2105
Note: See TracBrowser for help on using the repository browser.