msvcrt: Fix _vswprintf* arguments.
[wine] / include / imagehlp.h
1 /*
2  * Declarations for IMAGEHLP
3  *
4  * Copyright (C) 1998 Patrik Stridvall
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_IMAGEHLP_H
22 #define __WINE_IMAGEHLP_H
23
24 #include <wintrust.h>
25
26 /* A set of documentation macros (see also dbghelp.h) */
27 #ifndef __deref_out
28 # define __deref_out
29 #endif
30 #ifndef __deref_out_opt
31 # define __deref_out_opt
32 #endif
33 #ifndef __deref_opt_out
34 # define __deref_opt_out
35 #endif
36 #ifndef __in
37 # define __in
38 #endif
39 #ifndef __in_opt
40 # define __in_opt
41 #endif
42 #ifndef __in_bcount
43 # define __in_bcount(x)
44 #endif
45 #ifndef __in_bcount_opt
46 # define __in_bcount_opt(x)
47 #endif
48 #ifndef __in_ecount
49 # define __in_ecount(x)
50 #endif
51 #ifndef __inout
52 # define __inout
53 #endif
54 #ifndef __inout_opt
55 # define __inout_opt
56 #endif
57 #ifndef __inout_bcount
58 # define __inout_bcount(x)
59 #endif
60 #ifndef __inout_ecount
61 # define __inout_ecount(x)
62 #endif
63 #ifndef __out
64 # define __out
65 #endif
66 #ifndef __out_opt
67 # define __out_opt
68 #endif
69 #ifndef __out_bcount
70 # define __out_bcount(x)
71 #endif
72 #ifndef __out_bcount_opt
73 # define __out_bcount_opt(x)
74 #endif
75 #ifndef __out_ecount
76 # define __out_ecount(x)
77 #endif
78 #ifndef __out_ecount_opt
79 # define __out_ecount_opt(x)
80 #endif
81 #ifndef __out_xcount
82 # define __out_xcount(x)
83 #endif
84
85
86 #ifdef __cplusplus
87 extern "C" {
88 #endif /* defined(__cplusplus) */
89
90 #define IMAGEAPI WINAPI
91 #define DBHLPAPI IMAGEAPI
92
93 #define API_VERSION_NUMBER 7            /* 7 is the default */
94
95 /***********************************************************************
96  * Types
97  */
98
99 typedef PVOID DIGEST_HANDLE;
100
101 /***********************************************************************
102  * Enums/Defines
103  */
104
105 typedef enum _IMAGEHLP_STATUS_REASON {
106   BindOutOfMemory,
107   BindRvaToVaFailed,
108   BindNoRoomInImage,
109   BindImportModuleFailed,
110   BindImportProcedureFailed,
111   BindImportModule,
112   BindImportProcedure,
113   BindForwarder,
114   BindForwarderNOT,
115   BindImageModified,
116   BindExpandFileHeaders,
117   BindImageComplete,
118   BindMismatchedSymbols,
119   BindSymbolsNotUpdated
120 } IMAGEHLP_STATUS_REASON;
121
122 #define BIND_NO_BOUND_IMPORTS  0x00000001
123 #define BIND_NO_UPDATE         0x00000002
124 #define BIND_ALL_IMAGES        0x00000004
125 #define BIND_CACHE_IMPORT_DLLS 0x00000008
126
127 #define CERT_PE_IMAGE_DIGEST_DEBUG_INFO      0x01
128 #define CERT_PE_IMAGE_DIGEST_RESOURCES       0x02
129 #define CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO 0x04
130 #define CERT_PE_IMAGE_DIGEST_NON_PE_INFO     0x08
131
132 #define CERT_SECTION_TYPE_ANY 0xFF
133
134 #define SPLITSYM_REMOVE_PRIVATE    0x00000001
135 #define SPLITSYM_EXTRACT_ALL       0x00000002
136 #define SPLITSYM_SYMBOLPATH_IS_SRC 0x00000004
137
138 #define FRAME_FPO    0
139 #define FRAME_TRAP   1
140 #define FRAME_TSS    2
141 #define FRAME_NONFPO 3
142
143 #define CHECKSUM_SUCCESS         0
144 #define CHECKSUM_OPEN_FAILURE    1
145 #define CHECKSUM_MAP_FAILURE     2
146 #define CHECKSUM_MAPVIEW_FAILURE 3
147 #define CHECKSUM_UNICODE_FAILURE 4
148
149 typedef enum _ADDRESS_MODE {
150   AddrMode1616,
151   AddrMode1632,
152   AddrModeReal,
153   AddrModeFlat
154 } ADDRESS_MODE;
155
156 #define SYMOPT_CASE_INSENSITIVE  0x00000001
157 #define SYMOPT_UNDNAME           0x00000002
158 #define SYMOPT_DEFERRED_LOADS    0x00000004
159 #define SYMOPT_NO_CPP            0x00000008
160 #define SYMOPT_LOAD_LINES        0x00000010
161 #define SYMOPT_OMAP_FIND_NEAREST 0x00000020
162
163 #define SYMF_OMAP_GENERATED   0x00000001
164 #define SYMF_OMAP_MODIFIED    0x00000002
165 /* 0x00000004 has been obsoleted */
166 #define SYMF_REGISTER         0x00000008
167 #define SYMF_REGREL           0x00000010
168 #define SYMF_FRAMEREL         0x00000020
169 #define SYMF_PARAMETER        0x00000040
170 #define SYMF_LOCAL            0x00000080
171 #define SYMF_CONSTANT         0x00000100
172 #define SYMF_EXPORT           0x00000200
173 #define SYMF_FORWARDER        0x00000400
174 #define SYMF_FUNCTION         0x00000800
175
176 typedef enum {
177   SymNone,
178   SymCoff,
179   SymCv,
180   SymPdb,
181   SymExport,
182   SymDeferred,
183   SymSym,
184   SymDia,
185   SymVirtual,
186   NumSymTypes
187 } SYM_TYPE;
188
189 #define UNDNAME_COMPLETE               0x0000
190 #define UNDNAME_NO_LEADING_UNDERSCORES 0x0001
191 #define UNDNAME_NO_MS_KEYWORDS         0x0002
192 #define UNDNAME_NO_FUNCTION_RETURNS    0x0004
193 #define UNDNAME_NO_ALLOCATION_MODEL    0x0008
194 #define UNDNAME_NO_ALLOCATION_LANGUAGE 0x0010
195 #define UNDNAME_NO_MS_THISTYPE         0x0020
196 #define UNDNAME_NO_CV_THISTYPE         0x0040
197 #define UNDNAME_NO_THISTYPE            0x0060
198 #define UNDNAME_NO_ACCESS_SPECIFIERS   0x0080
199 #define UNDNAME_NO_THROW_SIGNATURES    0x0100
200 #define UNDNAME_NO_MEMBER_TYPE         0x0200
201 #define UNDNAME_NO_RETURN_UDT_MODEL    0x0400
202 #define UNDNAME_32_BIT_DECODE          0x0800
203 #define UNDNAME_NAME_ONLY              0x1000
204 #define UNDNAME_NO_ARGUMENTS           0x2000
205 #define UNDNAME_NO_SPECIAL_SYMS        0x4000
206
207 #define CBA_DEFERRED_SYMBOL_LOAD_START          0x00000001
208 #define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE       0x00000002
209 #define CBA_DEFERRED_SYMBOL_LOAD_FAILURE        0x00000003
210 #define CBA_SYMBOLS_UNLOADED                    0x00000004
211 #define CBA_DUPLICATE_SYMBOL                    0x00000005
212
213 /***********************************************************************
214  * Structures
215  */
216
217 typedef struct _LOADED_IMAGE
218 {
219     PSTR                        ModuleName;
220     HANDLE                      hFile;
221     PUCHAR                      MappedAddress;
222     PIMAGE_NT_HEADERS           FileHeader;
223     PIMAGE_SECTION_HEADER       LastRvaSection;
224     ULONG                       NumberOfSections;
225     PIMAGE_SECTION_HEADER       Sections;
226     ULONG                       Characteristics;
227     BOOLEAN                     fSystemImage;
228     BOOLEAN                     fDOSImage;
229     BOOLEAN                     fReadOnly;
230     UCHAR                       Version;
231     LIST_ENTRY                  Links;
232     ULONG                       SizeOfImage;
233 } LOADED_IMAGE, *PLOADED_IMAGE;
234
235 typedef struct _API_VERSION {
236   USHORT  MajorVersion;
237   USHORT  MinorVersion;
238   USHORT  Revision;
239   USHORT  Reserved;
240 } API_VERSION, *LPAPI_VERSION;
241
242 typedef struct _IMAGE_DEBUG_INFORMATION {
243   LIST_ENTRY List;
244   DWORD        Size;
245   PVOID        MappedBase;
246   USHORT       Machine;
247   USHORT       Characteristics;
248   DWORD        CheckSum;
249   DWORD        ImageBase;
250   DWORD        SizeOfImage;
251
252   DWORD NumberOfSections;
253   PIMAGE_SECTION_HEADER Sections;
254
255   DWORD ExportedNamesSize;
256   PSTR ExportedNames;
257
258   DWORD NumberOfFunctionTableEntries;
259   PIMAGE_FUNCTION_ENTRY FunctionTableEntries;
260   DWORD LowestFunctionStartingAddress;
261   DWORD HighestFunctionEndingAddress;
262
263   DWORD NumberOfFpoTableEntries;
264   PFPO_DATA FpoTableEntries;
265
266   DWORD SizeOfCoffSymbols;
267   PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols;
268
269   DWORD SizeOfCodeViewSymbols;
270   PVOID CodeViewSymbols;
271
272   PSTR ImageFilePath;
273   PSTR ImageFileName;
274   PSTR DebugFilePath;
275
276   DWORD TimeDateStamp;
277
278   BOOL RomImage;
279   PIMAGE_DEBUG_DIRECTORY DebugDirectory;
280   DWORD  NumberOfDebugDirectories;
281
282   DWORD Reserved[3];
283 } IMAGE_DEBUG_INFORMATION, *PIMAGE_DEBUG_INFORMATION;
284
285 typedef struct _ADDRESS {
286     DWORD          Offset;
287     WORD           Segment;
288     ADDRESS_MODE Mode;
289 } ADDRESS, *LPADDRESS;
290
291 typedef struct _ADDRESS64 {
292     DWORD64        Offset;
293     WORD           Segment;
294     ADDRESS_MODE   Mode;
295 } ADDRESS64, *LPADDRESS64;
296
297 typedef struct _KDHELP {
298   DWORD Thread;
299   DWORD ThCallbackStack;
300   DWORD NextCallback;
301   DWORD FramePointer;
302   DWORD KiCallUserMode;
303   DWORD KeUserCallbackDispatcher;
304   DWORD SystemRangeStart;
305 } KDHELP, *PKDHELP;
306
307 typedef struct _KDHELP64 {
308     DWORD64 Thread;
309     DWORD   ThCallbackStack;
310     DWORD   ThCallbackBStore;
311     DWORD   NextCallback;
312     DWORD   FramePointer;
313     DWORD64 KiCallUserMode;
314     DWORD64 KeUserCallbackDispatcher;
315     DWORD64 SystemRangeStart;
316     DWORD64 Reserved[8];
317 } KDHELP64, *PKDHELP64;
318
319 typedef struct _STACKFRAME {
320   ADDRESS AddrPC;
321   ADDRESS AddrReturn;
322   ADDRESS AddrFrame;
323   ADDRESS AddrStack;
324   PVOID     FuncTableEntry;
325   DWORD     Params[4];
326   BOOL    Far;
327   BOOL    Virtual;
328   DWORD     Reserved[3];
329   KDHELP  KdHelp;
330 } STACKFRAME, *LPSTACKFRAME;
331
332 typedef struct _STACKFRAME64 {
333     ADDRESS64 AddrPC;
334     ADDRESS64 AddrReturn;
335     ADDRESS64 AddrFrame;
336     ADDRESS64 AddrStack;
337     ADDRESS64 AddrBStore;
338     PVOID     FuncTableEntry;
339     DWORD64   Params[4];
340     BOOL      Far;
341     BOOL      Virtual;
342     DWORD64   Reserved[3];
343     KDHELP64  KdHelp;
344 } STACKFRAME64, *LPSTACKFRAME64;
345
346 typedef struct _SOURCEFILE {
347     DWORD64                     ModBase;
348     PCHAR                       FileName;
349 } SOURCEFILE, *PSOURCEFILE;
350
351 typedef struct _SOURCEFILEW
352 {
353     DWORD64                     ModBase;
354     PWSTR                       FileName;
355 } SOURCEFILEW, *PSOURCEFILEW;
356
357 typedef struct _IMAGEHLP_STACK_FRAME
358 {
359   DWORD InstructionOffset;
360   DWORD ReturnOffset;
361   DWORD FrameOffset;
362   DWORD StackOffset;
363   DWORD BackingStoreOffset;
364   DWORD FuncTableEntry;
365   DWORD Params[4];
366   DWORD Reserved[5];
367   DWORD Virtual;
368   DWORD Reserved2;
369 } IMAGEHLP_STACK_FRAME, *PIMAGEHLP_STACK_FRAME;
370
371 typedef VOID IMAGEHLP_CONTEXT, *PIMAGEHLP_CONTEXT;
372
373 typedef struct _IMAGEHLP_SYMBOL {
374   DWORD SizeOfStruct;
375   DWORD Address;
376   DWORD Size;
377   DWORD Flags;
378   DWORD MaxNameLength;
379   CHAR  Name[ANYSIZE_ARRAY];
380 } IMAGEHLP_SYMBOL, *PIMAGEHLP_SYMBOL;
381
382 typedef struct _IMAGEHLP_SYMBOLW {
383   DWORD SizeOfStruct;
384   DWORD Address;
385   DWORD Size;
386   DWORD Flags;
387   DWORD MaxNameLength;
388   WCHAR Name[ANYSIZE_ARRAY];
389 } IMAGEHLP_SYMBOLW, *PIMAGEHLP_SYMBOLW;
390
391 typedef struct _IMAGEHLP_SYMBOL64
392 {
393     DWORD                       SizeOfStruct;
394     DWORD64                     Address;
395     DWORD                       Size;
396     DWORD                       Flags;
397     DWORD                       MaxNameLength;
398     CHAR                        Name[1];
399 } IMAGEHLP_SYMBOL64, *PIMAGEHLP_SYMBOL64;
400
401 typedef struct _IMAGEHLP_SYMBOLW64
402 {
403     DWORD                       SizeOfStruct;
404     DWORD64                     Address;
405     DWORD                       Size;
406     DWORD                       Flags;
407     DWORD                       MaxNameLength;
408     WCHAR                       Name[1];
409 } IMAGEHLP_SYMBOLW64, *PIMAGEHLP_SYMBOLW64;
410
411 typedef struct _IMAGEHLP_MODULE {
412   DWORD      SizeOfStruct;
413   DWORD      BaseOfImage;
414   DWORD      ImageSize;
415   DWORD      TimeDateStamp;
416   DWORD      CheckSum;
417   DWORD      NumSyms;
418   SYM_TYPE   SymType;
419   CHAR       ModuleName[32];
420   CHAR       ImageName[256];
421   CHAR       LoadedImageName[256];
422 } IMAGEHLP_MODULE, *PIMAGEHLP_MODULE;
423
424 typedef struct _IMAGEHLP_MODULEW {
425   DWORD      SizeOfStruct;
426   DWORD      BaseOfImage;
427   DWORD      ImageSize;
428   DWORD      TimeDateStamp;
429   DWORD      CheckSum;
430   DWORD      NumSyms;
431   SYM_TYPE   SymType;
432   WCHAR      ModuleName[32];
433   WCHAR      ImageName[256];
434   WCHAR      LoadedImageName[256];
435 } IMAGEHLP_MODULEW, *PIMAGEHLP_MODULEW;
436
437 typedef struct _IMAGEHLP_MODULE64
438 {
439     DWORD                       SizeOfStruct;
440     DWORD64                     BaseOfImage;
441     DWORD                       ImageSize;
442     DWORD                       TimeDateStamp;
443     DWORD                       CheckSum;
444     DWORD                       NumSyms;
445     SYM_TYPE                    SymType;
446     CHAR                        ModuleName[32];
447     CHAR                        ImageName[256];
448     CHAR                        LoadedImageName[256];
449     CHAR                        LoadedPdbName[256];
450     DWORD                       CVSig;
451     CHAR                        CVData[MAX_PATH*3];
452     DWORD                       PdbSig;
453     GUID                        PdbSig70;
454     DWORD                       PdbAge;
455     BOOL                        PdbUnmatched;
456     BOOL                        DbgUnmatched;
457     BOOL                        LineNumbers;
458     BOOL                        GlobalSymbols;
459     BOOL                        TypeInfo;
460     BOOL                        SourceIndexed;
461     BOOL                        Publics;
462 } IMAGEHLP_MODULE64, *PIMAGEHLP_MODULE64;
463
464 typedef struct _IMAGEHLP_MODULEW64
465 {
466     DWORD                       SizeOfStruct;
467     DWORD64                     BaseOfImage;
468     DWORD                       ImageSize;
469     DWORD                       TimeDateStamp;
470     DWORD                       CheckSum;
471     DWORD                       NumSyms;
472     SYM_TYPE                    SymType;
473     WCHAR                       ModuleName[32];
474     WCHAR                       ImageName[256];
475     WCHAR                       LoadedImageName[256];
476     WCHAR                       LoadedPdbName[256];
477     DWORD                       CVSig;
478     WCHAR                       CVData[MAX_PATH*3];
479     DWORD                       PdbSig;
480     GUID                        PdbSig70;
481     DWORD                       PdbAge;
482     BOOL                        PdbUnmatched;
483     BOOL                        DbgUnmatched;
484     BOOL                        LineNumbers;
485     BOOL                        GlobalSymbols;
486     BOOL                        TypeInfo;
487     BOOL                        SourceIndexed;
488     BOOL                        Publics;
489 } IMAGEHLP_MODULEW64, *PIMAGEHLP_MODULEW64;
490
491 typedef struct _IMAGEHLP_LINE {
492   DWORD SizeOfStruct;
493   PVOID Key;
494   DWORD LineNumber;
495   PCHAR FileName;
496   DWORD Address;
497 } IMAGEHLP_LINE, *PIMAGEHLP_LINE;
498
499 typedef struct _IMAGEHLP_LINEW {
500   DWORD SizeOfStruct;
501   PVOID Key;
502   DWORD LineNumber;
503   PWSTR FileName;
504   DWORD Address;
505 } IMAGEHLP_LINEW, *PIMAGEHLP_LINEW;
506
507 typedef struct _IMAGEHLP_LINE64 {
508   DWORD SizeOfStruct;
509   PVOID Key;
510   DWORD LineNumber;
511   PCHAR FileName;
512   DWORD64 Address;
513 } IMAGEHLP_LINE64, *PIMAGEHLP_LINE64;
514
515 typedef struct _IMAGEHLP_LINEW64 {
516   DWORD SizeOfStruct;
517   PVOID Key;
518   DWORD LineNumber;
519   PWSTR FileName;
520   DWORD64 Address;
521 } IMAGEHLP_LINEW64, *PIMAGEHLP_LINEW64;
522
523 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD {
524   DWORD   SizeOfStruct;
525   DWORD   BaseOfImage;
526   DWORD   CheckSum;
527   DWORD   TimeDateStamp;
528   CHAR    FileName[MAX_PATH];
529   BOOLEAN Reparse;
530 } IMAGEHLP_DEFERRED_SYMBOL_LOAD, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
531
532 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL {
533   DWORD              SizeOfStruct;
534   DWORD              NumberOfDups;
535   PIMAGEHLP_SYMBOL Symbol;
536   ULONG              SelectedSymbol;
537 } IMAGEHLP_DUPLICATE_SYMBOL, *PIMAGEHLP_DUPLICATE_SYMBOL;
538
539 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO
540 {
541     TI_GET_SYMTAG,
542     TI_GET_SYMNAME,
543     TI_GET_LENGTH,
544     TI_GET_TYPE,
545     TI_GET_TYPEID,
546     TI_GET_BASETYPE,
547     TI_GET_ARRAYINDEXTYPEID,
548     TI_FINDCHILDREN,
549     TI_GET_DATAKIND,
550     TI_GET_ADDRESSOFFSET,
551     TI_GET_OFFSET,
552     TI_GET_VALUE,
553     TI_GET_COUNT,
554     TI_GET_CHILDRENCOUNT,
555     TI_GET_BITPOSITION,
556     TI_GET_VIRTUALBASECLASS,
557     TI_GET_VIRTUALTABLESHAPEID,
558     TI_GET_VIRTUALBASEPOINTEROFFSET,
559     TI_GET_CLASSPARENTID,
560     TI_GET_NESTED,
561     TI_GET_SYMINDEX,
562     TI_GET_LEXICALPARENT,
563     TI_GET_ADDRESS,
564     TI_GET_THISADJUST,
565     TI_GET_UDTKIND,
566     TI_IS_EQUIV_TO,
567     TI_GET_CALLING_CONVENTION,
568 } IMAGEHLP_SYMBOL_TYPE_INFO;
569
570 #define IMAGEHLP_GET_TYPE_INFO_UNCACHED            0x00000001
571 #define IMAGEHLP_GET_TYPE_INFO_CHILDREN            0x00000002
572 typedef struct _IMAGEHLP_GET_TYPE_INFO_PARAMS
573 {
574     ULONG       SizeOfStruct;
575     ULONG       Flags;
576     ULONG       NumIds;
577     PULONG      TypeIds;
578     ULONG64     TagFilter;
579     ULONG       NumReqs;
580     IMAGEHLP_SYMBOL_TYPE_INFO* ReqKinds;
581     PULONG_PTR  ReqOffsets;
582     PULONG      ReqSizes;
583     ULONG_PTR   ReqStride;
584     ULONG_PTR   BufferSize;
585     PVOID       Buffer;
586     ULONG       EntriesMatched;
587     ULONG       EntriesFilled;
588     ULONG64     TagsFound;
589     ULONG64     AllReqsValid;
590     ULONG       NumReqsValid;
591     PULONG64    ReqsValid;
592 } IMAGEHLP_GET_TYPE_INFO_PARAMS, *PIMAGEHLP_GET_TYPE_INFO_PARAMS;
593
594 #define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT          1
595 #define IMAGEHLP_SYMBOL_INFO_REGISTER              SYMF_REGISTER
596 #define IMAGEHLP_SYMBOL_INFO_REGRELATIVE           SYMF_REGREL
597 #define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE         SYMF_FRAMEREL
598 #define IMAGEHLP_SYMBOL_INFO_PARAMETER             SYMF_PARAMETER
599 #define IMAGEHLP_SYMBOL_INFO_LOCAL                 SYMF_LOCAL
600 #define IMAGEHLP_SYMBOL_INFO_CONSTANT              SYMF_CONSTANT
601 #define IMAGEHLP_SYMBOL_FUNCTION                   SYMF_FUNCTION
602
603 #define MAX_SYM_NAME                               2000
604
605 typedef struct _SYMBOL_INFO {
606     ULONG       SizeOfStruct;
607     ULONG       TypeIndex;
608     ULONG64     Reserved[2];
609     ULONG       info;
610     ULONG       Size;
611     ULONG64     ModBase;
612     ULONG       Flags;
613     ULONG64     Value;
614     ULONG64     Address;
615     ULONG       Register;
616     ULONG       Scope;
617     ULONG       Tag;
618     ULONG       NameLen;
619     ULONG       MaxNameLen;
620     CHAR        Name[1];
621 } SYMBOL_INFO, *PSYMBOL_INFO;
622
623 typedef struct _SYMBOL_INFOW
624 {
625     ULONG       SizeOfStruct;
626     ULONG       TypeIndex;
627     ULONG64     Reserved[2];
628     ULONG       Index;
629     ULONG       Size;
630     ULONG64     ModBase;
631     ULONG       Flags;
632     ULONG64     Value;
633     ULONG64     Address;
634     ULONG       Register;
635     ULONG       Scope;
636     ULONG       Tag;
637     ULONG       NameLen;
638     ULONG       MaxNameLen;
639     WCHAR       Name[1];
640 } SYMBOL_INFOW, *PSYMBOL_INFOW;
641
642 typedef struct _SYMBOL_INFO_PACKAGE
643 {
644     SYMBOL_INFO si;
645     CHAR        name[MAX_SYM_NAME+1];
646 } SYMBOL_INFO_PACKAGE, *PSYMBOL_INFO_PACKAGE;
647
648 typedef struct _SYMBOL_INFO_PACKAGEW
649 {
650     SYMBOL_INFOW si;
651     WCHAR        name[MAX_SYM_NAME+1];
652 } SYMBOL_INFO_PACKAGEW, *PSYMBOL_INFO_PACKAGEW;
653
654 #define DBHHEADER_DEBUGDIRS     0x1
655 typedef struct _MODLOAD_DATA
656 {
657     DWORD               ssize;
658     DWORD               ssig;
659     PVOID               data;
660     DWORD               size;
661     DWORD               flags;
662 } MODLOAD_DATA, *PMODLOAD_DATA;
663
664 typedef struct _SRCCODEINFO
665 {
666     DWORD       SizeOfStruct;
667     PVOID       Key;
668     DWORD64     ModBase;
669     CHAR        Obj[MAX_PATH+1];
670     CHAR        FileName[MAX_PATH+1];
671     DWORD       LineNumber;
672     DWORD64     Address;
673 } SRCCODEINFO, *PSRCCODEINFO;
674
675 typedef struct _SRCCODEINFOW
676 {
677     DWORD       SizeOfStruct;
678     PVOID       Key;
679     DWORD64     ModBase;
680     WCHAR       Obj[MAX_PATH+1];
681     WCHAR       FileName[MAX_PATH+1];
682     DWORD       LineNumber;
683     DWORD64     Address;
684 } SRCCODEINFOW, *PSRCCODEINFOW;
685
686 /***********************************************************************
687  * Callbacks
688  */
689
690 typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACK)(
691   PCSTR, PVOID
692 );
693 typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACKW)(
694   PCWSTR, PVOID
695 );
696
697 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(
698   PCSTR ModuleName, ULONG ModuleBase, ULONG ModuleSize,
699   PVOID UserContext
700 );
701 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK64)(
702   PCSTR, DWORD64, ULONG, PVOID
703 );
704 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACKW64)(
705   PCWSTR, DWORD64, ULONG, PVOID
706 );
707
708 typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(
709   HANDLE, PCSTR, PVOID
710 );
711 typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACKW)(
712   HANDLE, PCWSTR, PVOID
713 );
714
715 typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACK)(
716   HANDLE, PCSTR, PVOID
717 );
718 typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACKW)(
719   HANDLE, PCWSTR, PVOID
720 );
721
722 typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACK)(
723   PCSTR, PVOID
724 );
725 typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACKW)(
726   PCWSTR, PVOID
727 );
728
729 typedef BOOL (CALLBACK *PIMAGEHLP_STATUS_ROUTINE)(
730   IMAGEHLP_STATUS_REASON Reason, PCSTR ImageName, PCSTR DllName,
731   ULONG_PTR Va, ULONG_PTR Parameter
732 );
733 typedef BOOL (CALLBACK *PIMAGEHLP_STATUS_ROUTINE32)(
734   IMAGEHLP_STATUS_REASON Reason, PCSTR ImageName, PCSTR DllName,
735   ULONG Va, ULONG_PTR Parameter
736 );
737 typedef BOOL (CALLBACK *PIMAGEHLP_STATUS_ROUTINE64)(
738   IMAGEHLP_STATUS_REASON Reason, PCSTR ImageName, PCSTR DllName,
739   ULONG64 Va, ULONG_PTR Parameter
740 );
741
742 typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(
743   PSYMBOL_INFO pSymInfo, ULONG SymbolSize, PVOID UserContext
744 );
745 typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACKW)(
746   PSYMBOL_INFOW pSymInfo, ULONG SymbolSize, PVOID UserContext
747 );
748
749 typedef BOOL (CALLBACK* PSYM_ENUMLINES_CALLBACK)(
750   PSRCCODEINFO, PVOID
751 );
752 typedef BOOL (CALLBACK* PSYM_ENUMLINES_CALLBACKW)(
753   PSRCCODEINFOW, PVOID
754 );
755
756 typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)(
757   PSOURCEFILE pSourceFile, PVOID UserContext
758 );
759 typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACKW)(
760   PSOURCEFILEW pSourceFile, PVOID UserContext
761 );
762
763 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(
764   PCSTR ModuleName, ULONG BaseOfDll, PVOID UserContext
765 );
766 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(
767   PCSTR, DWORD64, PVOID
768 );
769 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACKW64)(
770   PCWSTR, DWORD64, PVOID
771 );
772
773 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(
774   PCSTR, ULONG, ULONG, PVOID
775 );
776 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(
777   PCWSTR, ULONG, ULONG, PVOID
778 );
779 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(
780   PCSTR, DWORD64, ULONG, PVOID
781 );
782 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)(
783   PCWSTR, DWORD64, ULONG, PVOID
784 );
785
786 typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(
787   HANDLE, DWORD, PVOID
788 );
789 typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(
790   HANDLE, ULONG64, ULONG64
791 );
792
793 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(
794   HANDLE hProcess, ULONG ActionCode, PVOID CallbackData,
795   PVOID UserContext
796 );
797 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(
798   HANDLE, ULONG, ULONG64, ULONG64
799 );
800
801 typedef BOOL (CALLBACK *DIGEST_FUNCTION)(
802   DIGEST_HANDLE refdata, PBYTE pData, DWORD dwLength
803 );
804
805 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)(
806   HANDLE  hProcess, DWORD lpBaseAddress, PVOID lpBuffer,
807   DWORD nSize, PDWORD lpNumberOfBytesRead
808 );
809
810 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE64)(
811   HANDLE  hProcess, DWORD64 lpBaseAddress, PVOID lpBuffer,
812   DWORD nSize, LPDWORD lpNumberOfBytesRead
813 );
814
815 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(
816   HANDLE hProcess, DWORD AddrBase
817 );
818
819 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE64)(
820   HANDLE hProcess, DWORD64 AddrBase
821 );
822
823 typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE)(
824   HANDLE hProcess, DWORD ReturnAddress);
825
826 typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE64)(
827   HANDLE hProcess, DWORD64 ReturnAddress);
828
829 typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(
830   HANDLE hProcess, HANDLE hThread, LPADDRESS lpaddr
831 );
832
833 typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE64)(
834   HANDLE hProcess, HANDLE hThread, LPADDRESS64 lpaddr
835 );
836
837
838 /***********************************************************************
839  * Functions
840  */
841
842 BOOL WINAPI BindImage(
843   PCSTR ImageName, PCSTR DllPath, PCSTR SymbolPath
844 );
845 BOOL WINAPI BindImageEx(
846   DWORD Flags, PCSTR ImageName, PCSTR DllPath, PCSTR SymbolPath,
847   PIMAGEHLP_STATUS_ROUTINE StatusRoutine
848 );
849 PIMAGE_NT_HEADERS WINAPI CheckSumMappedFile(
850   LPVOID BaseAddress, DWORD FileLength,
851   LPDWORD HeaderSum, LPDWORD CheckSum
852 );
853 BOOL WINAPI EnumDirTree(
854   HANDLE, PCSTR, PCSTR, PSTR, PENUMDIRTREE_CALLBACK, PVOID
855 );
856 BOOL WINAPI EnumDirTreeW(
857   HANDLE, PCWSTR, PCWSTR, PWSTR, PENUMDIRTREE_CALLBACKW, PVOID
858 );
859 BOOL WINAPI EnumerateLoadedModules(
860   HANDLE hProcess,
861   PENUMLOADED_MODULES_CALLBACK EnumLoadedModulesCallback,
862   PVOID UserContext
863 );
864 BOOL WINAPI EnumerateLoadedModules64(
865   HANDLE, PENUMLOADED_MODULES_CALLBACK64, PVOID
866 );
867 BOOL WINAPI EnumerateLoadedModulesW64(
868   HANDLE, PENUMLOADED_MODULES_CALLBACKW64, PVOID
869 );
870 HANDLE WINAPI FindDebugInfoFile(
871   PCSTR FileName, PCSTR SymbolPath, PSTR DebugFilePath
872 );
873 HANDLE WINAPI FindDebugInfoFileEx(
874   PCSTR, PCSTR, PSTR, PFIND_DEBUG_FILE_CALLBACK, PVOID
875 );
876 HANDLE WINAPI FindDebugInfoFileExW(
877   PCWSTR, PCWSTR, PWSTR, PFIND_DEBUG_FILE_CALLBACKW, PVOID
878 );
879 HANDLE WINAPI FindExecutableImage(
880   PCSTR, PCSTR, PSTR
881 );
882 HANDLE WINAPI FindExecutableImageEx(
883   PCSTR, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID
884 );
885 HANDLE WINAPI FindExecutableImageExW(
886   PCWSTR, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW, PVOID
887 );
888 BOOL WINAPI FindFileInPath(
889   HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD,
890   PSTR, PFINDFILEINPATHCALLBACK, PVOID
891 );
892 BOOL WINAPI GetImageConfigInformation(
893   PLOADED_IMAGE LoadedImage,
894   PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation
895 );
896 DWORD WINAPI GetImageUnusedHeaderBytes(
897   PLOADED_IMAGE LoadedImage,
898   LPDWORD SizeUnusedHeaderBytes
899 );
900 DWORD WINAPI GetTimestampForLoadedLibrary(
901   HMODULE Module
902 );
903 BOOL WINAPI ImageAddCertificate(
904   HANDLE FileHandle, LPWIN_CERTIFICATE Certificate, PDWORD Index
905 );
906 PVOID WINAPI ImageDirectoryEntryToData(
907   PVOID Base, BOOLEAN MappedAsImage, USHORT DirectoryEntry, PULONG Size
908 );
909 BOOL WINAPI ImageEnumerateCertificates(
910   HANDLE FileHandle, WORD TypeFilter, PDWORD CertificateCount,
911   PDWORD Indices, DWORD IndexCount
912 );
913 BOOL WINAPI ImageGetCertificateData(
914   HANDLE FileHandle, DWORD CertificateIndex,
915   LPWIN_CERTIFICATE Certificate, PDWORD RequiredLength
916 );
917 BOOL WINAPI ImageGetCertificateHeader(
918   HANDLE FileHandle, DWORD CertificateIndex,
919   LPWIN_CERTIFICATE Certificateheader
920 );
921 BOOL WINAPI ImageGetDigestStream(
922   HANDLE FileHandle, DWORD DigestLevel,
923   DIGEST_FUNCTION DigestFunction, DIGEST_HANDLE DigestHandle
924 );
925 PLOADED_IMAGE WINAPI ImageLoad(
926   PCSTR DllName, PCSTR DllPath
927 );
928 PIMAGE_NT_HEADERS WINAPI ImageNtHeader(
929   PVOID Base
930 );
931 BOOL WINAPI ImageRemoveCertificate(
932   HANDLE FileHandle, DWORD Index
933 );
934 PIMAGE_SECTION_HEADER WINAPI ImageRvaToSection(
935   PIMAGE_NT_HEADERS NtHeaders, PVOID Base, ULONG Rva
936 );
937 PVOID WINAPI ImageRvaToVa(
938   PIMAGE_NT_HEADERS NtHeaders, PVOID Base, ULONG Rva,
939   PIMAGE_SECTION_HEADER *LastRvaSection
940 );
941 BOOL WINAPI ImageUnload(
942   PLOADED_IMAGE LoadedImage
943 );
944 LPAPI_VERSION WINAPI ImagehlpApiVersion(
945   void
946 );
947 LPAPI_VERSION WINAPI ImagehlpApiVersionEx(
948   LPAPI_VERSION AppVersion
949 );
950 BOOL WINAPI MakeSureDirectoryPathExists(
951   PCSTR DirPath
952 );
953 BOOL WINAPI MapAndLoad(
954   PCSTR ImageName, PCSTR DllPath, PLOADED_IMAGE LoadedImage,
955   BOOL DotDll, BOOL ReadOnly
956 );
957 PIMAGE_DEBUG_INFORMATION WINAPI MapDebugInformation(
958   HANDLE FileHandle, PCSTR FileName,
959   PCSTR SymbolPath, ULONG ImageBase
960 );
961 DWORD WINAPI MapFileAndCheckSumA(
962   PCSTR Filename, PDWORD HeaderSum, PDWORD CheckSum
963 );
964 DWORD WINAPI MapFileAndCheckSumW(
965   PCWSTR Filename, PDWORD HeaderSum, PDWORD CheckSum
966 );
967 BOOL WINAPI ReBaseImage(
968   PCSTR CurrentImageName, PCSTR SymbolPath, BOOL fReBase,
969   BOOL fRebaseSysfileOk, BOOL fGoingDown, ULONG CheckImageSize,
970   ULONG *OldImageSize, ULONG_PTR *OldImageBase, ULONG *NewImageSize,
971   ULONG_PTR *NewImageBase, ULONG TimeStamp
972 );
973 BOOL WINAPI ReBaseImage64(
974   PCSTR CurrentImageName, PCSTR SymbolPath, BOOL fReBase,
975   BOOL fRebaseSysfileOk, BOOL fGoingDown, ULONG CheckImageSize,
976   ULONG *OldImageSize, ULONG64 *OldImageBase, ULONG *NewImageSize,
977   ULONG64 *NewImageBase, ULONG TimeStamp
978 );
979 BOOL WINAPI RemovePrivateCvSymbolic(
980   PCHAR DebugData, PCHAR *NewDebugData, ULONG *NewDebugSize
981 );
982 BOOL WINAPI SearchTreeForFile(
983   PCSTR RootPath, PCSTR InputPathName, PSTR OutputPathBuffer
984 );
985 BOOL WINAPI SearchTreeForFileW(
986   PCWSTR RootPath, PCWSTR InputPathName, PWSTR OutputPathBuffer
987 );
988 BOOL WINAPI SetImageConfigInformation(
989   PLOADED_IMAGE LoadedImage,
990   PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation
991 );
992 BOOL WINAPI SplitSymbols(
993   PSTR ImageName, PCSTR SymbolsPath,
994   PSTR SymbolFilePath, ULONG Flags
995 );
996 BOOL WINAPI StackWalk(
997   DWORD MachineType, HANDLE hProcess, HANDLE hThread,
998   LPSTACKFRAME StackFrame, PVOID ContextRecord,
999   PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine,
1000   PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,
1001   PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine,
1002   PTRANSLATE_ADDRESS_ROUTINE TranslateAddress
1003 );
1004 BOOL WINAPI StackWalk64(
1005   DWORD MachineType, HANDLE hProcess, HANDLE hThread,
1006   LPSTACKFRAME64 StackFrame, PVOID ContextRecord,
1007   PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine,
1008   PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine,
1009   PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine,
1010   PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress
1011 );
1012 BOOL WINAPI SymAddSymbol(
1013   HANDLE, ULONG64, PCSTR, DWORD64, DWORD, DWORD
1014 );
1015 BOOL WINAPI SymAddSymbolW(
1016   HANDLE, ULONG64, PCWSTR, DWORD64, DWORD, DWORD
1017 );
1018 BOOL WINAPI SymCleanup(
1019   HANDLE hProcess
1020 );
1021 BOOL WINAPI SymDeleteSymbol(
1022   HANDLE, ULONG64, PCSTR, DWORD64, DWORD
1023 );
1024 BOOL WINAPI SymDeleteSymbolW(
1025   HANDLE, ULONG64, PCWSTR, DWORD64, DWORD
1026 );
1027 BOOL WINAPI SymEnumerateModules(
1028   HANDLE hProcess, PSYM_ENUMMODULES_CALLBACK EnumModulesCallback,
1029   PVOID UserContext
1030 );
1031 BOOL WINAPI SymEnumerateModules64(
1032   HANDLE, PSYM_ENUMMODULES_CALLBACK64, PVOID
1033 );
1034 BOOL WINAPI SymEnumerateModulesW64(
1035   HANDLE, PSYM_ENUMMODULES_CALLBACKW64, PVOID
1036 );
1037 BOOL WINAPI SymEnumerateSymbols(
1038   HANDLE hProcess, DWORD BaseOfDll,
1039   PSYM_ENUMSYMBOLS_CALLBACK EnumSymbolsCallback, PVOID UserContext
1040 );
1041 BOOL WINAPI SymEnumerateSymbolsW(
1042   HANDLE hProcess, DWORD BaseOfDll,
1043   PSYM_ENUMSYMBOLS_CALLBACKW EnumSymbolsCallback, PVOID UserContext
1044 );
1045 BOOL WINAPI SymEnumerateSymbols64(
1046   HANDLE, ULONG64, PSYM_ENUMSYMBOLS_CALLBACK64, PVOID
1047 );
1048 BOOL WINAPI SymEnumerateSymbolsW64(
1049   HANDLE, ULONG64, PSYM_ENUMSYMBOLS_CALLBACK64W, PVOID
1050 );
1051 BOOL WINAPI SymEnumLines(
1052   HANDLE, ULONG64, PCSTR, PCSTR, PSYM_ENUMLINES_CALLBACK, PVOID
1053 );
1054 BOOL WINAPI SymEnumLinesW(
1055   HANDLE, ULONG64, PCWSTR, PCWSTR, PSYM_ENUMLINES_CALLBACKW, PVOID
1056 );
1057 BOOL WINAPI SymEnumSourceFiles(
1058   HANDLE hProcess, ULONG64 ModBase, PCSTR Mask,
1059   PSYM_ENUMSOURCEFILES_CALLBACK cbSrcFiles, PVOID UserContext
1060 );
1061 BOOL WINAPI SymEnumSourceFilesW(
1062   HANDLE hProcess, ULONG64 ModBase, PCWSTR Mask,
1063   PSYM_ENUMSOURCEFILES_CALLBACKW cbSrcFiles, PVOID UserContext
1064 );
1065 BOOL WINAPI SymEnumSourceLines(
1066   HANDLE, ULONG64, PCSTR, PCSTR, DWORD, DWORD, PSYM_ENUMLINES_CALLBACK, PVOID
1067 );
1068 BOOL WINAPI SymEnumSourceLinesW(
1069   HANDLE, ULONG64, PCWSTR, PCWSTR, DWORD, DWORD, PSYM_ENUMLINES_CALLBACKW, PVOID
1070 );
1071 BOOL WINAPI SymEnumSymbols(
1072   HANDLE hProcess, DWORD BaseOfDll, PCSTR Mask, 
1073   PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback, PVOID UserContext
1074 );
1075 BOOL WINAPI SymEnumSymbolsW(
1076   HANDLE hProcess, DWORD BaseOfDll, PCWSTR Mask,
1077   PSYM_ENUMERATESYMBOLS_CALLBACKW EnumSymbolsCallback, PVOID UserContext
1078 );
1079 BOOL WINAPI SymEnumSymbolsForAddr(
1080   HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID
1081 );
1082 BOOL WINAPI SymEnumSymbolsForAddrW(
1083   HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID
1084 );
1085 BOOL WINAPI SymEnumTypes(
1086   HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID
1087 );
1088 BOOL WINAPI SymEnumTypesW(
1089   HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID
1090 );
1091 HANDLE WINAPI SymFindExecutableImage(
1092   HANDLE, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID
1093 );
1094 HANDLE WINAPI SymFindExecutableImageW(
1095   HANDLE, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW, PVOID
1096 );
1097 BOOL WINAPI SymFindFileInPath(
1098   HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD,
1099   PSTR, PFINDFILEINPATHCALLBACK, PVOID
1100 );
1101 BOOL WINAPI SymFindFileInPathW(
1102   HANDLE, PCWSTR, PCWSTR, PVOID, DWORD, DWORD, DWORD,
1103   PWSTR, PFINDFILEINPATHCALLBACKW, PVOID
1104 );
1105 BOOL WINAPI SymFromAddr(
1106   HANDLE, DWORD64, DWORD64*, SYMBOL_INFO*
1107 );
1108 BOOL WINAPI SymFromAddrW(
1109   HANDLE, DWORD64, DWORD64*, SYMBOL_INFOW*
1110 );
1111 BOOL WINAPI SymFromIndex(
1112   HANDLE, ULONG64, DWORD, PSYMBOL_INFO
1113 );
1114 BOOL WINAPI SymFromIndexW(
1115   HANDLE, ULONG64, DWORD, PSYMBOL_INFOW
1116 );
1117 BOOL WINAPI SymFromName(
1118   HANDLE, PCSTR, PSYMBOL_INFO
1119 );
1120 BOOL WINAPI SymFromNameW(
1121   HANDLE, PCWSTR, PSYMBOL_INFOW
1122 );
1123 BOOL WINAPI SymFromToken(
1124   HANDLE, DWORD64, DWORD, PSYMBOL_INFO
1125 );
1126 BOOL WINAPI SymFromTokenW(
1127   HANDLE, DWORD64, DWORD, PSYMBOL_INFOW
1128 );
1129 PVOID WINAPI SymFunctionTableAccess(
1130   HANDLE hProcess, DWORD AddrBase
1131 );
1132 PVOID WINAPI SymFunctionTableAccess64(
1133   HANDLE hProcess, DWORD64 AddrBase
1134 );
1135 ULONG WINAPI SymGetFileLineOffsets64(
1136   HANDLE, PCSTR, PCSTR, PDWORD64, ULONG
1137 );
1138 PCHAR WINAPI SymGetHomeDirectory(
1139   DWORD, PSTR, size_t
1140 );
1141 PWSTR WINAPI SymGetHomeDirectoryW(
1142   DWORD, PWSTR, size_t
1143 );
1144 BOOL WINAPI SymGetLineFromAddr(
1145   HANDLE, DWORD, PDWORD, PIMAGEHLP_LINE
1146 );
1147 BOOL WINAPI SymGetLineFromAddrW(
1148   HANDLE, DWORD, PDWORD, PIMAGEHLP_LINEW
1149 );
1150 BOOL WINAPI SymGetLineFromAddr64(
1151   HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINE64
1152 );
1153 BOOL WINAPI SymGetLineFromAddrW64(
1154   HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINEW64
1155 );
1156 BOOL WINAPI SymGetLineFromName(
1157   HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE
1158 );
1159 BOOL WINAPI SymGetLineFromName64(
1160   HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE64
1161 );
1162 BOOL WINAPI SymGetLineFromNameW64(
1163   HANDLE, PCWSTR, PCWSTR, DWORD, PLONG, PIMAGEHLP_LINEW64
1164 );
1165 BOOL WINAPI SymGetLineNext(
1166   HANDLE, PIMAGEHLP_LINE
1167 );
1168 BOOL WINAPI SymGetLineNextW(
1169   HANDLE, PIMAGEHLP_LINEW
1170 );
1171 BOOL WINAPI SymGetLineNext64(
1172   HANDLE, PIMAGEHLP_LINE64
1173 );
1174 BOOL WINAPI SymGetLineNextW64(
1175   HANDLE, PIMAGEHLP_LINEW64
1176 );
1177 BOOL WINAPI SymGetLinePrev(
1178   HANDLE, PIMAGEHLP_LINE
1179 );
1180 BOOL WINAPI SymGetLinePrevW(
1181   HANDLE, PIMAGEHLP_LINEW
1182 );
1183 BOOL WINAPI SymGetLinePrev64(
1184   HANDLE, PIMAGEHLP_LINE64
1185 );
1186 BOOL WINAPI SymGetLinePrevW64(
1187   HANDLE, PIMAGEHLP_LINEW64
1188 );
1189 DWORD WINAPI SymGetModuleBase(
1190   HANDLE hProcess, DWORD dwAddr
1191 );
1192 BOOL WINAPI SymGetModuleInfo(
1193   HANDLE hProcess, DWORD dwAddr,
1194   PIMAGEHLP_MODULE ModuleInfo
1195 );
1196 BOOL WINAPI SymGetModuleInfoW(
1197   HANDLE, DWORD, PIMAGEHLP_MODULEW
1198 );
1199 BOOL WINAPI SymGetModuleInfo64(
1200   HANDLE, DWORD64, PIMAGEHLP_MODULE64
1201 );
1202 BOOL WINAPI SymGetModuleInfoW64(
1203   HANDLE, DWORD64, PIMAGEHLP_MODULEW64
1204 );
1205 DWORD WINAPI SymGetOptions(
1206   void
1207 );
1208 BOOL WINAPI SymGetScope(
1209   HANDLE, ULONG64, DWORD, PSYMBOL_INFO
1210 );
1211 BOOL WINAPI SymGetScopeW(
1212   HANDLE, ULONG64, DWORD, PSYMBOL_INFOW
1213 );
1214 BOOL WINAPI SymGetSearchPath(
1215   HANDLE hProcess, PSTR szSearchPath, DWORD SearchPathLength
1216 );
1217 BOOL WINAPI SymGetSearchPathW(
1218   HANDLE hProcess, PWSTR szSearchPath, DWORD SearchPathLength
1219 );
1220 BOOL WINAPI SymGetSourceFile(
1221   HANDLE, ULONG64, PCSTR, PCSTR, PSTR, DWORD
1222 );
1223 BOOL WINAPI SymGetSourceFileW(
1224   HANDLE, ULONG64, PCWSTR, PCWSTR, PWSTR, DWORD
1225 );
1226 BOOL WINAPI SymGetSourceFileFromToken(
1227   HANDLE, PVOID, PCSTR, PSTR, DWORD
1228 );
1229 BOOL WINAPI SymGetSourceFileFromTokenW(
1230   HANDLE, PVOID, PCWSTR, PWSTR, DWORD
1231 );
1232 BOOL WINAPI SymGetSourceFileToken(
1233   HANDLE, ULONG64, PCSTR, PVOID*, DWORD*
1234 );
1235 BOOL WINAPI SymGetSourceFileTokenW(
1236   HANDLE, ULONG64, PCWSTR, PVOID*, DWORD*
1237 );
1238 BOOL WINAPI SymGetSourceVarFromToken(
1239   HANDLE, PVOID, PCSTR, PCSTR, PSTR, DWORD
1240 );
1241 BOOL WINAPI SymGetSourceVarFromTokenW(
1242   HANDLE, PVOID, PCWSTR, PCWSTR, PWSTR, DWORD
1243 );
1244 BOOL WINAPI SymGetSymFromAddr(
1245   HANDLE hProcess, DWORD dwAddr,
1246   PDWORD pdwDisplacement, PIMAGEHLP_SYMBOL Symbol
1247 );
1248 BOOL WINAPI SymGetSymFromAddr64(
1249   HANDLE, DWORD64, PDWORD64, PIMAGEHLP_SYMBOL64
1250 );
1251 BOOL WINAPI SymGetSymFromName(
1252   HANDLE hProcess, PCSTR Name, PIMAGEHLP_SYMBOL Symbol
1253 );
1254 BOOL WINAPI SymGetSymFromName64(
1255   HANDLE, PCSTR, PIMAGEHLP_SYMBOL64
1256 );
1257 BOOL WINAPI SymGetSymNext(
1258   HANDLE hProcess, PIMAGEHLP_SYMBOL Symbol
1259 );
1260 BOOL WINAPI SymGetSymNext64(
1261   HANDLE, PIMAGEHLP_SYMBOL64
1262 );
1263 BOOL WINAPI SymGetSymPrev(
1264   HANDLE hProcess, PIMAGEHLP_SYMBOL Symbol
1265 );
1266 BOOL WINAPI SymGetSymPrev64(
1267   HANDLE, PIMAGEHLP_SYMBOL64
1268 );
1269 BOOL WINAPI SymGetTypeFromName(
1270   HANDLE, ULONG64, PCSTR, PSYMBOL_INFO
1271 );
1272 BOOL WINAPI SymGetTypeFromNameW(
1273   HANDLE, ULONG64, PCWSTR, PSYMBOL_INFOW
1274 );
1275 BOOL WINAPI SymGetTypeInfo(
1276   HANDLE, DWORD64, ULONG, IMAGEHLP_SYMBOL_TYPE_INFO, PVOID
1277 );
1278 BOOL WINAPI SymGetTypeInfoEx(
1279   HANDLE, DWORD64, PIMAGEHLP_GET_TYPE_INFO_PARAMS
1280 );
1281 BOOL WINAPI SymInitialize(
1282   HANDLE hProcess, PCSTR UserSearchPath, BOOL fInvadeProcess
1283 );
1284 BOOL WINAPI SymInitializeW(
1285   HANDLE hProcess, PCWSTR UserSearchPath, BOOL fInvadeProcess
1286 );
1287 DWORD WINAPI SymLoadModule(
1288   HANDLE hProcess, HANDLE hFile, PCSTR ImageName, PCSTR ModuleName,
1289   DWORD BaseOfDll, DWORD SizeOfDll
1290 );
1291 DWORD64 WINAPI SymLoadModule64(
1292   HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD
1293 );
1294 DWORD64 WINAPI SymLoadModuleEx(
1295   HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD, PMODLOAD_DATA, DWORD
1296 );
1297 DWORD64 WINAPI SymLoadModuleExW(
1298   HANDLE, HANDLE, PCWSTR, PCWSTR, DWORD64, DWORD, PMODLOAD_DATA, DWORD
1299 );
1300 BOOL WINAPI SymMatchFileName(
1301   PCSTR, PCSTR, PSTR*, PSTR*
1302 );
1303 BOOL WINAPI SymMatchFileNameW(
1304   PCWSTR, PCWSTR, PWSTR*, PWSTR*
1305 );
1306 BOOL WINAPI SymMatchString(
1307   PCSTR, PCSTR, BOOL
1308 );
1309 BOOL WINAPI SymMatchStringA(
1310   PCSTR, PCSTR, BOOL
1311 );
1312 BOOL WINAPI SymMatchStringW(
1313   PCWSTR, PCWSTR, BOOL
1314 );
1315 BOOL WINAPI SymRegisterCallback(
1316   HANDLE hProcess, PSYMBOL_REGISTERED_CALLBACK CallbackFunction,
1317   PVOID UserContext
1318 );
1319 BOOL WINAPI SymRegisterCallback64(
1320   HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64
1321 );
1322 BOOL WINAPI SymRegisterCallbackW64(
1323   HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64
1324 );
1325 BOOL WINAPI SymRegisterFunctionEntryCallback(
1326   HANDLE, PSYMBOL_FUNCENTRY_CALLBACK, PVOID
1327 );
1328 BOOL WINAPI SymRegisterFunctionEntryCallback64(
1329   HANDLE, PSYMBOL_FUNCENTRY_CALLBACK64, ULONG64
1330 );
1331 BOOL WINAPI SymSearch(
1332   HANDLE, ULONG64, DWORD, DWORD, PCSTR, DWORD64,
1333   PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID, DWORD
1334 );
1335 BOOL WINAPI SymSearchW(
1336   HANDLE, ULONG64, DWORD, DWORD, PCWSTR, DWORD64,
1337   PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID, DWORD
1338 );
1339 DWORD WINAPI SymSetContext(
1340   HANDLE hProcess, PIMAGEHLP_STACK_FRAME StackFrame, 
1341   PIMAGEHLP_CONTEXT Context
1342 );
1343 PCHAR WINAPI SymSetHomeDirectory(
1344   HANDLE, PCSTR
1345 );
1346 PWSTR WINAPI SymSetHomeDirectoryW(
1347   HANDLE, PCWSTR
1348 );
1349 DWORD WINAPI SymSetOptions(
1350   DWORD SymOptions
1351 );
1352 BOOL WINAPI SymSetParentWindow(
1353   HWND
1354 );
1355 BOOL WINAPI SymSetSearchPath(
1356   HANDLE hProcess, PCSTR szSearchPath
1357 );
1358 BOOL WINAPI SymSetSearchPathW(
1359   HANDLE hProcess, PCWSTR szSearchPath
1360 );
1361 BOOL WINAPI SymUnDName(
1362   PIMAGEHLP_SYMBOL sym, PSTR UnDecName, DWORD UnDecNameLength
1363 );
1364 BOOL WINAPI SymUnDName64(
1365   PIMAGEHLP_SYMBOL64, PSTR, DWORD
1366 );
1367 BOOL WINAPI SymUnloadModule(
1368   HANDLE hProcess, DWORD BaseOfDll
1369 );
1370 BOOL WINAPI TouchFileTimes(
1371   HANDLE FileHandle, LPSYSTEMTIME lpSystemTime
1372 );
1373 DWORD WINAPI UnDecorateSymbolName(
1374   PCSTR DecoratedName, PSTR UnDecoratedName,
1375   DWORD UndecoratedLength, DWORD Flags
1376 );
1377 DWORD WINAPI UnDecorateSymbolNameW(
1378   PCWSTR DecoratedName, PWSTR UnDecoratedName,
1379   DWORD UndecoratedLength, DWORD Flags
1380 );
1381 BOOL WINAPI UnMapAndLoad(
1382   PLOADED_IMAGE LoadedImage
1383 );
1384 BOOL WINAPI UnmapDebugInformation(
1385   PIMAGE_DEBUG_INFORMATION DebugInfo
1386 );
1387 BOOL WINAPI UpdateDebugInfoFile(
1388   PCSTR ImageFileName, PCSTR SymbolPath,
1389   PSTR DebugFilePath, PIMAGE_NT_HEADERS32 NtHeaders
1390 );
1391 BOOL WINAPI UpdateDebugInfoFileEx(
1392   PCSTR ImageFileName, PCSTR SymbolPath, PSTR DebugFilePath,
1393   PIMAGE_NT_HEADERS32 NtHeaders, DWORD OldChecksum
1394 );
1395
1396 #ifdef __cplusplus
1397 } /* extern "C" */
1398 #endif /* defined(__cplusplus) */
1399
1400 #endif  /* __WINE_IMAGEHLP_H */