dinput: Test that upload, unacquire, acquire still permits updating uploaded effect.
[wine] / include / 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 #ifdef __cplusplus
25 extern "C" {
26 #endif /* defined(__cplusplus) */
27
28 #define IMAGEAPI WINAPI
29 #define DBHLPAPI IMAGEAPI
30
31 typedef struct _LOADED_IMAGE
32 {
33     PSTR                        ModuleName;
34     HANDLE                      hFile;
35     PUCHAR                      MappedAddress;
36     PIMAGE_NT_HEADERS           FileHeader;
37     PIMAGE_SECTION_HEADER       LastRvaSection;
38     ULONG                       NumberOfSections;
39     PIMAGE_SECTION_HEADER       Sections;
40     ULONG                       Characteristics;
41     BOOLEAN                     fSystemImage;
42     BOOLEAN                     fDOSImage;
43     BOOLEAN                     fReadOnly;
44     UCHAR                       Version;
45     LIST_ENTRY                  Links;
46     ULONG                       SizeOfImage;
47 } LOADED_IMAGE, *PLOADED_IMAGE;
48
49 /*************************
50  *    IMAGEHLP equiv     *
51  *************************/
52
53 typedef enum
54 {
55     AddrMode1616,
56     AddrMode1632,
57     AddrModeReal,
58     AddrModeFlat
59 } ADDRESS_MODE;
60
61 typedef struct _tagADDRESS
62 {
63     DWORD                       Offset;
64     WORD                        Segment;
65     ADDRESS_MODE                Mode;
66 } ADDRESS, *LPADDRESS;
67
68 typedef struct _tagADDRESS64
69 {
70     DWORD64                     Offset;
71     WORD                        Segment;
72     ADDRESS_MODE                Mode;
73 } ADDRESS64, *LPADDRESS64;
74
75 #define SYMF_OMAP_GENERATED   0x00000001
76 #define SYMF_OMAP_MODIFIED    0x00000002
77 #define SYMF_USER_GENERATED   0x00000004
78 #define SYMF_REGISTER         0x00000008
79 #define SYMF_REGREL           0x00000010
80 #define SYMF_FRAMEREL         0x00000020
81 #define SYMF_PARAMETER        0x00000040
82 #define SYMF_LOCAL            0x00000080
83 #define SYMF_CONSTANT         0x00000100
84 #define SYMF_EXPORT           0x00000200
85 #define SYMF_FORWARDER        0x00000400
86 #define SYMF_FUNCTION         0x00000800
87 #define SYMF_VIRTUAL          0x00001000
88 #define SYMF_THUNK            0x00002000
89 #define SYMF_TLSREL           0x00004000
90
91 typedef enum 
92 {
93     SymNone = 0,
94     SymCoff,
95     SymCv,
96     SymPdb,
97     SymExport,
98     SymDeferred,
99     SymSym,
100     SymDia,
101     SymVirtual,
102     NumSymTypes
103 } SYM_TYPE;
104
105 typedef struct _IMAGEHLP_SYMBOL
106 {
107     DWORD                       SizeOfStruct;
108     DWORD                       Address;
109     DWORD                       Size;
110     DWORD                       Flags;
111     DWORD                       MaxNameLength;
112     CHAR                        Name[1];
113 } IMAGEHLP_SYMBOL, *PIMAGEHLP_SYMBOL;
114
115 typedef struct _IMAGEHLP_SYMBOL64
116 {
117     DWORD                       SizeOfStruct;
118     DWORD64                     Address;
119     DWORD                       Size;
120     DWORD                       Flags;
121     DWORD                       MaxNameLength;
122     CHAR                        Name[1];
123 } IMAGEHLP_SYMBOL64, *PIMAGEHLP_SYMBOL64;
124
125 typedef struct _IMAGEHLP_SYMBOLW64
126 {
127     DWORD                       SizeOfStruct;
128     DWORD64                     Address;
129     DWORD                       Size;
130     DWORD                       Flags;
131     DWORD                       MaxNameLength;
132     WCHAR                       Name[1];
133 } IMAGEHLP_SYMBOLW64, *PIMAGEHLP_SYMBOLW64;
134
135 typedef struct _IMAGEHLP_MODULE
136 {
137     DWORD                       SizeOfStruct;
138     DWORD                       BaseOfImage;
139     DWORD                       ImageSize;
140     DWORD                       TimeDateStamp;
141     DWORD                       CheckSum;
142     DWORD                       NumSyms;
143     SYM_TYPE                    SymType;
144     CHAR                        ModuleName[32];
145     CHAR                        ImageName[256];
146     CHAR                        LoadedImageName[256];
147 } IMAGEHLP_MODULE, *PIMAGEHLP_MODULE;
148
149 typedef struct _IMAGEHLP_MODULEW
150 {
151     DWORD                       SizeOfStruct;
152     DWORD                       BaseOfImage;
153     DWORD                       ImageSize;
154     DWORD                       TimeDateStamp;
155     DWORD                       CheckSum;
156     DWORD                       NumSyms;
157     SYM_TYPE                    SymType;
158     WCHAR                       ModuleName[32];
159     WCHAR                       ImageName[256];
160     WCHAR                       LoadedImageName[256];
161 } IMAGEHLP_MODULEW, *PIMAGEHLP_MODULEW;
162
163 typedef struct _IMAGEHLP_MODULE64
164 {
165     DWORD                       SizeOfStruct;
166     DWORD64                     BaseOfImage;
167     DWORD                       ImageSize;
168     DWORD                       TimeDateStamp;
169     DWORD                       CheckSum;
170     DWORD                       NumSyms;
171     SYM_TYPE                    SymType;
172     CHAR                        ModuleName[32];
173     CHAR                        ImageName[256];
174     CHAR                        LoadedImageName[256];
175     CHAR                        LoadedPdbName[256];
176     DWORD                       CVSig;
177     CHAR                        CVData[MAX_PATH*3];
178     DWORD                       PdbSig;
179     GUID                        PdbSig70;
180     DWORD                       PdbAge;
181     BOOL                        PdbUnmatched;
182     BOOL                        DbgUnmatched;
183     BOOL                        LineNumbers;
184     BOOL                        GlobalSymbols;
185     BOOL                        TypeInfo;
186     BOOL                        SourceIndexed;
187     BOOL                        Publics;
188 } IMAGEHLP_MODULE64, *PIMAGEHLP_MODULE64;
189
190 typedef struct _IMAGEHLP_MODULEW64
191 {
192     DWORD                       SizeOfStruct;
193     DWORD64                     BaseOfImage;
194     DWORD                       ImageSize;
195     DWORD                       TimeDateStamp;
196     DWORD                       CheckSum;
197     DWORD                       NumSyms;
198     SYM_TYPE                    SymType;
199     WCHAR                       ModuleName[32];
200     WCHAR                       ImageName[256];
201     WCHAR                       LoadedImageName[256];
202     WCHAR                       LoadedPdbName[256];
203     DWORD                       CVSig;
204     WCHAR                       CVData[MAX_PATH*3];
205     DWORD                       PdbSig;
206     GUID                        PdbSig70;
207     DWORD                       PdbAge;
208     BOOL                        PdbUnmatched;
209     BOOL                        DbgUnmatched;
210     BOOL                        LineNumbers;
211     BOOL                        GlobalSymbols;
212     BOOL                        TypeInfo;
213     BOOL                        SourceIndexed;
214     BOOL                        Publics;
215 } IMAGEHLP_MODULEW64, *PIMAGEHLP_MODULEW64;
216
217 typedef struct _IMAGEHLP_LINE
218 {
219     DWORD                       SizeOfStruct;
220     PVOID                       Key;
221     DWORD                       LineNumber;
222     PCHAR                       FileName;
223     DWORD                       Address;
224 } IMAGEHLP_LINE, *PIMAGEHLP_LINE;
225
226 typedef struct _IMAGEHLP_LINEW
227 {
228     DWORD                       SizeOfStruct;
229     PVOID                       Key;
230     DWORD                       LineNumber;
231     PWSTR                       FileName;
232     DWORD                       Address;
233 } IMAGEHLP_LINEW, *PIMAGEHLP_LINEW;
234
235 typedef struct _IMAGEHLP_LINE64
236 {
237     DWORD                       SizeOfStruct;
238     PVOID                       Key;
239     DWORD                       LineNumber;
240     PCHAR                       FileName;
241     DWORD64                     Address;
242 } IMAGEHLP_LINE64, *PIMAGEHLP_LINE64;
243
244 typedef struct _IMAGEHLP_LINEW64
245 {
246     DWORD                       SizeOfStruct;
247     PVOID                       Key;
248     DWORD                       LineNumber;
249     PWSTR                       FileName;
250     DWORD64                     Address;
251 } IMAGEHLP_LINEW64, *PIMAGEHLP_LINEW64;
252
253 typedef struct _SOURCEFILE
254 {
255     DWORD64                     ModBase;
256     PCHAR                       FileName;
257 } SOURCEFILE, *PSOURCEFILE;
258
259 typedef struct _SOURCEFILEW
260 {
261     DWORD64                     ModBase;
262     PWSTR                       FileName;
263 } SOURCEFILEW, *PSOURCEFILEW;
264
265 #define CBA_DEFERRED_SYMBOL_LOAD_START          0x00000001
266 #define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE       0x00000002
267 #define CBA_DEFERRED_SYMBOL_LOAD_FAILURE        0x00000003
268 #define CBA_SYMBOLS_UNLOADED                    0x00000004
269 #define CBA_DUPLICATE_SYMBOL                    0x00000005
270 #define CBA_READ_MEMORY                         0x00000006
271 #define CBA_DEFERRED_SYMBOL_LOAD_CANCEL         0x00000007
272 #define CBA_SET_OPTIONS                         0x00000008
273 #define CBA_EVENT                               0x00000010
274 #define CBA_DEFERRED_SYMBOL_LOAD_PARTIAL        0x00000020
275 #define CBA_DEBUG_INFO                          0x10000000
276
277 typedef struct _IMAGEHLP_CBA_READ_MEMORY
278 {
279     DWORD64   addr;
280     PVOID     buf;
281     DWORD     bytes;
282     DWORD    *bytesread;
283 } IMAGEHLP_CBA_READ_MEMORY, *PIMAGEHLP_CBA_READ_MEMORY;
284
285 enum
286 {
287     sevInfo = 0,
288     sevProblem,
289     sevAttn,
290     sevFatal,
291     sevMax
292 };
293
294 #define EVENT_SRCSPEW_START 100
295 #define EVENT_SRCSPEW       100
296 #define EVENT_SRCSPEW_END   199
297
298 typedef struct _IMAGEHLP_CBA_EVENT
299 {
300     DWORD       severity;
301     DWORD       code;
302     PCHAR       desc;
303     PVOID       object;
304 } IMAGEHLP_CBA_EVENT, *PIMAGEHLP_CBA_EVENT;
305
306 typedef struct _IMAGEHLP_CBA_EVENTW
307 {
308     DWORD       severity;
309     DWORD       code;
310     PCWSTR      desc;
311     PVOID       object;
312 } IMAGEHLP_CBA_EVENTW, *PIMAGEHLP_CBA_EVENTW;
313
314 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD
315 {
316     DWORD                       SizeOfStruct;
317     DWORD                       BaseOfImage;
318     DWORD                       CheckSum;
319     DWORD                       TimeDateStamp;
320     CHAR                        FileName[MAX_PATH];
321     BOOLEAN                     Reparse;
322     HANDLE                      hFile;
323 } IMAGEHLP_DEFERRED_SYMBOL_LOAD, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
324
325 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD64
326 {
327     DWORD                       SizeOfStruct;
328     DWORD64                     BaseOfImage;
329     DWORD                       CheckSum;
330     DWORD                       TimeDateStamp;
331     CHAR                        FileName[MAX_PATH];
332     BOOLEAN                     Reparse;
333     HANDLE                      hFile;
334     DWORD                       Flags;
335 } IMAGEHLP_DEFERRED_SYMBOL_LOAD64, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD64;
336
337 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOADW64
338 {
339     DWORD                       SizeOfStruct;
340     DWORD64                     BaseOfImage;
341     DWORD                       CheckSum;
342     DWORD                       TimeDateStamp;
343     WCHAR                       FileName[MAX_PATH + 1];
344     BOOLEAN                     Reparse;
345     HANDLE                      hFile;
346     DWORD                       Flags;
347 } IMAGEHLP_DEFERRED_SYMBOL_LOADW64, *PIMAGEHLP_DEFERRED_SYMBOL_LOADW64;
348
349 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL
350 {
351     DWORD                       SizeOfStruct;
352     DWORD                       NumberOfDups;
353     PIMAGEHLP_SYMBOL            Symbol;
354     DWORD                       SelectedSymbol;
355 } IMAGEHLP_DUPLICATE_SYMBOL, *PIMAGEHLP_DUPLICATE_SYMBOL;
356
357 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL64
358 {
359     DWORD                       SizeOfStruct;
360     DWORD                       NumberOfDups;
361     PIMAGEHLP_SYMBOL64          Symbol;
362     DWORD                       SelectedSymbol;
363 } IMAGEHLP_DUPLICATE_SYMBOL64, *PIMAGEHLP_DUPLICATE_SYMBOL64;
364
365 #define SYMOPT_CASE_INSENSITIVE         0x00000001
366 #define SYMOPT_UNDNAME                  0x00000002
367 #define SYMOPT_DEFERRED_LOADS           0x00000004
368 #define SYMOPT_NO_CPP                   0x00000008
369 #define SYMOPT_LOAD_LINES               0x00000010
370 #define SYMOPT_OMAP_FIND_NEAREST        0x00000020
371 #define SYMOPT_LOAD_ANYTHING            0x00000040
372 #define SYMOPT_IGNORE_CVREC             0x00000080
373 #define SYMOPT_NO_UNQUALIFIED_LOADS     0x00000100
374 #define SYMOPT_FAIL_CRITICAL_ERRORS     0x00000200
375 #define SYMOPT_EXACT_SYMBOLS            0x00000400
376 #define SYMOPT_WILD_UNDERSCORE          0x00000800
377 #define SYMOPT_USE_DEFAULTS             0x00001000
378 /* latest SDK defines:
379 #define SYMOPT_ALLOW_ABSOLUTE_SYMBOLS   0x00000800
380 #define SYMOPT_IGNORE_NT_SYMPATH        0x00001000
381 */
382 #define SYMOPT_INCLUDE_32BIT_MODULES    0x00002000
383 #define SYMOPT_PUBLICS_ONLY             0x00004000
384 #define SYMOPT_NO_PUBLICS               0x00008000
385 #define SYMOPT_AUTO_PUBLICS             0x00010000
386 #define SYMOPT_NO_IMAGE_SEARCH          0x00020000
387 #define SYMOPT_SECURE                   0x00040000
388 #define SYMOPT_NO_PROMPTS               0x00080000
389 #define SYMOPT_OVERWRITE                0x00100000
390 #define SYMOPT_IGNORE_IMAGEDIR          0x00200000
391
392 #define SYMOPT_DEBUG                    0x80000000
393
394 typedef struct _IMAGEHLP_STACK_FRAME
395 {
396     ULONG64     InstructionOffset;
397     ULONG64     ReturnOffset;
398     ULONG64     FrameOffset;
399     ULONG64     StackOffset;
400     ULONG64     BackingStoreOffset;
401     ULONG64     FuncTableEntry;
402     ULONG64     Params[4];
403     ULONG64     Reserved[5];
404     BOOL        Virtual;
405     ULONG       Reserved2;
406 } IMAGEHLP_STACK_FRAME, *PIMAGEHLP_STACK_FRAME;
407
408 typedef VOID IMAGEHLP_CONTEXT, *PIMAGEHLP_CONTEXT;
409
410 #define DBHHEADER_DEBUGDIRS     0x1
411 typedef struct _DBGHELP_MODLOAD_DATA
412 {
413     DWORD               ssize;
414     DWORD               ssig;
415     PVOID               data;
416     DWORD               size;
417     DWORD               flags;
418 } MODLOAD_DATA, *PMODLOAD_DATA;
419
420 /*************************
421  *       MiniDUMP        *
422  *************************/
423
424 #include <pshpack4.h>
425 /* DebugHelp */
426
427 #define MINIDUMP_SIGNATURE 0x504D444D /* 'MDMP' */
428 #define MINIDUMP_VERSION   (42899)
429
430 typedef DWORD   RVA;
431 typedef ULONG64 RVA64;
432
433 typedef enum _MINIDUMP_TYPE 
434 {
435     MiniDumpNormal                              = 0x0000,
436     MiniDumpWithDataSegs                        = 0x0001,
437     MiniDumpWithFullMemory                      = 0x0002,
438     MiniDumpWithHandleData                      = 0x0004,
439     MiniDumpFilterMemory                        = 0x0008,
440     MiniDumpScanMemory                          = 0x0010,
441     MiniDumpWithUnloadedModules                 = 0x0020,
442     MiniDumpWithIndirectlyReferencedMemory      = 0x0040,
443     MiniDumpFilterModulePaths                   = 0x0080,
444     MiniDumpWithProcessThreadData               = 0x0100,
445     MiniDumpWithPrivateReadWriteMemory          = 0x0200,
446     MiniDumpWithoutOptionalData                 = 0x0400,
447     MiniDumpWithFullMemoryInfo                  = 0x0800,
448     MiniDumpWithThreadInfo                      = 0x1000,
449     MiniDumpWithCodeSegs                        = 0x2000
450 } MINIDUMP_TYPE;
451
452 typedef enum _MINIDUMP_CALLBACK_TYPE
453 {
454     ModuleCallback,
455     ThreadCallback,
456     ThreadExCallback,
457     IncludeThreadCallback,
458     IncludeModuleCallback,
459     MemoryCallback,
460 } MINIDUMP_CALLBACK_TYPE;
461
462 typedef struct _MINIDUMP_THREAD_CALLBACK
463 {
464     ULONG                       ThreadId;
465     HANDLE                      ThreadHandle;
466     CONTEXT                     Context;
467     ULONG                       SizeOfContext;
468     ULONG64                     StackBase;
469     ULONG64                     StackEnd;
470 } MINIDUMP_THREAD_CALLBACK, *PMINIDUMP_THREAD_CALLBACK;
471
472 typedef struct _MINIDUMP_THREAD_EX_CALLBACK 
473 {
474     ULONG                       ThreadId;
475     HANDLE                      ThreadHandle;
476     CONTEXT                     Context;
477     ULONG                       SizeOfContext;
478     ULONG64                     StackBase;
479     ULONG64                     StackEnd;
480     ULONG64                     BackingStoreBase;
481     ULONG64                     BackingStoreEnd;
482 } MINIDUMP_THREAD_EX_CALLBACK, *PMINIDUMP_THREAD_EX_CALLBACK;
483
484 typedef struct _MINIDUMP_INCLUDE_THREAD_CALLBACK
485 {
486     ULONG ThreadId;
487 } MINIDUMP_INCLUDE_THREAD_CALLBACK, *PMINIDUMP_INCLUDE_THREAD_CALLBACK;
488
489 typedef enum _THREAD_WRITE_FLAGS 
490 {
491     ThreadWriteThread            = 0x0001,
492     ThreadWriteStack             = 0x0002,
493     ThreadWriteContext           = 0x0004,
494     ThreadWriteBackingStore      = 0x0008,
495     ThreadWriteInstructionWindow = 0x0010,
496     ThreadWriteThreadData        = 0x0020,
497     ThreadWriteThreadInfo        = 0x0040
498 } THREAD_WRITE_FLAGS;
499
500 typedef struct _MINIDUMP_MODULE_CALLBACK 
501 {
502     PWCHAR                      FullPath;
503     ULONG64                     BaseOfImage;
504     ULONG                       SizeOfImage;
505     ULONG                       CheckSum;
506     ULONG                       TimeDateStamp;
507     VS_FIXEDFILEINFO            VersionInfo;
508     PVOID                       CvRecord;
509     ULONG                       SizeOfCvRecord;
510     PVOID                       MiscRecord;
511     ULONG                       SizeOfMiscRecord;
512 } MINIDUMP_MODULE_CALLBACK, *PMINIDUMP_MODULE_CALLBACK;
513
514 typedef struct _MINIDUMP_INCLUDE_MODULE_CALLBACK 
515 {
516     ULONG64 BaseOfImage;
517 } MINIDUMP_INCLUDE_MODULE_CALLBACK, *PMINIDUMP_INCLUDE_MODULE_CALLBACK;
518
519 typedef enum _MODULE_WRITE_FLAGS 
520 {
521     ModuleWriteModule        = 0x0001,
522     ModuleWriteDataSeg       = 0x0002,
523     ModuleWriteMiscRecord    = 0x0004,
524     ModuleWriteCvRecord      = 0x0008,
525     ModuleReferencedByMemory = 0x0010,
526     ModuleWriteTlsData       = 0x0020,
527     ModuleWriteCodeSegs      = 0x0040,
528 } MODULE_WRITE_FLAGS;
529
530 typedef struct _MINIDUMP_CALLBACK_INPUT 
531 {
532     ULONG                       ProcessId;
533     HANDLE                      ProcessHandle;
534     ULONG                       CallbackType;
535     union 
536     {
537         MINIDUMP_THREAD_CALLBACK        Thread;
538         MINIDUMP_THREAD_EX_CALLBACK     ThreadEx;
539         MINIDUMP_MODULE_CALLBACK        Module;
540         MINIDUMP_INCLUDE_THREAD_CALLBACK IncludeThread;
541         MINIDUMP_INCLUDE_MODULE_CALLBACK IncludeModule;
542     } DUMMYUNIONNAME;
543 } MINIDUMP_CALLBACK_INPUT, *PMINIDUMP_CALLBACK_INPUT;
544
545 typedef struct _MINIDUMP_CALLBACK_OUTPUT
546 {
547     union 
548     {
549         ULONG                           ModuleWriteFlags;
550         ULONG                           ThreadWriteFlags;
551         struct
552         {
553             ULONG64                     MemoryBase;
554             ULONG                       MemorySize;
555         } DUMMYSTRUCTNAME;
556     } DUMMYUNIONNAME;
557 } MINIDUMP_CALLBACK_OUTPUT, *PMINIDUMP_CALLBACK_OUTPUT;
558
559 typedef BOOL (WINAPI* MINIDUMP_CALLBACK_ROUTINE)(PVOID, const PMINIDUMP_CALLBACK_INPUT, PMINIDUMP_CALLBACK_OUTPUT);
560
561 typedef struct _MINIDUMP_CALLBACK_INFORMATION 
562 {
563     MINIDUMP_CALLBACK_ROUTINE   CallbackRoutine;
564     void*                       CallbackParam;
565 } MINIDUMP_CALLBACK_INFORMATION, *PMINIDUMP_CALLBACK_INFORMATION;
566
567 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR 
568 {
569     ULONG                       DataSize;
570     RVA                         Rva;
571 } MINIDUMP_LOCATION_DESCRIPTOR;
572
573 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR64 
574 {
575     ULONG64                     DataSize;
576     RVA64                       Rva;
577 } MINIDUMP_LOCATION_DESCRIPTOR64;
578
579 typedef struct _MINIDUMP_DIRECTORY 
580 {
581     ULONG                       StreamType;
582     MINIDUMP_LOCATION_DESCRIPTOR Location;
583 } MINIDUMP_DIRECTORY, *PMINIDUMP_DIRECTORY;
584
585 typedef struct _MINIDUMP_EXCEPTION
586 {
587     ULONG                       ExceptionCode;
588     ULONG                       ExceptionFlags;
589     ULONG64                     ExceptionRecord;
590     ULONG64                     ExceptionAddress;
591     ULONG                       NumberParameters;
592     ULONG                        __unusedAlignment;
593     ULONG64                     ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
594 } MINIDUMP_EXCEPTION, *PMINIDUMP_EXCEPTION;
595
596 typedef struct _MINIDUMP_EXCEPTION_INFORMATION
597 {
598     DWORD                       ThreadId;
599     PEXCEPTION_POINTERS         ExceptionPointers;
600     BOOL                        ClientPointers;
601 } MINIDUMP_EXCEPTION_INFORMATION, *PMINIDUMP_EXCEPTION_INFORMATION;
602
603 typedef struct MINIDUMP_EXCEPTION_STREAM 
604 {
605     ULONG                       ThreadId;
606     ULONG                       __alignment;
607     MINIDUMP_EXCEPTION          ExceptionRecord;
608     MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
609 } MINIDUMP_EXCEPTION_STREAM, *PMINIDUMP_EXCEPTION_STREAM;
610
611 typedef struct _MINIDUMP_HEADER 
612 {
613     DWORD                       Signature;
614     DWORD                       Version;
615     DWORD                       NumberOfStreams;
616     RVA                         StreamDirectoryRva;
617     DWORD                       CheckSum;
618     union 
619     {
620         DWORD                           Reserved;
621         DWORD                           TimeDateStamp;
622     } DUMMYUNIONNAME;
623     ULONG64                     Flags;
624 } MINIDUMP_HEADER, *PMINIDUMP_HEADER;
625
626 typedef struct _MINIDUMP_MEMORY_DESCRIPTOR 
627 {
628     ULONG64                     StartOfMemoryRange;
629     MINIDUMP_LOCATION_DESCRIPTOR Memory;
630 } MINIDUMP_MEMORY_DESCRIPTOR, *PMINIDUMP_MEMORY_DESCRIPTOR;
631
632 typedef struct _MINIDUMP_MEMORY_LIST
633 {
634     ULONG                       NumberOfMemoryRanges;
635     MINIDUMP_MEMORY_DESCRIPTOR  MemoryRanges[1]; /* FIXME: 0-sized array not supported */
636 } MINIDUMP_MEMORY_LIST, *PMINIDUMP_MEMORY_LIST;
637
638 #define MINIDUMP_MISC1_PROCESS_ID       0x00000001
639 #define MINIDUMP_MISC1_PROCESS_TIMES    0x00000002
640
641 typedef struct _MINIDUMP_MISC_INFO
642 {
643     ULONG                       SizeOfInfo;
644     ULONG                       Flags1;
645     ULONG                       ProcessId;
646     ULONG                       ProcessCreateTime;
647     ULONG                       ProcessUserTime;
648     ULONG                       ProcessKernelTime;
649 } MINIDUMP_MISC_INFO, *PMINIDUMP_MISC_INFO;
650
651 typedef struct _MINIDUMP_MODULE
652 {
653     ULONG64                     BaseOfImage;
654     ULONG                       SizeOfImage;
655     ULONG                       CheckSum;
656     ULONG                       TimeDateStamp;
657     RVA                         ModuleNameRva;
658     VS_FIXEDFILEINFO            VersionInfo;
659     MINIDUMP_LOCATION_DESCRIPTOR CvRecord;
660     MINIDUMP_LOCATION_DESCRIPTOR MiscRecord;
661     ULONG64                     Reserved0;
662     ULONG64                     Reserved1;
663 } MINIDUMP_MODULE, *PMINIDUMP_MODULE;
664
665 typedef struct _MINIDUMP_MODULE_LIST 
666 {
667     ULONG                       NumberOfModules;
668     MINIDUMP_MODULE             Modules[1]; /* FIXME: 0-sized array not supported */
669 } MINIDUMP_MODULE_LIST, *PMINIDUMP_MODULE_LIST;
670
671 typedef struct _MINIDUMP_STRING
672 {
673     ULONG                       Length;
674     WCHAR                       Buffer[1]; /* FIXME: O-sized array not supported */
675 } MINIDUMP_STRING, *PMINIDUMP_STRING;
676
677 typedef struct _MINIDUMP_SYSTEM_INFO
678 {
679     USHORT                      ProcessorArchitecture;
680     USHORT                      ProcessorLevel;
681     USHORT                      ProcessorRevision;
682     union
683     {
684         USHORT                          Reserved0;
685         struct
686         {
687             UCHAR                       NumberOfProcessors;
688             UCHAR                       ProductType;
689         } DUMMYSTRUCTNAME;
690     } DUMMYUNIONNAME;
691
692     ULONG                       MajorVersion;
693     ULONG                       MinorVersion;
694     ULONG                       BuildNumber;
695     ULONG                       PlatformId;
696
697     RVA                         CSDVersionRva;
698     union
699     {
700         ULONG                           Reserved1;
701         struct
702         {
703             USHORT                      SuiteMask;
704             USHORT                      Reserved2;
705         } DUMMYSTRUCTNAME;
706     } DUMMYUNIONNAME1;
707     union _CPU_INFORMATION 
708     {
709         struct 
710         {
711             ULONG                       VendorId[3];
712             ULONG                       VersionInformation;
713             ULONG                       FeatureInformation;
714             ULONG                       AMDExtendedCpuFeatures;
715         } X86CpuInfo;
716         struct 
717         {
718             ULONG64                     ProcessorFeatures[2];
719         } OtherCpuInfo;
720     } Cpu;
721
722 } MINIDUMP_SYSTEM_INFO, *PMINIDUMP_SYSTEM_INFO;
723
724 typedef struct _MINIDUMP_THREAD
725 {
726     ULONG                       ThreadId;
727     ULONG                       SuspendCount;
728     ULONG                       PriorityClass;
729     ULONG                       Priority;
730     ULONG64                     Teb;
731     MINIDUMP_MEMORY_DESCRIPTOR  Stack;
732     MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
733 } MINIDUMP_THREAD, *PMINIDUMP_THREAD;
734
735 typedef struct _MINIDUMP_THREAD_LIST
736 {
737     ULONG                       NumberOfThreads;
738     MINIDUMP_THREAD             Threads[1]; /* FIXME: no support of 0 sized array */
739 } MINIDUMP_THREAD_LIST, *PMINIDUMP_THREAD_LIST;
740
741 typedef struct _MINIDUMP_USER_STREAM
742 {
743     ULONG                       Type;
744     ULONG                       BufferSize;
745     void*                       Buffer;
746 } MINIDUMP_USER_STREAM, *PMINIDUMP_USER_STREAM;
747
748 typedef struct _MINIDUMP_USER_STREAM_INFORMATION
749 {
750     ULONG                       UserStreamCount;
751     PMINIDUMP_USER_STREAM       UserStreamArray;
752 } MINIDUMP_USER_STREAM_INFORMATION, *PMINIDUMP_USER_STREAM_INFORMATION;
753
754 typedef enum _MINIDUMP_STREAM_TYPE
755 {
756     UnusedStream                = 0,
757     ReservedStream0             = 1,
758     ReservedStream1             = 2,
759     ThreadListStream            = 3,
760     ModuleListStream            = 4,
761     MemoryListStream            = 5,
762     ExceptionStream             = 6,
763     SystemInfoStream            = 7,
764     ThreadExListStream          = 8,
765     Memory64ListStream          = 9,
766     CommentStreamA              = 10,
767     CommentStreamW              = 11,
768     HandleDataStream            = 12,
769     FunctionTableStream         = 13,
770     UnloadedModuleListStream    = 14,
771     MiscInfoStream              = 15,
772     MemoryInfoListStream        = 16,
773     ThreadInfoListStream        = 17,
774
775     LastReservedStream          = 0xffff
776 } MINIDUMP_STREAM_TYPE;
777
778 BOOL WINAPI MiniDumpWriteDump(HANDLE, DWORD, HANDLE, MINIDUMP_TYPE,
779                               const PMINIDUMP_EXCEPTION_INFORMATION,
780                               const PMINIDUMP_USER_STREAM_INFORMATION,
781                               const PMINIDUMP_CALLBACK_INFORMATION);
782 BOOL WINAPI MiniDumpReadDumpStream(PVOID, ULONG, PMINIDUMP_DIRECTORY*, PVOID*,
783                                    ULONG*);
784
785 #include <poppack.h>
786
787 /*************************
788  *    MODULE handling    *
789  *************************/
790
791 /* flags for SymLoadModuleEx */
792 #define SLMFLAG_VIRTUAL         0x1
793 #define SLMFLAG_NO_SYMBOLS      0x4
794
795 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(PCSTR, ULONG, ULONG, PVOID);
796 BOOL   WINAPI EnumerateLoadedModules(HANDLE, PENUMLOADED_MODULES_CALLBACK, PVOID);
797 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK64)(PCSTR, DWORD64, ULONG, PVOID);
798 BOOL   WINAPI EnumerateLoadedModules64(HANDLE, PENUMLOADED_MODULES_CALLBACK64, PVOID);
799 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACKW64)(PCWSTR, DWORD64, ULONG, PVOID);
800 BOOL   WINAPI EnumerateLoadedModulesW64(HANDLE, PENUMLOADED_MODULES_CALLBACKW64, PVOID);
801 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PCSTR, ULONG, PVOID);
802 BOOL    WINAPI SymEnumerateModules(HANDLE, PSYM_ENUMMODULES_CALLBACK, PVOID);
803 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(PCSTR, DWORD64, PVOID);
804 BOOL    WINAPI SymEnumerateModules64(HANDLE, PSYM_ENUMMODULES_CALLBACK64, PVOID);
805 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACKW64)(PCWSTR, DWORD64, PVOID);
806 BOOL    WINAPI SymEnumerateModulesW64(HANDLE, PSYM_ENUMMODULES_CALLBACKW64, PVOID);
807 BOOL    WINAPI SymGetModuleInfo(HANDLE, DWORD, PIMAGEHLP_MODULE);
808 BOOL    WINAPI SymGetModuleInfoW(HANDLE, DWORD, PIMAGEHLP_MODULEW);
809 BOOL    WINAPI SymGetModuleInfo64(HANDLE, DWORD64, PIMAGEHLP_MODULE64);
810 BOOL    WINAPI SymGetModuleInfoW64(HANDLE, DWORD64, PIMAGEHLP_MODULEW64);
811 DWORD   WINAPI SymGetModuleBase(HANDLE, DWORD);
812 DWORD64 WINAPI SymGetModuleBase64(HANDLE, DWORD64);
813 DWORD   WINAPI SymLoadModule(HANDLE, HANDLE, PCSTR, PCSTR, DWORD, DWORD);
814 DWORD64 WINAPI SymLoadModule64(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD);
815 DWORD64 WINAPI SymLoadModuleEx(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD,
816                                PMODLOAD_DATA, DWORD);
817 DWORD64 WINAPI SymLoadModuleExW(HANDLE, HANDLE, PCWSTR, PCWSTR, DWORD64, DWORD,
818                                 PMODLOAD_DATA, DWORD);
819 BOOL    WINAPI SymUnloadModule(HANDLE, DWORD);
820 BOOL    WINAPI SymUnloadModule64(HANDLE, DWORD64);
821
822 /*************************
823  *    Symbol Handling    *
824  *************************/
825
826 #define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT          1
827 #define IMAGEHLP_SYMBOL_INFO_REGISTER              SYMF_REGISTER        /*  0x08 */
828 #define IMAGEHLP_SYMBOL_INFO_REGRELATIVE           SYMF_REGREL          /*  0x10 */
829 #define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE         SYMF_FRAMEREL        /*  0x20 */
830 #define IMAGEHLP_SYMBOL_INFO_PARAMETER             SYMF_PARAMETER       /*  0x40 */
831 #define IMAGEHLP_SYMBOL_INFO_LOCAL                 SYMF_LOCAL           /*  0x80 */
832 #define IMAGEHLP_SYMBOL_INFO_CONSTANT              SYMF_CONSTANT        /* 0x100 */
833 #define IMAGEHLP_SYMBOL_FUNCTION                   SYMF_FUNCTION        /* 0x800 */
834
835 #define SYMFLAG_VALUEPRESENT     0x00000001
836 #define SYMFLAG_REGISTER         0x00000008
837 #define SYMFLAG_REGREL           0x00000010
838 #define SYMFLAG_FRAMEREL         0x00000020
839 #define SYMFLAG_PARAMETER        0x00000040
840 #define SYMFLAG_LOCAL            0x00000080
841 #define SYMFLAG_CONSTANT         0x00000100
842 #define SYMFLAG_EXPORT           0x00000200
843 #define SYMFLAG_FORWARDER        0x00000400
844 #define SYMFLAG_FUNCTION         0x00000800
845 #define SYMFLAG_VIRTUAL          0x00001000
846 #define SYMFLAG_THUNK            0x00002000
847 #define SYMFLAG_TLSREL           0x00004000
848 #define SYMFLAG_SLOT             0x00008000
849
850 #define MAX_SYM_NAME    2000
851
852 typedef struct _SYMBOL_INFO
853 {
854     ULONG       SizeOfStruct;
855     ULONG       TypeIndex;
856     ULONG64     Reserved[2];
857     ULONG       info;   /* sdk states info, while MSDN says it's Index... */
858     ULONG       Size;
859     ULONG64     ModBase;
860     ULONG       Flags;
861     ULONG64     Value;
862     ULONG64     Address;
863     ULONG       Register;
864     ULONG       Scope;
865     ULONG       Tag;
866     ULONG       NameLen;
867     ULONG       MaxNameLen;
868     CHAR        Name[1];
869 } SYMBOL_INFO, *PSYMBOL_INFO;
870
871 typedef struct _SYMBOL_INFOW
872 {
873     ULONG       SizeOfStruct;
874     ULONG       TypeIndex;
875     ULONG64     Reserved[2];
876     ULONG       Index;
877     ULONG       Size;
878     ULONG64     ModBase;
879     ULONG       Flags;
880     ULONG64     Value;
881     ULONG64     Address;
882     ULONG       Register;
883     ULONG       Scope;
884     ULONG       Tag;
885     ULONG       NameLen;
886     ULONG       MaxNameLen;
887     WCHAR       Name[1];
888 } SYMBOL_INFOW, *PSYMBOL_INFOW;
889
890 typedef struct _SYMBOL_INFO_PACKAGE
891 {
892     SYMBOL_INFO si;
893     CHAR        name[MAX_SYM_NAME+1];
894 } SYMBOL_INFO_PACKAGE, *PSYMBOL_INFO_PACKAGE;
895
896 typedef struct _SYMBOL_INFO_PACKAGEW
897 {
898     SYMBOL_INFOW si;
899     WCHAR        name[MAX_SYM_NAME+1];
900 } SYMBOL_INFO_PACKAGEW, *PSYMBOL_INFO_PACKAGEW;
901
902 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO 
903 {
904     TI_GET_SYMTAG,
905     TI_GET_SYMNAME,
906     TI_GET_LENGTH,
907     TI_GET_TYPE,
908     TI_GET_TYPEID,
909     TI_GET_BASETYPE,
910     TI_GET_ARRAYINDEXTYPEID,
911     TI_FINDCHILDREN,
912     TI_GET_DATAKIND,
913     TI_GET_ADDRESSOFFSET,
914     TI_GET_OFFSET,
915     TI_GET_VALUE,
916     TI_GET_COUNT,
917     TI_GET_CHILDRENCOUNT,
918     TI_GET_BITPOSITION,
919     TI_GET_VIRTUALBASECLASS,
920     TI_GET_VIRTUALTABLESHAPEID,
921     TI_GET_VIRTUALBASEPOINTEROFFSET,
922     TI_GET_CLASSPARENTID,
923     TI_GET_NESTED,
924     TI_GET_SYMINDEX,
925     TI_GET_LEXICALPARENT,
926     TI_GET_ADDRESS,
927     TI_GET_THISADJUST,
928     TI_GET_UDTKIND,
929     TI_IS_EQUIV_TO,
930     TI_GET_CALLING_CONVENTION,
931 } IMAGEHLP_SYMBOL_TYPE_INFO;
932
933 #define IMAGEHLP_GET_TYPE_INFO_UNCACHED            0x00000001
934 #define IMAGEHLP_GET_TYPE_INFO_CHILDREN            0x00000002
935 typedef struct _IMAGEHLP_GET_TYPE_INFO_PARAMS
936 {
937     ULONG       SizeOfStruct;
938     ULONG       Flags;
939     ULONG       NumIds;
940     PULONG      TypeIds;
941     ULONG64     TagFilter;
942     ULONG       NumReqs;
943     IMAGEHLP_SYMBOL_TYPE_INFO* ReqKinds;
944     PULONG_PTR  ReqOffsets;
945     PULONG      ReqSizes;
946     ULONG_PTR   ReqStride;
947     ULONG_PTR   BufferSize;
948     PVOID       Buffer;
949     ULONG       EntriesMatched;
950     ULONG       EntriesFilled;
951     ULONG64     TagsFound;
952     ULONG64     AllReqsValid;
953     ULONG       NumReqsValid;
954     PULONG64    ReqsValid;
955 } IMAGEHLP_GET_TYPE_INFO_PARAMS, *PIMAGEHLP_GET_TYPE_INFO_PARAMS;
956
957 typedef struct _TI_FINDCHILDREN_PARAMS 
958 {
959     ULONG Count;
960     ULONG Start;
961     ULONG ChildId[1];
962 } TI_FINDCHILDREN_PARAMS;
963
964 #define UNDNAME_COMPLETE                 (0x0000)
965 #define UNDNAME_NO_LEADING_UNDERSCORES   (0x0001)
966 #define UNDNAME_NO_MS_KEYWORDS           (0x0002)
967 #define UNDNAME_NO_FUNCTION_RETURNS      (0x0004)
968 #define UNDNAME_NO_ALLOCATION_MODEL      (0x0008)
969 #define UNDNAME_NO_ALLOCATION_LANGUAGE   (0x0010)
970 #define UNDNAME_NO_MS_THISTYPE           (0x0020)
971 #define UNDNAME_NO_CV_THISTYPE           (0x0040)
972 #define UNDNAME_NO_THISTYPE              (0x0060)
973 #define UNDNAME_NO_ACCESS_SPECIFIERS     (0x0080)
974 #define UNDNAME_NO_THROW_SIGNATURES      (0x0100)
975 #define UNDNAME_NO_MEMBER_TYPE           (0x0200)
976 #define UNDNAME_NO_RETURN_UDT_MODEL      (0x0400)
977 #define UNDNAME_32_BIT_DECODE            (0x0800)
978 #define UNDNAME_NAME_ONLY                (0x1000)
979 #define UNDNAME_NO_ARGUMENTS             (0x2000)
980 #define UNDNAME_NO_SPECIAL_SYMS          (0x4000)
981
982 #define SYMSEARCH_MASKOBJS              0x01
983 #define SYMSEARCH_RECURSE               0x02
984 #define SYMSEARCH_GLOBALSONLY           0x04
985
986 BOOL WINAPI SymGetTypeInfo(HANDLE, DWORD64, ULONG, IMAGEHLP_SYMBOL_TYPE_INFO, PVOID);
987 BOOL WINAPI SymGetTypeInfoEx(HANDLE, DWORD64, PIMAGEHLP_GET_TYPE_INFO_PARAMS);
988 typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(PSYMBOL_INFO, ULONG, PVOID);
989 typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACKW)(PSYMBOL_INFOW, ULONG, PVOID);
990 BOOL WINAPI SymEnumTypes(HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID);
991 BOOL WINAPI SymEnumTypesW(HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID);
992 BOOL WINAPI SymFromAddr(HANDLE, DWORD64, DWORD64*, SYMBOL_INFO*);
993 BOOL WINAPI SymFromAddrW(HANDLE, DWORD64, DWORD64*, SYMBOL_INFOW*);
994 BOOL WINAPI SymFromToken(HANDLE, DWORD64, DWORD, PSYMBOL_INFO);
995 BOOL WINAPI SymFromTokenW(HANDLE, DWORD64, DWORD, PSYMBOL_INFOW);
996 BOOL WINAPI SymFromName(HANDLE, PCSTR, PSYMBOL_INFO);
997 BOOL WINAPI SymFromNameW(HANDLE, PCWSTR, PSYMBOL_INFOW);
998 BOOL WINAPI SymGetSymFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_SYMBOL);
999 BOOL WINAPI SymGetSymFromAddr64(HANDLE, DWORD64, PDWORD64, PIMAGEHLP_SYMBOL64);
1000 BOOL WINAPI SymGetSymFromName(HANDLE, PCSTR, PIMAGEHLP_SYMBOL);
1001 BOOL WINAPI SymGetSymFromName64(HANDLE, PCSTR, PIMAGEHLP_SYMBOL64);
1002 BOOL WINAPI SymGetTypeFromName(HANDLE, ULONG64, PCSTR, PSYMBOL_INFO);
1003 BOOL WINAPI SymGetTypeFromNameW(HANDLE, ULONG64, PCWSTR, PSYMBOL_INFOW);
1004 BOOL WINAPI SymGetSymNext(HANDLE, PIMAGEHLP_SYMBOL);
1005 BOOL WINAPI SymGetSymNext64(HANDLE, PIMAGEHLP_SYMBOL64);
1006 BOOL WINAPI SymGetSymNextW64(HANDLE, PIMAGEHLP_SYMBOLW64);
1007 BOOL WINAPI SymGetSymPrev(HANDLE, PIMAGEHLP_SYMBOL);
1008 BOOL WINAPI SymGetSymPrev64(HANDLE, PIMAGEHLP_SYMBOL64);
1009 BOOL WINAPI SymGetSymPrevW64(HANDLE, PIMAGEHLP_SYMBOLW64);
1010 BOOL WINAPI SymEnumSym(HANDLE,ULONG64,PSYM_ENUMERATESYMBOLS_CALLBACK,PVOID);
1011 BOOL WINAPI SymEnumSymbols(HANDLE, ULONG64, PCSTR, PSYM_ENUMERATESYMBOLS_CALLBACK,
1012                            PVOID);
1013 BOOL WINAPI SymEnumSymbolsW(HANDLE, ULONG64, PCWSTR, PSYM_ENUMERATESYMBOLS_CALLBACKW,
1014                             PVOID);
1015 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(PCSTR, ULONG, ULONG, PVOID);
1016 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(PCWSTR, ULONG, ULONG, PVOID);
1017 BOOL WINAPI SymEnumerateSymbols(HANDLE, ULONG, PSYM_ENUMSYMBOLS_CALLBACK, PVOID);
1018 BOOL WINAPI SymEnumerateSymbolsW(HANDLE, ULONG, PSYM_ENUMSYMBOLS_CALLBACKW, PVOID);
1019 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(PCSTR, DWORD64, ULONG, PVOID);
1020 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)(PCWSTR, DWORD64, ULONG, PVOID);
1021 BOOL WINAPI SymEnumerateSymbols64(HANDLE, ULONG64, PSYM_ENUMSYMBOLS_CALLBACK64, PVOID);
1022 BOOL WINAPI SymEnumerateSymbolsW64(HANDLE, ULONG64, PSYM_ENUMSYMBOLS_CALLBACK64W, PVOID);
1023 BOOL WINAPI SymEnumSymbolsForAddr(HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID);
1024 BOOL WINAPI SymEnumSymbolsForAddrW(HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID);
1025 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(HANDLE, ULONG, PVOID, PVOID);
1026 BOOL WINAPI SymRegisterCallback(HANDLE, PSYMBOL_REGISTERED_CALLBACK, PVOID);
1027 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(HANDLE, ULONG, ULONG64, ULONG64);
1028 BOOL WINAPI SymRegisterCallback64(HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64);
1029 BOOL WINAPI SymRegisterCallbackW64(HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64);
1030 BOOL WINAPI SymUnDName(PIMAGEHLP_SYMBOL, PSTR, DWORD);
1031 BOOL WINAPI SymUnDName64(PIMAGEHLP_SYMBOL64, PSTR, DWORD);
1032 BOOL WINAPI SymMatchString(PCSTR, PCSTR, BOOL);
1033 BOOL WINAPI SymMatchStringA(PCSTR, PCSTR, BOOL);
1034 BOOL WINAPI SymMatchStringW(PCWSTR, PCWSTR, BOOL);
1035 BOOL WINAPI SymSearch(HANDLE, ULONG64, DWORD, DWORD, PCSTR, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID, DWORD);
1036 BOOL WINAPI SymSearchW(HANDLE, ULONG64, DWORD, DWORD, PCWSTR, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID, DWORD);
1037 DWORD WINAPI UnDecorateSymbolName(PCSTR, PSTR, DWORD, DWORD);
1038 DWORD WINAPI UnDecorateSymbolNameW(PCWSTR, PWSTR, DWORD, DWORD);
1039 BOOL WINAPI SymGetScope(HANDLE, ULONG64, DWORD, PSYMBOL_INFO);
1040 BOOL WINAPI SymGetScopeW(HANDLE, ULONG64, DWORD, PSYMBOL_INFOW);
1041 BOOL WINAPI SymFromIndex(HANDLE, ULONG64, DWORD, PSYMBOL_INFO);
1042 BOOL WINAPI SymFromIndexW(HANDLE, ULONG64, DWORD, PSYMBOL_INFOW);
1043 BOOL WINAPI SymAddSymbol(HANDLE, ULONG64, PCSTR, DWORD64, DWORD, DWORD);
1044 BOOL WINAPI SymAddSymbolW(HANDLE, ULONG64, PCWSTR, DWORD64, DWORD, DWORD);
1045 BOOL WINAPI SymDeleteSymbol(HANDLE, ULONG64, PCSTR, DWORD64, DWORD);
1046 BOOL WINAPI SymDeleteSymbolW(HANDLE, ULONG64, PCWSTR, DWORD64, DWORD);
1047
1048 /*************************
1049  *      Source Files     *
1050  *************************/
1051 typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)(PSOURCEFILE, PVOID);
1052 typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACKW)(PSOURCEFILEW, PVOID);
1053
1054 BOOL WINAPI SymEnumSourceFiles(HANDLE, ULONG64, PCSTR, PSYM_ENUMSOURCEFILES_CALLBACK,
1055                                PVOID);
1056 BOOL WINAPI SymEnumSourceFilesW(HANDLE, ULONG64, PCWSTR, PSYM_ENUMSOURCEFILES_CALLBACKW, PVOID);
1057 BOOL WINAPI SymGetLineFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINE);
1058 BOOL WINAPI SymGetLineFromAddrW(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINEW);
1059 BOOL WINAPI SymGetLineFromAddr64(HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINE64);
1060 BOOL WINAPI SymGetLineFromAddrW64(HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINEW64);
1061 BOOL WINAPI SymGetLinePrev(HANDLE, PIMAGEHLP_LINE);
1062 BOOL WINAPI SymGetLinePrevW(HANDLE, PIMAGEHLP_LINEW);
1063 BOOL WINAPI SymGetLinePrev64(HANDLE, PIMAGEHLP_LINE64);
1064 BOOL WINAPI SymGetLinePrevW64(HANDLE, PIMAGEHLP_LINEW64);
1065 BOOL WINAPI SymGetLineNext(HANDLE, PIMAGEHLP_LINE);
1066 BOOL WINAPI SymGetLineNextW(HANDLE, PIMAGEHLP_LINEW);
1067 BOOL WINAPI SymGetLineNext64(HANDLE, PIMAGEHLP_LINE64);
1068 BOOL WINAPI SymGetLineNextW64(HANDLE, PIMAGEHLP_LINEW64);
1069 BOOL WINAPI SymGetLineFromName(HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE);
1070 BOOL WINAPI SymGetLineFromName64(HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE64);
1071 BOOL WINAPI SymGetLineFromNameW64(HANDLE, PCWSTR, PCWSTR, DWORD, PLONG, PIMAGEHLP_LINEW64);
1072 ULONG WINAPI SymGetFileLineOffsets64(HANDLE, PCSTR, PCSTR, PDWORD64, ULONG);
1073 BOOL WINAPI SymGetSourceFile(HANDLE, ULONG64, PCSTR, PCSTR, PSTR, DWORD);
1074 BOOL WINAPI SymGetSourceFileW(HANDLE, ULONG64, PCWSTR, PCWSTR, PWSTR, DWORD);
1075 BOOL WINAPI SymGetSourceFileToken(HANDLE, ULONG64, PCSTR, PVOID*, DWORD*);
1076 BOOL WINAPI SymGetSourceFileTokenW(HANDLE, ULONG64, PCWSTR, PVOID*, DWORD*);
1077 BOOL WINAPI SymGetSourceFileFromToken(HANDLE, PVOID, PCSTR, PSTR, DWORD);
1078 BOOL WINAPI SymGetSourceFileFromTokenW(HANDLE, PVOID, PCWSTR, PWSTR, DWORD);
1079 BOOL WINAPI SymGetSourceVarFromToken(HANDLE, PVOID, PCSTR, PCSTR, PSTR, DWORD);
1080 BOOL WINAPI SymGetSourceVarFromTokenW(HANDLE, PVOID, PCWSTR, PCWSTR, PWSTR, DWORD);
1081
1082 typedef struct _SRCCODEINFO
1083 {
1084     DWORD       SizeOfStruct;
1085     PVOID       Key;
1086     DWORD64     ModBase;
1087     CHAR        Obj[MAX_PATH+1];
1088     CHAR        FileName[MAX_PATH+1];
1089     DWORD       LineNumber;
1090     DWORD64     Address;
1091 } SRCCODEINFO, *PSRCCODEINFO;
1092
1093 typedef struct _SRCCODEINFOW
1094 {
1095     DWORD       SizeOfStruct;
1096     PVOID       Key;
1097     DWORD64     ModBase;
1098     WCHAR       Obj[MAX_PATH+1];
1099     WCHAR       FileName[MAX_PATH+1];
1100     DWORD       LineNumber;
1101     DWORD64     Address;
1102 } SRCCODEINFOW, *PSRCCODEINFOW;
1103
1104 typedef BOOL (CALLBACK* PSYM_ENUMLINES_CALLBACK)(PSRCCODEINFO, PVOID);
1105 typedef BOOL (CALLBACK* PSYM_ENUMLINES_CALLBACKW)(PSRCCODEINFOW, PVOID);
1106 BOOL WINAPI SymEnumLines(HANDLE, ULONG64, PCSTR, PCSTR, PSYM_ENUMLINES_CALLBACK, PVOID);
1107 BOOL WINAPI SymEnumLinesW(HANDLE, ULONG64, PCWSTR, PCWSTR, PSYM_ENUMLINES_CALLBACKW, PVOID);
1108 BOOL WINAPI SymEnumSourceLines(HANDLE, ULONG64, PCSTR, PCSTR, DWORD, DWORD, PSYM_ENUMLINES_CALLBACK, PVOID);
1109 BOOL WINAPI SymEnumSourceLinesW(HANDLE, ULONG64, PCWSTR, PCWSTR, DWORD, DWORD, PSYM_ENUMLINES_CALLBACKW, PVOID);
1110
1111 /*************************
1112  * File & image handling *
1113  *************************/
1114 BOOL WINAPI SymInitialize(HANDLE, PCSTR, BOOL);
1115 BOOL WINAPI SymInitializeW(HANDLE, PCWSTR, BOOL);
1116 BOOL WINAPI SymCleanup(HANDLE);
1117
1118 HANDLE WINAPI FindDebugInfoFile(PCSTR, PCSTR, PSTR);
1119 typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(HANDLE, PCSTR, PVOID);
1120 typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACKW)(HANDLE, PCWSTR, PVOID);
1121 HANDLE WINAPI FindDebugInfoFileEx(PCSTR, PCSTR, PSTR, PFIND_DEBUG_FILE_CALLBACK, PVOID);
1122 HANDLE WINAPI FindDebugInfoFileExW(PCWSTR, PCWSTR, PWSTR, PFIND_DEBUG_FILE_CALLBACKW, PVOID);
1123 HANDLE WINAPI SymFindDebugInfoFile(HANDLE, PCSTR, PSTR, PFIND_DEBUG_FILE_CALLBACK, PVOID);
1124 HANDLE WINAPI SymFindDebugInfoFileW(HANDLE, PCWSTR, PWSTR, PFIND_DEBUG_FILE_CALLBACKW, PVOID);
1125 typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACK)(PCSTR, PVOID);
1126 typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACKW)(PCWSTR, PVOID);
1127 BOOL WINAPI FindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD,
1128                            PSTR, PFINDFILEINPATHCALLBACK, PVOID);
1129 BOOL WINAPI SymFindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD,
1130                               PSTR, PFINDFILEINPATHCALLBACK, PVOID);
1131 BOOL WINAPI SymFindFileInPathW(HANDLE, PCWSTR, PCWSTR, PVOID, DWORD, DWORD, DWORD,
1132                               PWSTR, PFINDFILEINPATHCALLBACKW, PVOID);
1133 HANDLE WINAPI FindExecutableImage(PCSTR, PCSTR, PSTR);
1134 typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACK)(HANDLE, PCSTR, PVOID);
1135 typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACKW)(HANDLE, PCWSTR, PVOID);
1136 HANDLE WINAPI FindExecutableImageEx(PCSTR, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID);
1137 HANDLE WINAPI FindExecutableImageExW(PCWSTR, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW, PVOID);
1138 HANDLE WINAPI SymFindExecutableImage(HANDLE, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID);
1139 HANDLE WINAPI SymFindExecutableImageW(HANDLE, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW, PVOID);
1140 PIMAGE_NT_HEADERS WINAPI ImageNtHeader(PVOID);
1141 PVOID WINAPI ImageDirectoryEntryToDataEx(PVOID, BOOLEAN, USHORT, PULONG,
1142                                          PIMAGE_SECTION_HEADER *);
1143 PVOID WINAPI ImageDirectoryEntryToData(PVOID, BOOLEAN, USHORT, PULONG);
1144 PIMAGE_SECTION_HEADER WINAPI ImageRvaToSection(PIMAGE_NT_HEADERS, PVOID, ULONG);
1145 PVOID WINAPI ImageRvaToVa(PIMAGE_NT_HEADERS, PVOID, ULONG, PIMAGE_SECTION_HEADER*);
1146 BOOL WINAPI SymGetSearchPath(HANDLE, PSTR, DWORD);
1147 BOOL WINAPI SymGetSearchPathW(HANDLE, PWSTR, DWORD);
1148 BOOL WINAPI SymSetSearchPath(HANDLE, PCSTR);
1149 BOOL WINAPI SymSetSearchPathW(HANDLE, PCWSTR);
1150 DWORD WINAPI GetTimestampForLoadedLibrary(HMODULE);
1151 BOOL WINAPI MakeSureDirectoryPathExists(PCSTR);
1152 BOOL WINAPI SearchTreeForFile(PCSTR, PCSTR, PSTR);
1153 BOOL WINAPI SearchTreeForFileW(PCWSTR, PCWSTR, PWSTR);
1154 typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACK)(PCSTR, PVOID);
1155 typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACKW)(PCWSTR, PVOID);
1156 BOOL WINAPI EnumDirTree(HANDLE, PCSTR, PCSTR, PSTR, PENUMDIRTREE_CALLBACK, PVOID);
1157 BOOL WINAPI EnumDirTreeW(HANDLE, PCWSTR, PCWSTR, PWSTR, PENUMDIRTREE_CALLBACKW, PVOID);
1158 BOOL WINAPI SymMatchFileName(PCSTR, PCSTR, PSTR*, PSTR*);
1159 BOOL WINAPI SymMatchFileNameW(PCWSTR, PCWSTR, PWSTR*, PWSTR*);
1160 PCHAR WINAPI SymSetHomeDirectory(HANDLE, PCSTR);
1161 PWSTR WINAPI SymSetHomeDirectoryW(HANDLE, PCWSTR);
1162 PCHAR WINAPI SymGetHomeDirectory(DWORD, PSTR, size_t);
1163 PWSTR WINAPI SymGetHomeDirectoryW(DWORD, PWSTR, size_t);
1164 #define hdBase  0
1165 #define hdSym   1
1166 #define hdSrc   2
1167 #define hdMax   3
1168
1169 /*************************
1170  *   Context management  *
1171  *************************/
1172 BOOL WINAPI SymSetContext(HANDLE, PIMAGEHLP_STACK_FRAME, PIMAGEHLP_CONTEXT);
1173
1174
1175 /*************************
1176  *    Stack management   *
1177  *************************/
1178
1179 typedef struct _KDHELP
1180 {
1181     DWORD       Thread;
1182     DWORD       ThCallbackStack;
1183     DWORD       NextCallback;
1184     DWORD       FramePointer;
1185     DWORD       KiCallUserMode;
1186     DWORD       KeUserCallbackDispatcher;
1187     DWORD       SystemRangeStart;
1188 } KDHELP, *PKDHELP;
1189
1190 typedef struct _KDHELP64
1191 {
1192     DWORD64     Thread;
1193     DWORD       ThCallbackStack;
1194     DWORD       ThCallbackBStore;
1195     DWORD       NextCallback;
1196     DWORD       FramePointer;
1197     DWORD64     KiCallUserMode;
1198     DWORD64     KeUserCallbackDispatcher;
1199     DWORD64     SystemRangeStart;
1200     DWORD64     Reserved[8];
1201 } KDHELP64, *PKDHELP64;
1202
1203 typedef struct _STACKFRAME
1204 {
1205     ADDRESS     AddrPC;
1206     ADDRESS     AddrReturn;
1207     ADDRESS     AddrFrame;
1208     ADDRESS     AddrStack;
1209     PVOID       FuncTableEntry;
1210     DWORD       Params[4];
1211     BOOL        Far;
1212     BOOL        Virtual;
1213     DWORD       Reserved[3];
1214     KDHELP      KdHelp;
1215     ADDRESS     AddrBStore;
1216 } STACKFRAME, *LPSTACKFRAME;
1217
1218 typedef struct _STACKFRAME64
1219 {
1220     ADDRESS64   AddrPC;
1221     ADDRESS64   AddrReturn;
1222     ADDRESS64   AddrFrame;
1223     ADDRESS64   AddrStack;
1224     ADDRESS64   AddrBStore;
1225     PVOID       FuncTableEntry;
1226     DWORD64     Params[4];
1227     BOOL        Far;
1228     BOOL        Virtual;
1229     DWORD64     Reserved[3];
1230     KDHELP64    KdHelp;
1231 } STACKFRAME64, *LPSTACKFRAME64;
1232
1233 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)
1234     (HANDLE, DWORD, PVOID, DWORD, PDWORD);
1235 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(HANDLE, DWORD);
1236 typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE)(HANDLE, DWORD);
1237 typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(HANDLE, HANDLE, LPADDRESS);
1238 BOOL WINAPI StackWalk(DWORD, HANDLE, HANDLE, LPSTACKFRAME, PVOID,
1239                       PREAD_PROCESS_MEMORY_ROUTINE,
1240                       PFUNCTION_TABLE_ACCESS_ROUTINE,
1241                       PGET_MODULE_BASE_ROUTINE,
1242                       PTRANSLATE_ADDRESS_ROUTINE);
1243
1244 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE64)
1245     (HANDLE, DWORD64, PVOID, DWORD, PDWORD);
1246 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE64)(HANDLE, DWORD64);
1247 typedef DWORD64 (CALLBACK *PGET_MODULE_BASE_ROUTINE64)(HANDLE, DWORD64);
1248 typedef DWORD64 (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE64)(HANDLE, HANDLE, LPADDRESS64);
1249 BOOL WINAPI StackWalk64(DWORD, HANDLE, HANDLE, LPSTACKFRAME64, PVOID,
1250                         PREAD_PROCESS_MEMORY_ROUTINE64,
1251                         PFUNCTION_TABLE_ACCESS_ROUTINE64,
1252                         PGET_MODULE_BASE_ROUTINE64,
1253                         PTRANSLATE_ADDRESS_ROUTINE64);
1254
1255 PVOID WINAPI SymFunctionTableAccess(HANDLE, DWORD);
1256 PVOID WINAPI SymFunctionTableAccess64(HANDLE, DWORD64);
1257
1258 typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(HANDLE, DWORD, PVOID);
1259 typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(HANDLE, ULONG64, ULONG64);
1260
1261 BOOL WINAPI SymRegisterFunctionEntryCallback(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK, PVOID);
1262 BOOL WINAPI SymRegisterFunctionEntryCallback64(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK64, ULONG64);
1263
1264 /*************************
1265  * Version, global stuff *
1266  *************************/
1267
1268 #define API_VERSION_NUMBER 9
1269
1270 typedef struct API_VERSION
1271 {
1272     USHORT  MajorVersion;
1273     USHORT  MinorVersion;
1274     USHORT  Revision;
1275     USHORT  Reserved;
1276 } API_VERSION, *LPAPI_VERSION;
1277
1278 LPAPI_VERSION WINAPI ImagehlpApiVersion(void);
1279 LPAPI_VERSION WINAPI ImagehlpApiVersionEx(LPAPI_VERSION);
1280
1281 typedef struct _IMAGE_DEBUG_INFORMATION
1282 {
1283     LIST_ENTRY                  List;
1284     DWORD                       ReservedSize;
1285     PVOID                       ReservedMappedBase;
1286     USHORT                      ReservedMachine;
1287     USHORT                      ReservedCharacteristics;
1288     DWORD                       ReservedCheckSum;
1289     DWORD                       ImageBase;
1290     DWORD                       SizeOfImage;
1291     DWORD                       ReservedNumberOfSections;
1292     PIMAGE_SECTION_HEADER       ReservedSections;
1293     DWORD                       ReservedExportedNamesSize;
1294     PSTR                        ReservedExportedNames;
1295     DWORD                       ReservedNumberOfFunctionTableEntries;
1296     PIMAGE_FUNCTION_ENTRY       ReservedFunctionTableEntries;
1297     DWORD                       ReservedLowestFunctionStartingAddress;
1298     DWORD                       ReservedHighestFunctionEndingAddress;
1299     DWORD                       ReservedNumberOfFpoTableEntries;
1300     PFPO_DATA                   ReservedFpoTableEntries;
1301     DWORD                       SizeOfCoffSymbols;
1302     PIMAGE_COFF_SYMBOLS_HEADER  CoffSymbols;
1303     DWORD                       ReservedSizeOfCodeViewSymbols;
1304     PVOID                       ReservedCodeViewSymbols;
1305     PSTR                        ImageFilePath;
1306     PSTR                        ImageFileName;
1307     PSTR                        ReservedDebugFilePath;
1308     DWORD                       ReservedTimeDateStamp;
1309     BOOL                        ReservedRomImage;
1310     PIMAGE_DEBUG_DIRECTORY      ReservedDebugDirectory;
1311     DWORD                       ReservedNumberOfDebugDirectories;
1312     DWORD                       ReservedOriginalFunctionTableBaseAddress;
1313     DWORD                       Reserved[ 2 ];
1314 } IMAGE_DEBUG_INFORMATION, *PIMAGE_DEBUG_INFORMATION;
1315
1316
1317 PIMAGE_DEBUG_INFORMATION WINAPI MapDebugInformation(HANDLE, PCSTR, PCSTR, ULONG);
1318
1319 BOOL WINAPI UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION);
1320
1321 DWORD   WINAPI  SymGetOptions(void);
1322 DWORD   WINAPI  SymSetOptions(DWORD);
1323
1324 BOOL WINAPI SymSetParentWindow(HWND);
1325
1326 /*************************
1327  * Version, global stuff *
1328  *************************/
1329
1330 typedef BOOL     (WINAPI* PSYMBOLSERVERPROC)(PCSTR, PCSTR, PVOID, DWORD, DWORD, PSTR);
1331 typedef BOOL     (WINAPI* PSYMBOLSERVERPROCA)(PCSTR, PCSTR, PVOID, DWORD, DWORD, PSTR);
1332 typedef BOOL     (WINAPI* PSYMBOLSERVERPROCW)(PCWSTR, PCWSTR, PVOID, DWORD, DWORD, PWSTR);
1333 typedef BOOL     (WINAPI* PSYMBOLSERVEROPENPROC)(void);
1334 typedef BOOL     (WINAPI* PSYMBOLSERVERCLOSEPROC)(void);
1335 typedef BOOL     (WINAPI* PSYMBOLSERVERSETOPTIONSPROC)(UINT_PTR, ULONG64);
1336 typedef BOOL     (CALLBACK* PSYMBOLSERVERCALLBACKPROC)(UINT_PTR, ULONG64, ULONG64);
1337 typedef UINT_PTR (WINAPI* PSYMBOLSERVERGETOPTIONSPROC)(void);
1338 typedef BOOL     (WINAPI* PSYMBOLSERVERPINGPROC)(PCSTR);
1339 typedef BOOL     (WINAPI* PSYMBOLSERVERPINGPROCA)(PCSTR);
1340 typedef BOOL     (WINAPI* PSYMBOLSERVERPINGPROCW)(PCWSTR);
1341
1342 #define SSRVOPT_CALLBACK            0x0001
1343 #define SSRVOPT_DWORD               0x0002
1344 #define SSRVOPT_DWORDPTR            0x0004
1345 #define SSRVOPT_GUIDPTR             0x0008
1346 #define SSRVOPT_OLDGUIDPTR          0x0010
1347 #define SSRVOPT_UNATTENDED          0x0020
1348 #define SSRVOPT_NOCOPY              0x0040
1349 #define SSRVOPT_PARENTWIN           0x0080
1350 #define SSRVOPT_PARAMTYPE           0x0100
1351 #define SSRVOPT_SECURE              0x0200
1352 #define SSRVOPT_TRACE               0x0400
1353 #define SSRVOPT_SETCONTEXT          0x0800
1354 #define SSRVOPT_PROXY               0x1000
1355 #define SSRVOPT_DOWNSTREAM_STORE    0x2000
1356 #define SSRVOPT_RESET               ((ULONG_PTR)-1)
1357
1358 #define SSRVACTION_TRACE        1
1359 #define SSRVACTION_QUERYCANCEL  2
1360 #define SSRVACTION_EVENT        3
1361
1362 #ifdef __cplusplus
1363 } /* extern "C" */
1364 #endif /* defined(__cplusplus) */
1365
1366 #endif  /* __WINE_DBGHELP_H */