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