2 * Declarations for IMAGEHLP
4 * Copyright (C) 1998 Patrik Stridvall
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.
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.
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
21 #ifndef __WINE_IMAGEHLP_H
22 #define __WINE_IMAGEHLP_H
28 #endif /* defined(__cplusplus) */
30 #define IMAGEAPI WINAPI
31 #define DBHLPAPI IMAGEAPI
33 #define API_VERSION_NUMBER 7 /* 7 is the default */
35 /***********************************************************************
39 typedef PVOID DIGEST_HANDLE;
41 /***********************************************************************
45 typedef enum _IMAGEHLP_STATUS_REASON {
49 BindImportModuleFailed,
50 BindImportProcedureFailed,
56 BindExpandFileHeaders,
58 BindMismatchedSymbols,
60 } IMAGEHLP_STATUS_REASON;
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
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
72 #define CERT_SECTION_TYPE_ANY 0xFF
74 #define SPLITSYM_REMOVE_PRIVATE 0x00000001
75 #define SPLITSYM_EXTRACT_ALL 0x00000002
76 #define SPLITSYM_SYMBOLPATH_IS_SRC 0x00000004
81 #define FRAME_NONFPO 3
83 #define CHECKSUM_SUCCESS 0
84 #define CHECKSUM_OPEN_FAILURE 1
85 #define CHECKSUM_MAP_FAILURE 2
86 #define CHECKSUM_MAPVIEW_FAILURE 3
87 #define CHECKSUM_UNICODE_FAILURE 4
89 typedef enum _ADDRESS_MODE {
96 #define SYMOPT_CASE_INSENSITIVE 0x00000001
97 #define SYMOPT_UNDNAME 0x00000002
98 #define SYMOPT_DEFERRED_LOADS 0x00000004
99 #define SYMOPT_NO_CPP 0x00000008
100 #define SYMOPT_LOAD_LINES 0x00000010
101 #define SYMOPT_OMAP_FIND_NEAREST 0x00000020
103 #define SYMF_OMAP_GENERATED 0x00000001
104 #define SYMF_OMAP_MODIFIED 0x00000002
105 /* 0x00000004 has been obsoleted */
106 #define SYMF_REGISTER 0x00000008
107 #define SYMF_REGREL 0x00000010
108 #define SYMF_FRAMEREL 0x00000020
109 #define SYMF_PARAMETER 0x00000040
110 #define SYMF_LOCAL 0x00000080
111 #define SYMF_CONSTANT 0x00000100
112 #define SYMF_EXPORT 0x00000200
113 #define SYMF_FORWARDER 0x00000400
114 #define SYMF_FUNCTION 0x00000800
129 #define UNDNAME_COMPLETE 0x0000
130 #define UNDNAME_NO_LEADING_UNDERSCORES 0x0001
131 #define UNDNAME_NO_MS_KEYWORDS 0x0002
132 #define UNDNAME_NO_FUNCTION_RETURNS 0x0004
133 #define UNDNAME_NO_ALLOCATION_MODEL 0x0008
134 #define UNDNAME_NO_ALLOCATION_LANGUAGE 0x0010
135 #define UNDNAME_NO_MS_THISTYPE 0x0020
136 #define UNDNAME_NO_CV_THISTYPE 0x0040
137 #define UNDNAME_NO_THISTYPE 0x0060
138 #define UNDNAME_NO_ACCESS_SPECIFIERS 0x0080
139 #define UNDNAME_NO_THROW_SIGNATURES 0x0100
140 #define UNDNAME_NO_MEMBER_TYPE 0x0200
141 #define UNDNAME_NO_RETURN_UDT_MODEL 0x0400
142 #define UNDNAME_32_BIT_DECODE 0x0800
143 #define UNDNAME_NAME_ONLY 0x1000
144 #define UNDNAME_NO_ARGUMENTS 0x2000
145 #define UNDNAME_NO_SPECIAL_SYMS 0x4000
147 #define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001
148 #define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002
149 #define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003
150 #define CBA_SYMBOLS_UNLOADED 0x00000004
151 #define CBA_DUPLICATE_SYMBOL 0x00000005
153 /***********************************************************************
157 typedef struct _LOADED_IMAGE
161 PUCHAR MappedAddress;
162 PIMAGE_NT_HEADERS FileHeader;
163 PIMAGE_SECTION_HEADER LastRvaSection;
164 ULONG NumberOfSections;
165 PIMAGE_SECTION_HEADER Sections;
166 ULONG Characteristics;
167 BOOLEAN fSystemImage;
173 } LOADED_IMAGE, *PLOADED_IMAGE;
175 typedef struct _API_VERSION {
180 } API_VERSION, *LPAPI_VERSION;
182 typedef struct _IMAGE_DEBUG_INFORMATION {
187 USHORT Characteristics;
192 DWORD NumberOfSections;
193 PIMAGE_SECTION_HEADER Sections;
195 DWORD ExportedNamesSize;
198 DWORD NumberOfFunctionTableEntries;
199 PIMAGE_FUNCTION_ENTRY FunctionTableEntries;
200 DWORD LowestFunctionStartingAddress;
201 DWORD HighestFunctionEndingAddress;
203 DWORD NumberOfFpoTableEntries;
204 PFPO_DATA FpoTableEntries;
206 DWORD SizeOfCoffSymbols;
207 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols;
209 DWORD SizeOfCodeViewSymbols;
210 PVOID CodeViewSymbols;
219 PIMAGE_DEBUG_DIRECTORY DebugDirectory;
220 DWORD NumberOfDebugDirectories;
223 } IMAGE_DEBUG_INFORMATION, *PIMAGE_DEBUG_INFORMATION;
225 typedef struct _ADDRESS {
229 } ADDRESS, *PADDRESS;
231 typedef struct _ADDRESS64 {
235 } ADDRESS64, *LPADDRESS64;
237 typedef struct _KDHELP {
239 DWORD ThCallbackStack;
242 DWORD KiCallUserMode;
243 DWORD KeUserCallbackDispatcher;
244 DWORD SystemRangeStart;
247 typedef struct _KDHELP64 {
249 DWORD ThCallbackStack;
250 DWORD ThCallbackBStore;
253 DWORD64 KiCallUserMode;
254 DWORD64 KeUserCallbackDispatcher;
255 DWORD64 SystemRangeStart;
257 } KDHELP64, *PKDHELP64;
259 typedef struct _STACKFRAME {
264 PVOID FuncTableEntry;
270 } STACKFRAME, *LPSTACKFRAME;
272 typedef struct _STACKFRAME64 {
274 ADDRESS64 AddrReturn;
277 ADDRESS64 AddrBStore;
278 PVOID FuncTableEntry;
284 } STACKFRAME64, *LPSTACKFRAME64;
286 typedef struct _SOURCEFILE {
289 } SOURCEFILE, *PSOURCEFILE;
291 typedef struct _SOURCEFILEW
295 } SOURCEFILEW, *PSOURCEFILEW;
297 typedef struct _IMAGEHLP_STACK_FRAME
299 DWORD InstructionOffset;
303 DWORD BackingStoreOffset;
304 DWORD FuncTableEntry;
309 } IMAGEHLP_STACK_FRAME, *PIMAGEHLP_STACK_FRAME;
311 typedef VOID IMAGEHLP_CONTEXT, *PIMAGEHLP_CONTEXT;
313 typedef struct _IMAGEHLP_SYMBOL {
319 CHAR Name[ANYSIZE_ARRAY];
320 } IMAGEHLP_SYMBOL, *PIMAGEHLP_SYMBOL;
322 typedef struct _IMAGEHLP_SYMBOLW {
328 WCHAR Name[ANYSIZE_ARRAY];
329 } IMAGEHLP_SYMBOLW, *PIMAGEHLP_SYMBOLW;
331 typedef struct _IMAGEHLP_SYMBOL64
339 } IMAGEHLP_SYMBOL64, *PIMAGEHLP_SYMBOL64;
341 typedef struct _IMAGEHLP_SYMBOLW64
349 } IMAGEHLP_SYMBOLW64, *PIMAGEHLP_SYMBOLW64;
351 typedef struct _IMAGEHLP_MODULE {
361 CHAR LoadedImageName[256];
362 } IMAGEHLP_MODULE, *PIMAGEHLP_MODULE;
364 typedef struct _IMAGEHLP_MODULEW {
372 WCHAR ModuleName[32];
373 WCHAR ImageName[256];
374 WCHAR LoadedImageName[256];
375 } IMAGEHLP_MODULEW, *PIMAGEHLP_MODULEW;
377 typedef struct _IMAGEHLP_MODULE64
388 CHAR LoadedImageName[256];
389 CHAR LoadedPdbName[256];
391 CHAR CVData[MAX_PATH*3];
402 } IMAGEHLP_MODULE64, *PIMAGEHLP_MODULE64;
404 typedef struct _IMAGEHLP_MODULEW64
413 WCHAR ModuleName[32];
414 WCHAR ImageName[256];
415 WCHAR LoadedImageName[256];
416 WCHAR LoadedPdbName[256];
418 WCHAR CVData[MAX_PATH*3];
429 } IMAGEHLP_MODULEW64, *PIMAGEHLP_MODULEW64;
431 typedef struct _IMAGEHLP_LINE {
437 } IMAGEHLP_LINE, *PIMAGEHLP_LINE;
439 typedef struct _IMAGEHLP_LINEW {
445 } IMAGEHLP_LINEW, *PIMAGEHLP_LINEW;
447 typedef struct _IMAGEHLP_LINE64 {
453 } IMAGEHLP_LINE64, *PIMAGEHLP_LINE64;
455 typedef struct _IMAGEHLP_LINEW64 {
461 } IMAGEHLP_LINEW64, *PIMAGEHLP_LINEW64;
463 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD {
468 CHAR FileName[MAX_PATH];
470 } IMAGEHLP_DEFERRED_SYMBOL_LOAD, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
472 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL {
475 PIMAGEHLP_SYMBOL Symbol;
476 ULONG SelectedSymbol;
477 } IMAGEHLP_DUPLICATE_SYMBOL, *PIMAGEHLP_DUPLICATE_SYMBOL;
479 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO
487 TI_GET_ARRAYINDEXTYPEID,
490 TI_GET_ADDRESSOFFSET,
494 TI_GET_CHILDRENCOUNT,
496 TI_GET_VIRTUALBASECLASS,
497 TI_GET_VIRTUALTABLESHAPEID,
498 TI_GET_VIRTUALBASEPOINTEROFFSET,
499 TI_GET_CLASSPARENTID,
502 TI_GET_LEXICALPARENT,
507 TI_GET_CALLING_CONVENTION,
508 } IMAGEHLP_SYMBOL_TYPE_INFO;
510 #define IMAGEHLP_GET_TYPE_INFO_UNCACHED 0x00000001
511 #define IMAGEHLP_GET_TYPE_INFO_CHILDREN 0x00000002
512 typedef struct _IMAGEHLP_GET_TYPE_INFO_PARAMS
520 IMAGEHLP_SYMBOL_TYPE_INFO* ReqKinds;
521 PULONG_PTR ReqOffsets;
524 ULONG_PTR BufferSize;
526 ULONG EntriesMatched;
529 ULONG64 AllReqsValid;
532 } IMAGEHLP_GET_TYPE_INFO_PARAMS, *PIMAGEHLP_GET_TYPE_INFO_PARAMS;
534 #define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
535 #define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER
536 #define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL
537 #define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL
538 #define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER
539 #define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL
540 #define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT
541 #define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION
543 typedef struct _SYMBOL_INFO {
559 } SYMBOL_INFO, *PSYMBOL_INFO;
561 typedef struct _SYMBOL_INFOW
578 } SYMBOL_INFOW, *PSYMBOL_INFOW;
580 #define DBHHEADER_DEBUGDIRS 0x1
581 typedef struct _MODLOAD_DATA
588 } MODLOAD_DATA, *PMODLOAD_DATA;
590 typedef struct _SRCCODEINFO
595 CHAR Obj[MAX_PATH+1];
596 CHAR FileName[MAX_PATH+1];
599 } SRCCODEINFO, *PSRCCODEINFO;
601 typedef struct _SRCCODEINFOW
606 WCHAR Obj[MAX_PATH+1];
607 WCHAR FileName[MAX_PATH+1];
610 } SRCCODEINFOW, *PSRCCODEINFOW;
612 /***********************************************************************
616 typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACK)(
619 typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACKW)(
623 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(
624 PCSTR ModuleName, ULONG ModuleBase, ULONG ModuleSize,
627 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK64)(
628 PCSTR, DWORD64, ULONG, PVOID
630 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACKW64)(
631 PCWSTR, DWORD64, ULONG, PVOID
634 typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(
637 typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACKW)(
638 HANDLE, PCWSTR, PVOID
641 typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACK)(
644 typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACKW)(
645 HANDLE, PCWSTR, PVOID
648 typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACK)(
651 typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACKW)(
655 typedef BOOL (CALLBACK *PIMAGEHLP_STATUS_ROUTINE)(
656 IMAGEHLP_STATUS_REASON Reason, PCSTR ImageName, PCSTR DllName,
657 ULONG_PTR Va, ULONG_PTR Parameter
659 typedef BOOL (CALLBACK *PIMAGEHLP_STATUS_ROUTINE32)(
660 IMAGEHLP_STATUS_REASON Reason, PCSTR ImageName, PCSTR DllName,
661 ULONG Va, ULONG_PTR Parameter
663 typedef BOOL (CALLBACK *PIMAGEHLP_STATUS_ROUTINE64)(
664 IMAGEHLP_STATUS_REASON Reason, PCSTR ImageName, PCSTR DllName,
665 ULONG64 Va, ULONG_PTR Parameter
668 typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(
669 PSYMBOL_INFO pSymInfo, DWORD SymbolSize, PVOID UserContext
671 typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACKW)(
672 PSYMBOL_INFOW pSymInfo, DWORD SymbolSize, PVOID UserContext
675 typedef BOOL (CALLBACK* PSYM_ENUMLINES_CALLBACK)(
678 typedef BOOL (CALLBACK* PSYM_ENUMLINES_CALLBACKW)(
682 typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)(
683 PSOURCEFILE pSourceFile, PVOID UserContext
685 typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACKW)(
686 PSOURCEFILEW pSourceFile, PVOID UserContext
689 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(
690 PCSTR ModuleName, ULONG BaseOfDll, PVOID UserContext
692 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(
693 PCSTR, DWORD64, PVOID
695 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACKW64)(
696 PCWSTR, DWORD64, PVOID
699 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(
700 PCSTR, DWORD, ULONG, PVOID
702 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(
703 PCWSTR, DWORD, ULONG, PVOID
705 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(
706 PCSTR, DWORD64, ULONG, PVOID
708 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)(
709 PCWSTR, DWORD64, ULONG, PVOID
712 typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(
715 typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(
716 HANDLE, ULONG64, ULONG64
719 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(
720 HANDLE hProcess, ULONG ActionCode, PVOID CallbackData,
723 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(
724 HANDLE, ULONG, ULONG64, ULONG64
727 typedef BOOL (CALLBACK *DIGEST_FUNCTION)(
728 DIGEST_HANDLE refdata, PBYTE pData, DWORD dwLength
731 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)(
732 HANDLE hProcess, LPCVOID lpBaseAddress, PVOID lpBuffer,
733 DWORD nSize, PDWORD lpNumberOfBytesRead
736 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE64)(
737 HANDLE hProcess, DWORD64 lpBaseAddress, PVOID lpBuffer,
738 DWORD nSize, LPDWORD lpNumberOfBytesRead
741 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(
742 HANDLE hProcess, DWORD AddrBase
745 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE64)(
746 HANDLE hProcess, DWORD64 AddrBase
749 typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE)(
750 HANDLE hProcess, DWORD ReturnAddress);
752 typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE64)(
753 HANDLE hProcess, DWORD64 ReturnAddress);
755 typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(
756 HANDLE hProcess, HANDLE hThread, PADDRESS lpaddr
759 typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE64)(
760 HANDLE hProcess, HANDLE hThread, LPADDRESS64 lpaddr
764 /***********************************************************************
768 BOOL WINAPI BindImage(
769 PCSTR ImageName, PCSTR DllPath, PCSTR SymbolPath
771 BOOL WINAPI BindImageEx(
772 DWORD Flags, PCSTR ImageName, PCSTR DllPath, PCSTR SymbolPath,
773 PIMAGEHLP_STATUS_ROUTINE StatusRoutine
775 PIMAGE_NT_HEADERS WINAPI CheckSumMappedFile(
776 LPVOID BaseAddress, DWORD FileLength,
777 LPDWORD HeaderSum, LPDWORD CheckSum
779 BOOL WINAPI EnumDirTree(
780 HANDLE, PCSTR, PCSTR, PSTR, PENUMDIRTREE_CALLBACK, PVOID
782 BOOL WINAPI EnumDirTreeW(
783 HANDLE, PCWSTR, PCWSTR, PWSTR, PENUMDIRTREE_CALLBACKW, PVOID
785 BOOL WINAPI EnumerateLoadedModules(
787 PENUMLOADED_MODULES_CALLBACK EnumLoadedModulesCallback,
790 BOOL WINAPI EnumerateLoadedModules64(
791 HANDLE, PENUMLOADED_MODULES_CALLBACK64, PVOID
793 BOOL WINAPI EnumerateLoadedModulesW64(
794 HANDLE, PENUMLOADED_MODULES_CALLBACKW64, PVOID
796 HANDLE WINAPI FindDebugInfoFile(
797 PCSTR FileName, PCSTR SymbolPath, PSTR DebugFilePath
799 HANDLE WINAPI FindDebugInfoFileEx(
800 PCSTR, PCSTR, PSTR, PFIND_DEBUG_FILE_CALLBACK, PVOID
802 HANDLE WINAPI FindDebugInfoFileExW(
803 PCWSTR, PCWSTR, PWSTR, PFIND_DEBUG_FILE_CALLBACKW, PVOID
805 HANDLE WINAPI FindExecutableImage(
808 HANDLE WINAPI FindExecutableImageEx(
809 PCSTR, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID
811 HANDLE WINAPI FindExecutableImageExW(
812 PCWSTR, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW, PVOID
814 BOOL WINAPI FindFileInPath(
815 HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD,
816 PSTR, PFINDFILEINPATHCALLBACK, PVOID
818 BOOL WINAPI GetImageConfigInformation(
819 PLOADED_IMAGE LoadedImage,
820 PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation
822 DWORD WINAPI GetImageUnusedHeaderBytes(
823 PLOADED_IMAGE LoadedImage,
824 LPDWORD SizeUnusedHeaderBytes
826 DWORD WINAPI GetTimestampForLoadedLibrary(
829 BOOL WINAPI ImageAddCertificate(
830 HANDLE FileHandle, LPWIN_CERTIFICATE Certificate, PDWORD Index
832 PVOID WINAPI ImageDirectoryEntryToData(
833 PVOID Base, BOOLEAN MappedAsImage, USHORT DirectoryEntry, PULONG Size
835 BOOL WINAPI ImageEnumerateCertificates(
836 HANDLE FileHandle, WORD TypeFilter, PDWORD CertificateCount,
837 PDWORD Indices, DWORD IndexCount
839 BOOL WINAPI ImageGetCertificateData(
840 HANDLE FileHandle, DWORD CertificateIndex,
841 LPWIN_CERTIFICATE Certificate, PDWORD RequiredLength
843 BOOL WINAPI ImageGetCertificateHeader(
844 HANDLE FileHandle, DWORD CertificateIndex,
845 LPWIN_CERTIFICATE Certificateheader
847 BOOL WINAPI ImageGetDigestStream(
848 HANDLE FileHandle, DWORD DigestLevel,
849 DIGEST_FUNCTION DigestFunction, DIGEST_HANDLE DigestHandle
851 PLOADED_IMAGE WINAPI ImageLoad(
852 PCSTR DllName, PCSTR DllPath
854 PIMAGE_NT_HEADERS WINAPI ImageNtHeader(
857 BOOL WINAPI ImageRemoveCertificate(
858 HANDLE FileHandle, DWORD Index
860 PIMAGE_SECTION_HEADER WINAPI ImageRvaToSection(
861 PIMAGE_NT_HEADERS NtHeaders, PVOID Base, ULONG Rva
863 PVOID WINAPI ImageRvaToVa(
864 PIMAGE_NT_HEADERS NtHeaders, PVOID Base, ULONG Rva,
865 PIMAGE_SECTION_HEADER *LastRvaSection
867 BOOL WINAPI ImageUnload(
868 PLOADED_IMAGE LoadedImage
870 LPAPI_VERSION WINAPI ImagehlpApiVersion(
873 LPAPI_VERSION WINAPI ImagehlpApiVersionEx(
874 LPAPI_VERSION AppVersion
876 BOOL WINAPI MakeSureDirectoryPathExists(
879 BOOL WINAPI MapAndLoad(
880 PCSTR ImageName, PCSTR DllPath, PLOADED_IMAGE LoadedImage,
881 BOOL DotDll, BOOL ReadOnly
883 PIMAGE_DEBUG_INFORMATION WINAPI MapDebugInformation(
884 HANDLE FileHandle, PCSTR FileName,
885 PCSTR SymbolPath, ULONG ImageBase
887 DWORD WINAPI MapFileAndCheckSumA(
888 PCSTR Filename, PDWORD HeaderSum, PDWORD CheckSum
890 DWORD WINAPI MapFileAndCheckSumW(
891 PCWSTR Filename, PDWORD HeaderSum, PDWORD CheckSum
893 BOOL WINAPI ReBaseImage(
894 PCSTR CurrentImageName, PCSTR SymbolPath, BOOL fReBase,
895 BOOL fRebaseSysfileOk, BOOL fGoingDown, ULONG CheckImageSize,
896 ULONG *OldImageSize, ULONG_PTR *OldImageBase, ULONG *NewImageSize,
897 ULONG_PTR *NewImageBase, ULONG TimeStamp
899 BOOL WINAPI ReBaseImage64(
900 PCSTR CurrentImageName, PCSTR SymbolPath, BOOL fReBase,
901 BOOL fRebaseSysfileOk, BOOL fGoingDown, ULONG CheckImageSize,
902 ULONG *OldImageSize, ULONG64 *OldImageBase, ULONG *NewImageSize,
903 ULONG64 *NewImageBase, ULONG TimeStamp
905 BOOL WINAPI RemovePrivateCvSymbolic(
906 PCHAR DebugData, PCHAR *NewDebugData, ULONG *NewDebugSize
908 BOOL WINAPI SearchTreeForFile(
909 PCSTR RootPath, PCSTR InputPathName, PSTR OutputPathBuffer
911 BOOL WINAPI SearchTreeForFileW(
912 PCWSTR RootPath, PCWSTR InputPathName, PWSTR OutputPathBuffer
914 BOOL WINAPI SetImageConfigInformation(
915 PLOADED_IMAGE LoadedImage,
916 PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation
918 BOOL WINAPI SplitSymbols(
919 PSTR ImageName, PCSTR SymbolsPath,
920 PSTR SymbolFilePath, ULONG Flags
922 BOOL WINAPI StackWalk(
923 DWORD MachineType, HANDLE hProcess, HANDLE hThread,
924 LPSTACKFRAME StackFrame, PVOID ContextRecord,
925 PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine,
926 PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,
927 PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine,
928 PTRANSLATE_ADDRESS_ROUTINE TranslateAddress
930 BOOL WINAPI StackWalk64(
931 DWORD MachineType, HANDLE hProcess, HANDLE hThread,
932 LPSTACKFRAME64 StackFrame, PVOID ContextRecord,
933 PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine,
934 PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine,
935 PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine,
936 PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress
938 BOOL WINAPI SymAddSymbol(
939 HANDLE, ULONG64, PCSTR, DWORD64, DWORD, DWORD
941 BOOL WINAPI SymAddSymbolW(
942 HANDLE, ULONG64, PCWSTR, DWORD64, DWORD, DWORD
944 BOOL WINAPI SymCleanup(
947 BOOL WINAPI SymDeleteSymbol(
948 HANDLE, ULONG64, PCSTR, DWORD64, DWORD
950 BOOL WINAPI SymDeleteSymbolW(
951 HANDLE, ULONG64, PCWSTR, DWORD64, DWORD
953 BOOL WINAPI SymEnumerateModules(
954 HANDLE hProcess, PSYM_ENUMMODULES_CALLBACK EnumModulesCallback,
957 BOOL WINAPI SymEnumerateModules64(
958 HANDLE, PSYM_ENUMMODULES_CALLBACK64, PVOID
960 BOOL WINAPI SymEnumerateModulesW64(
961 HANDLE, PSYM_ENUMMODULES_CALLBACKW64, PVOID
963 BOOL WINAPI SymEnumerateSymbols(
964 HANDLE hProcess, DWORD BaseOfDll,
965 PSYM_ENUMSYMBOLS_CALLBACK EnumSymbolsCallback, PVOID UserContext
967 BOOL WINAPI SymEnumerateSymbolsW(
968 HANDLE hProcess, DWORD BaseOfDll,
969 PSYM_ENUMSYMBOLS_CALLBACKW EnumSymbolsCallback, PVOID UserContext
971 BOOL WINAPI SymEnumerateSymbols64(
972 HANDLE, ULONG64, PSYM_ENUMSYMBOLS_CALLBACK64, PVOID
974 BOOL WINAPI SymEnumerateSymbolsW64(
975 HANDLE, ULONG64, PSYM_ENUMSYMBOLS_CALLBACK64W, PVOID
977 BOOL WINAPI SymEnumLines(
978 HANDLE, ULONG64, PCSTR, PCSTR, PSYM_ENUMLINES_CALLBACK, PVOID
980 BOOL WINAPI SymEnumLinesW(
981 HANDLE, ULONG64, PCWSTR, PCWSTR, PSYM_ENUMLINES_CALLBACKW, PVOID
983 BOOL WINAPI SymEnumSourceFiles(
984 HANDLE hProcess, ULONG64 ModBase, PCSTR Mask,
985 PSYM_ENUMSOURCEFILES_CALLBACK cbSrcFiles, PVOID UserContext
987 BOOL WINAPI SymEnumSourceFilesW(
988 HANDLE hProcess, ULONG64 ModBase, PCWSTR Mask,
989 PSYM_ENUMSOURCEFILES_CALLBACKW cbSrcFiles, PVOID UserContext
991 BOOL WINAPI SymEnumSourceLines(
992 HANDLE, ULONG64, PCSTR, PCSTR, DWORD, DWORD, PSYM_ENUMLINES_CALLBACK, PVOID
994 BOOL WINAPI SymEnumSourceLinesW(
995 HANDLE, ULONG64, PCWSTR, PCWSTR, DWORD, DWORD, PSYM_ENUMLINES_CALLBACKW, PVOID
997 BOOL WINAPI SymEnumSymbols(
998 HANDLE hProcess, DWORD BaseOfDll, PCSTR Mask,
999 PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback, PVOID UserContext
1001 BOOL WINAPI SymEnumSymbolsW(
1002 HANDLE hProcess, DWORD BaseOfDll, PCWSTR Mask,
1003 PSYM_ENUMERATESYMBOLS_CALLBACKW EnumSymbolsCallback, PVOID UserContext
1005 BOOL WINAPI SymEnumSymbolsForAddr(
1006 HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID
1008 BOOL WINAPI SymEnumSymbolsForAddrW(
1009 HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID
1011 BOOL WINAPI SymEnumTypes(
1012 HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID
1014 BOOL WINAPI SymEnumTypesW(
1015 HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID
1017 HANDLE WINAPI SymFindExecutableImage(
1018 HANDLE, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID
1020 HANDLE WINAPI SymFindExecutableImageW(
1021 HANDLE, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW, PVOID
1023 BOOL WINAPI SymFindFileInPath(
1024 HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD,
1025 PSTR, PFINDFILEINPATHCALLBACK, PVOID
1027 BOOL WINAPI SymFindFileInPathW(
1028 HANDLE, PCWSTR, PCWSTR, PVOID, DWORD, DWORD, DWORD,
1029 PWSTR, PFINDFILEINPATHCALLBACKW, PVOID
1031 BOOL WINAPI SymFromAddr(
1032 HANDLE, DWORD64, DWORD64*, SYMBOL_INFO*
1034 BOOL WINAPI SymFromAddrW(
1035 HANDLE, DWORD64, DWORD64*, SYMBOL_INFOW*
1037 BOOL WINAPI SymFromIndex(
1038 HANDLE, ULONG64, DWORD, PSYMBOL_INFO
1040 BOOL WINAPI SymFromIndexW(
1041 HANDLE, ULONG64, DWORD, PSYMBOL_INFOW
1043 BOOL WINAPI SymFromName(
1044 HANDLE, PCSTR, PSYMBOL_INFO
1046 BOOL WINAPI SymFromNameW(
1047 HANDLE, PCWSTR, PSYMBOL_INFOW
1049 BOOL WINAPI SymFromToken(
1050 HANDLE, DWORD64, DWORD, PSYMBOL_INFO
1052 BOOL WINAPI SymFromTokenW(
1053 HANDLE, DWORD64, DWORD, PSYMBOL_INFOW
1055 PVOID WINAPI SymFunctionTableAccess(
1056 HANDLE hProcess, DWORD AddrBase
1058 PVOID WINAPI SymFunctionTableAccess64(
1059 HANDLE hProcess, DWORD64 AddrBase
1061 ULONG WINAPI SymGetFileLineOffsets64(
1062 HANDLE, PCSTR, PCSTR, PDWORD64, ULONG
1064 PCHAR WINAPI SymGetHomeDirectory(
1067 PWSTR WINAPI SymGetHomeDirectoryW(
1068 DWORD, PWSTR, size_t
1070 BOOL WINAPI SymGetLineFromAddr(
1071 HANDLE, DWORD, PDWORD, PIMAGEHLP_LINE
1073 BOOL WINAPI SymGetLineFromAddrW(
1074 HANDLE, DWORD, PDWORD, PIMAGEHLP_LINEW
1076 BOOL WINAPI SymGetLineFromAddr64(
1077 HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINE64
1079 BOOL WINAPI SymGetLineFromAddrW64(
1080 HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINEW64
1082 BOOL WINAPI SymGetLineFromName(
1083 HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE
1085 BOOL WINAPI SymGetLineFromName64(
1086 HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE64
1088 BOOL WINAPI SymGetLineFromNameW64(
1089 HANDLE, PCWSTR, PCWSTR, DWORD, PLONG, PIMAGEHLP_LINEW64
1091 BOOL WINAPI SymGetLineNext(
1092 HANDLE, PIMAGEHLP_LINE
1094 BOOL WINAPI SymGetLineNextW(
1095 HANDLE, PIMAGEHLP_LINEW
1097 BOOL WINAPI SymGetLineNext64(
1098 HANDLE, PIMAGEHLP_LINE64
1100 BOOL WINAPI SymGetLineNextW64(
1101 HANDLE, PIMAGEHLP_LINEW64
1103 BOOL WINAPI SymGetLinePrev(
1104 HANDLE, PIMAGEHLP_LINE
1106 BOOL WINAPI SymGetLinePrevW(
1107 HANDLE, PIMAGEHLP_LINEW
1109 BOOL WINAPI SymGetLinePrev64(
1110 HANDLE, PIMAGEHLP_LINE64
1112 BOOL WINAPI SymGetLinePrevW64(
1113 HANDLE, PIMAGEHLP_LINEW64
1115 DWORD WINAPI SymGetModuleBase(
1116 HANDLE hProcess, DWORD dwAddr
1118 BOOL WINAPI SymGetModuleInfo(
1119 HANDLE hProcess, DWORD dwAddr,
1120 PIMAGEHLP_MODULE ModuleInfo
1122 BOOL WINAPI SymGetModuleInfoW(
1123 HANDLE, DWORD, PIMAGEHLP_MODULEW
1125 BOOL WINAPI SymGetModuleInfo64(
1126 HANDLE, DWORD64, PIMAGEHLP_MODULE64
1128 BOOL WINAPI SymGetModuleInfoW64(
1129 HANDLE, DWORD64, PIMAGEHLP_MODULEW64
1131 DWORD WINAPI SymGetOptions(
1134 BOOL WINAPI SymGetScope(
1135 HANDLE, ULONG64, DWORD, PSYMBOL_INFO
1137 BOOL WINAPI SymGetScopeW(
1138 HANDLE, ULONG64, DWORD, PSYMBOL_INFOW
1140 BOOL WINAPI SymGetSearchPath(
1141 HANDLE hProcess, PSTR szSearchPath, DWORD SearchPathLength
1143 BOOL WINAPI SymGetSearchPathW(
1144 HANDLE hProcess, PWSTR szSearchPath, DWORD SearchPathLength
1146 BOOL WINAPI SymGetSourceFile(
1147 HANDLE, ULONG64, PCSTR, PCSTR, PSTR, DWORD
1149 BOOL WINAPI SymGetSourceFileW(
1150 HANDLE, ULONG64, PCWSTR, PCWSTR, PWSTR, DWORD
1152 BOOL WINAPI SymGetSourceFileFromToken(
1153 HANDLE, PVOID, PCSTR, PSTR, DWORD
1155 BOOL WINAPI SymGetSourceFileFromTokenW(
1156 HANDLE, PVOID, PCWSTR, PWSTR, DWORD
1158 BOOL WINAPI SymGetSourceFileToken(
1159 HANDLE, ULONG64, PCSTR, PVOID*, DWORD*
1161 BOOL WINAPI SymGetSourceFileTokenW(
1162 HANDLE, ULONG64, PCWSTR, PVOID*, DWORD*
1164 BOOL WINAPI SymGetSourceVarFromToken(
1165 HANDLE, PVOID, PCSTR, PCSTR, PSTR, DWORD
1167 BOOL WINAPI SymGetSourceVarFromTokenW(
1168 HANDLE, PVOID, PCWSTR, PCWSTR, PWSTR, DWORD
1170 BOOL WINAPI SymGetSymFromAddr(
1171 HANDLE hProcess, DWORD dwAddr,
1172 PDWORD pdwDisplacement, PIMAGEHLP_SYMBOL Symbol
1174 BOOL WINAPI SymGetSymFromAddr64(
1175 HANDLE, DWORD64, PDWORD64, PIMAGEHLP_SYMBOL64
1177 BOOL WINAPI SymGetSymFromName(
1178 HANDLE hProcess, PCSTR Name, PIMAGEHLP_SYMBOL Symbol
1180 BOOL WINAPI SymGetSymFromName64(
1181 HANDLE, PCSTR, PIMAGEHLP_SYMBOL64
1183 BOOL WINAPI SymGetSymNext(
1184 HANDLE hProcess, PIMAGEHLP_SYMBOL Symbol
1186 BOOL WINAPI SymGetSymNext64(
1187 HANDLE, PIMAGEHLP_SYMBOL64
1189 BOOL WINAPI SymGetSymPrev(
1190 HANDLE hProcess, PIMAGEHLP_SYMBOL Symbol
1192 BOOL WINAPI SymGetSymPrev64(
1193 HANDLE, PIMAGEHLP_SYMBOL64
1195 BOOL WINAPI SymGetTypeFromName(
1196 HANDLE, ULONG64, PCSTR, PSYMBOL_INFO
1198 BOOL WINAPI SymGetTypeFromNameW(
1199 HANDLE, ULONG64, PCWSTR, PSYMBOL_INFOW
1201 BOOL WINAPI SymGetTypeInfo(
1202 HANDLE, DWORD64, ULONG, IMAGEHLP_SYMBOL_TYPE_INFO, PVOID
1204 BOOL WINAPI SymGetTypeInfoEx(
1205 HANDLE, DWORD64, PIMAGEHLP_GET_TYPE_INFO_PARAMS
1207 BOOL WINAPI SymInitialize(
1208 HANDLE hProcess, PCSTR UserSearchPath, BOOL fInvadeProcess
1210 BOOL WINAPI SymInitializeW(
1211 HANDLE hProcess, PCWSTR UserSearchPath, BOOL fInvadeProcess
1213 DWORD WINAPI SymLoadModule(
1214 HANDLE hProcess, HANDLE hFile, PCSTR ImageName, PCSTR ModuleName,
1215 DWORD BaseOfDll, DWORD SizeOfDll
1217 DWORD64 WINAPI SymLoadModule64(
1218 HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD
1220 DWORD64 WINAPI SymLoadModuleEx(
1221 HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD, PMODLOAD_DATA, DWORD
1223 DWORD64 WINAPI SymLoadModuleExW(
1224 HANDLE, HANDLE, PCWSTR, PCWSTR, DWORD64, DWORD, PMODLOAD_DATA, DWORD
1226 BOOL WINAPI SymMatchFileName(
1227 PCSTR, PCSTR, PSTR*, PSTR*
1229 BOOL WINAPI SymMatchFileNameW(
1230 PCWSTR, PCWSTR, PWSTR*, PWSTR*
1232 BOOL WINAPI SymMatchString(
1235 BOOL WINAPI SymMatchStringA(
1238 BOOL WINAPI SymMatchStringW(
1239 PCWSTR, PCWSTR, BOOL
1241 BOOL WINAPI SymRegisterCallback(
1242 HANDLE hProcess, PSYMBOL_REGISTERED_CALLBACK CallbackFunction,
1245 BOOL WINAPI SymRegisterCallback64(
1246 HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64
1248 BOOL WINAPI SymRegisterCallbackW64(
1249 HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64
1251 BOOL WINAPI SymRegisterFunctionEntryCallback(
1252 HANDLE, PSYMBOL_FUNCENTRY_CALLBACK, PVOID
1254 BOOL WINAPI SymRegisterFunctionEntryCallback64(
1255 HANDLE, PSYMBOL_FUNCENTRY_CALLBACK64, ULONG64
1257 BOOL WINAPI SymSearch(
1258 HANDLE, ULONG64, DWORD, DWORD, PCSTR, DWORD64,
1259 PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID, DWORD
1261 BOOL WINAPI SymSearchW(
1262 HANDLE, ULONG64, DWORD, DWORD, PCWSTR, DWORD64,
1263 PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID, DWORD
1265 DWORD WINAPI SymSetContext(
1266 HANDLE hProcess, PIMAGEHLP_STACK_FRAME StackFrame,
1267 PIMAGEHLP_CONTEXT Context
1269 PCHAR WINAPI SymSetHomeDirectory(
1272 PWSTR WINAPI SymSetHomeDirectoryW(
1275 DWORD WINAPI SymSetOptions(
1278 BOOL WINAPI SymSetParentWindow(
1281 BOOL WINAPI SymSetSearchPath(
1282 HANDLE hProcess, PCSTR szSearchPath
1284 BOOL WINAPI SymUnDName(
1285 PIMAGEHLP_SYMBOL sym, PSTR UnDecName, DWORD UnDecNameLength
1287 BOOL WINAPI SymUnDName64(
1288 PIMAGEHLP_SYMBOL64, PSTR, DWORD
1290 BOOL WINAPI SymUnloadModule(
1291 HANDLE hProcess, DWORD BaseOfDll
1293 BOOL WINAPI TouchFileTimes(
1294 HANDLE FileHandle, LPSYSTEMTIME lpSystemTime
1296 DWORD WINAPI UnDecorateSymbolName(
1297 PCSTR DecoratedName, PSTR UnDecoratedName,
1298 DWORD UndecoratedLength, DWORD Flags
1300 DWORD WINAPI UnDecorateSymbolNameW(
1301 PCWSTR DecoratedName, PWSTR UnDecoratedName,
1302 DWORD UndecoratedLength, DWORD Flags
1304 BOOL WINAPI UnMapAndLoad(
1305 PLOADED_IMAGE LoadedImage
1307 BOOL WINAPI UnmapDebugInformation(
1308 PIMAGE_DEBUG_INFORMATION DebugInfo
1310 BOOL WINAPI UpdateDebugInfoFile(
1311 PCSTR ImageFileName, PCSTR SymbolPath,
1312 PSTR DebugFilePath, PIMAGE_NT_HEADERS32 NtHeaders
1314 BOOL WINAPI UpdateDebugInfoFileEx(
1315 PCSTR ImageFileName, PCSTR SymbolPath, PSTR DebugFilePath,
1316 PIMAGE_NT_HEADERS32 NtHeaders, DWORD OldChecksum
1321 #endif /* defined(__cplusplus) */
1323 #endif /* __WINE_IMAGEHLP_H */