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