Logo AND Algorithmique Numérique Distribuée

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