JwaImageHlp.pas
资源名称:win32api.zip [点击查看]
上传用户:davidchvip
上传日期:2009-07-28
资源大小:1749k
文件大小:143k
源码类别:
Windows编程
开发平台:
Delphi
- {******************************************************************************}
- { }
- { Image Help API interface Unit for Object Pascal }
- { }
- { Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
- { Corporation. All Rights Reserved. }
- { }
- { The original file is: imagehlp.h, released August 2001. The original Pascal }
- { code is: ImageHelp.pas, released December 2000. The initial developer of the }
- { Pascal code is Marcel van Brakel (brakelm@chello.nl). }
- { }
- { Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
- { Marcel van Brakel. All Rights Reserved. }
- { }
- { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
- { }
- { You may retrieve the latest version of this file at the Project JEDI home }
- { page, located at http://delphi-jedi.org or my personal homepage located at }
- { http://members.chello.nl/m.vanbrakel2 }
- { }
- { The contents of this file are used with permission, subject to the Mozilla }
- { Public License Version 1.1 (the "License"); you may not use this file except }
- { in compliance with the License. You may obtain a copy of the License at }
- { http://www.mozilla.org/MPL/MPL-1.1.html }
- { }
- { Software distributed under the License is distributed on an "AS IS" basis, }
- { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
- { the specific language governing rights and limitations under the License. }
- { }
- { Alternatively, the contents of this file may be used under the terms of the }
- { GNU Lesser General Public License (the "LGPL License"), in which case the }
- { provisions of the LGPL License are applicable instead of those above. }
- { If you wish to allow use of your version of this file only under the terms }
- { of the LGPL License and not to allow others to use your version of this file }
- { under the MPL, indicate your decision by deleting the provisions above and }
- { replace them with the notice and other provisions required by the LGPL }
- { License. If you do not delete the provisions above, a recipient may use }
- { your version of this file under either the MPL or the LGPL License. }
- { }
- { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
- { }
- {******************************************************************************}
- unit JwaImageHlp;
- {$WEAKPACKAGEUNIT}
- {$HPPEMIT ''}
- {$HPPEMIT '#include "ImageHlp.h"'}
- {$HPPEMIT ''}
- {$I WINDEFINES.INC}
- interface
- uses
- Windows, JwaWinBase, JwaWinNT, JwaWinType;
- const
- IMAGE_SEPARATION = (64*1024);
- {$EXTERNALSYM IMAGE_SEPARATION}
- type
- PLOADED_IMAGE = ^LOADED_IMAGE;
- {$EXTERNALSYM PLOADED_IMAGE}
- _LOADED_IMAGE = record
- ModuleName: PSTR;
- hFile: HANDLE;
- MappedAddress: PUCHAR;
- FileHeader: PIMAGE_NT_HEADERS32;
- LastRvaSection: PIMAGE_SECTION_HEADER;
- NumberOfSections: ULONG;
- Sections: PIMAGE_SECTION_HEADER;
- Characteristics: ULONG;
- fSystemImage: ByteBool;
- fDOSImage: ByteBool;
- Links: LIST_ENTRY;
- SizeOfImage: ULONG;
- end;
- {$EXTERNALSYM _LOADED_IMAGE}
- LOADED_IMAGE = _LOADED_IMAGE;
- {$EXTERNALSYM LOADED_IMAGE}
- TLoadedImage = LOADED_IMAGE;
- PLoadedImage = PLOADED_IMAGE;
- const
- MAX_SYM_NAME = 2000;
- {$EXTERNALSYM MAX_SYM_NAME}
- function BindImage(ImageName, DllPath, SymbolPath: PSTR): BOOL; stdcall;
- {$EXTERNALSYM BindImage}
- type
- _IMAGEHLP_STATUS_REASON = (
- BindOutOfMemory,
- BindRvaToVaFailed,
- BindNoRoomInImage,
- BindImportModuleFailed,
- BindImportProcedureFailed,
- BindImportModule,
- BindImportProcedure,
- BindForwarder,
- BindForwarderNOT,
- BindImageModified,
- BindExpandFileHeaders,
- BindImageComplete,
- BindMismatchedSymbols,
- BindSymbolsNotUpdated,
- BindImportProcedure32,
- BindImportProcedure64,
- BindForwarder32,
- BindForwarder64,
- BindForwarderNOT32,
- BindForwarderNOT64);
- {$EXTERNALSYM _IMAGEHLP_STATUS_REASON}
- IMAGEHLP_STATUS_REASON = _IMAGEHLP_STATUS_REASON;
- {$EXTERNALSYM IMAGEHLP_STATUS_REASON}
- TImageHlpStatusReason = IMAGEHLP_STATUS_REASON;
- PIMAGEHLP_STATUS_ROUTINE = function (Reason: IMAGEHLP_STATUS_REASON;
- ImageName, DllName: PSTR; Va, Parameter: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM PIMAGEHLP_STATUS_ROUTINE}
- PImageHlpStatusRoutine = PIMAGEHLP_STATUS_ROUTINE;
- PIMAGEHLP_STATUS_ROUTINE32 = function (Reason: IMAGEHLP_STATUS_REASON; ImageName, DllName: PSTR;
- Va: ULONG; Parameter: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM PIMAGEHLP_STATUS_ROUTINE32}
- PImageHlpStatusRoutine23 = PIMAGEHLP_STATUS_ROUTINE32;
- PIMAGEHLP_STATUS_ROUTINE64 = function (Reason: IMAGEHLP_STATUS_REASON; ImageName, DllName: PSTR;
- Va: ULONG64; Parameter: ULONG_PTR): BOOL; stdcall;
- {$EXTERNALSYM PIMAGEHLP_STATUS_ROUTINE64}
- PImageHlpStatusRoutine64 = PIMAGEHLP_STATUS_ROUTINE64;
- function BindImageEx(Flags: DWORD; ImageName, DllPath, SymbolPath: PSTR;
- StatusRoutine: PIMAGEHLP_STATUS_ROUTINE): BOOL; stdcall;
- {$EXTERNALSYM BindImageEx}
- const
- BIND_NO_BOUND_IMPORTS = $00000001;
- {$EXTERNALSYM BIND_NO_BOUND_IMPORTS}
- BIND_NO_UPDATE = $00000002;
- {$EXTERNALSYM BIND_NO_UPDATE}
- BIND_ALL_IMAGES = $00000004;
- {$EXTERNALSYM BIND_ALL_IMAGES}
- BIND_CACHE_IMPORT_DLLS = $00000008; // Cache dll's across calls to BindImageEx (same as NT 3.1->NT 4.0)
- {$EXTERNALSYM BIND_CACHE_IMPORT_DLLS}
- BIND_REPORT_64BIT_VA = $00000010;
- {$EXTERNALSYM BIND_REPORT_64BIT_VA}
- function ReBaseImage(CurrentImageName: PSTR; SymbolPath: PSTR; fReBase: BOOL;
- fRebaseSysfileOk: BOOL; fGoingDown: BOOL; CheckImageSize: ULONG;
- var OldImageSize: ULONG; var OldImageBase: ULONG_PTR; var NewImageSize: ULONG;
- var NewImageBase: ULONG_PTR; TimeStamp: ULONG): BOOL; stdcall;
- {$EXTERNALSYM ReBaseImage}
- function ReBaseImage64(CurrentImageName: PSTR; SymbolPath: PSTR; fReBase: BOOL;
- fRebaseSysfileOk: BOOL; fGoingDown: BOOL; CheckImageSize: ULONG;
- var OldImageSize: ULONG; var OldImageBase: ULONG64; var NewImageSize: ULONG;
- var NewImageBase: ULONG64; TimeStamp: ULONG): BOOL; stdcall;
- {$EXTERNALSYM ReBaseImage64}
- //
- // Define checksum return codes.
- //
- const
- CHECKSUM_SUCCESS = 0;
- {$EXTERNALSYM CHECKSUM_SUCCESS}
- CHECKSUM_OPEN_FAILURE = 1;
- {$EXTERNALSYM CHECKSUM_OPEN_FAILURE}
- CHECKSUM_MAP_FAILURE = 2;
- {$EXTERNALSYM CHECKSUM_MAP_FAILURE}
- CHECKSUM_MAPVIEW_FAILURE = 3;
- {$EXTERNALSYM CHECKSUM_MAPVIEW_FAILURE}
- CHECKSUM_UNICODE_FAILURE = 4;
- {$EXTERNALSYM CHECKSUM_UNICODE_FAILURE}
- // Define Splitsym flags.
- SPLITSYM_REMOVE_PRIVATE = $00000001; // Remove CV types/symbols and Fixup debug
- {$EXTERNALSYM SPLITSYM_REMOVE_PRIVATE}
- // Used for creating .dbg files that ship
- // as part of the product.
- SPLITSYM_EXTRACT_ALL = $00000002; // Extract all debug info from image.
- {$EXTERNALSYM SPLITSYM_EXTRACT_ALL}
- // Normally, FPO is left in the image
- // to allow stack traces through the code.
- // Using this switch is similar to linking
- // with -debug:none except the .dbg file
- // exists...
- SPLITSYM_SYMBOLPATH_IS_SRC = $00000004; // The SymbolFilePath contains an alternate
- {$EXTERNALSYM SPLITSYM_SYMBOLPATH_IS_SRC}
- // path to locate the pdb.
- //
- // Define checksum function prototypes.
- //
- function CheckSumMappedFile(BaseAddress: PVOID; FileLength: DWORD;
- var HeaderSum, CheckSum: DWORD): PIMAGE_NT_HEADERS; stdcall;
- {$EXTERNALSYM CheckSumMappedFile}
- function MapFileAndCheckSumA(Filename: PSTR; var HeaderSum, CheckSum: DWORD): DWORD; stdcall;
- {$EXTERNALSYM MapFileAndCheckSumA}
- function MapFileAndCheckSumW(Filename: PWSTR; var HeaderSum, CheckSum: DWORD): DWORD; stdcall;
- {$EXTERNALSYM MapFileAndCheckSumW}
- {$IFDEF UNICODE}
- function MapFileAndCheckSum(Filename: PWSTR; var HeaderSum, CheckSum: DWORD): DWORD; stdcall;
- {$EXTERNALSYM MapFileAndCheckSum}
- {$ELSE}
- function MapFileAndCheckSum(Filename: PSTR; var HeaderSum, CheckSum: DWORD): DWORD; stdcall;
- {$EXTERNALSYM MapFileAndCheckSum}
- {$ENDIF}
- function GetImageConfigInformation(const LoadedImage: LOADED_IMAGE;
- var ImageConfigInformation: IMAGE_LOAD_CONFIG_DIRECTORY): BOOL; stdcall;
- {$EXTERNALSYM GetImageConfigInformation}
- function GetImageUnusedHeaderBytes(const LoadedImage: LOADED_IMAGE;
- var SizeUnusedHeaderBytes: DWORD): DWORD; stdcall;
- {$EXTERNALSYM GetImageUnusedHeaderBytes}
- function SetImageConfigInformation(const LoadedImage: LOADED_IMAGE;
- const ImageConfigInformation: IMAGE_LOAD_CONFIG_DIRECTORY): BOOL; stdcall;
- {$EXTERNALSYM SetImageConfigInformation}
- // Image Integrity API's
- const
- CERT_PE_IMAGE_DIGEST_DEBUG_INFO = $01;
- {$EXTERNALSYM CERT_PE_IMAGE_DIGEST_DEBUG_INFO}
- CERT_PE_IMAGE_DIGEST_RESOURCES = $02;
- {$EXTERNALSYM CERT_PE_IMAGE_DIGEST_RESOURCES}
- CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO = $04;
- {$EXTERNALSYM CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO}
- CERT_PE_IMAGE_DIGEST_NON_PE_INFO = $08; // include data outside the PE image
- {$EXTERNALSYM CERT_PE_IMAGE_DIGEST_NON_PE_INFO}
- CERT_SECTION_TYPE_ANY = $FF; // Any Certificate type
- {$EXTERNALSYM CERT_SECTION_TYPE_ANY}
- type
- DIGEST_HANDLE = PVOID;
- {$EXTERNALSYM DIGEST_HANDLE}
- TDigestHandle = DIGEST_HANDLE;
- DIGEST_FUNCTION = function (refdata: DIGEST_HANDLE; pData: PBYTE; dwLength: DWORD): BOOL; stdcall;
- {$EXTERNALSYM DIGEST_FUNCTION}
- TDigestFunction = DIGEST_FUNCTION;
- function ImageGetDigestStream(FileHandle: HANDLE; DigestLevel: DWORD;
- DigestFunction: DIGEST_FUNCTION; DigestHandle: DIGEST_HANDLE): BOOL; stdcall;
- {$EXTERNALSYM ImageGetDigestStream}
- function ImageAddCertificate(FileHandle: HANDLE; Certificate: PWinCertificate;
- var Index: DWORD): BOOL; stdcall;
- {$EXTERNALSYM ImageAddCertificate}
- function ImageRemoveCertificate(FileHandle: HANDLE; Index: DWORD): BOOL; stdcall;
- {$EXTERNALSYM ImageRemoveCertificate}
- function ImageEnumerateCertificates(FileHandle: HANDLE; TypeFilter: WORD;
- var CertificateCount: DWORD; Indices: PDWORD; IndexCount: DWORD): BOOL; stdcall;
- {$EXTERNALSYM ImageEnumerateCertificates}
- function ImageGetCertificateData(FileHandle: HANDLE; CertificateIndex: DWORD;
- Certificate: PWinCertificate; var RequiredLength: DWORD): BOOL; stdcall;
- {$EXTERNALSYM ImageGetCertificateData}
- function ImageGetCertificateHeader(FileHandle: HANDLE; CertificateIndex: DWORD;
- Certificateheader: PWinCertificate): BOOL; stdcall;
- {$EXTERNALSYM ImageGetCertificateHeader}
- function ImageLoad(DllName: PSTR; DllPath: PSTR): PLOADED_IMAGE; stdcall;
- {$EXTERNALSYM ImageLoad}
- function ImageUnload(const LoadedImage: LOADED_IMAGE): BOOL; stdcall;
- {$EXTERNALSYM ImageUnload}
- function MapAndLoad(ImageName, DllPath: PSTR; var LoadedImage: LOADED_IMAGE;
- DotDll: BOOL; ReadOnly: BOOL): BOOL; stdcall;
- {$EXTERNALSYM MapAndLoad}
- function UnMapAndLoad(const LoadedImage: LOADED_IMAGE): BOOL; stdcall;
- {$EXTERNALSYM UnMapAndLoad}
- function TouchFileTimes(FileHandle: HANDLE; pSystemTime: PSYSTEMTIME): BOOL; stdcall;
- {$EXTERNALSYM TouchFileTimes}
- function SplitSymbols(ImageName, SymbolsPath, SymbolFilePath: PSTR; Flags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SplitSymbols}
- function UpdateDebugInfoFile(ImageFileName, SymbolPath, DebugFilePath: PSTR;
- const NtHeaders: IMAGE_NT_HEADERS32): BOOL; stdcall;
- {$EXTERNALSYM UpdateDebugInfoFile}
- function UpdateDebugInfoFileEx(ImageFileName, SymbolPath, DebugFilePath: PSTR;
- const NtHeaders: IMAGE_NT_HEADERS32; OldChecksum: DWORD): BOOL; stdcall;
- {$EXTERNALSYM UpdateDebugInfoFileEx}
- function FindDebugInfoFile(FileName, SymbolPath, DebugFilePath: PSTR): HANDLE; stdcall;
- {$EXTERNALSYM FindDebugInfoFile}
- type
- PFIND_DEBUG_FILE_CALLBACK = function (FileHandle: HANDLE; FileName: PSTR;
- CallerData: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PFIND_DEBUG_FILE_CALLBACK}
- PFindDebugFileCallback = PFIND_DEBUG_FILE_CALLBACK;
- function FindDebugInfoFileEx(FileName, SymbolPath, DebugFilePath: PSTR;
- Callback: PFIND_DEBUG_FILE_CALLBACK; CallerData: PVOID): HANDLE; stdcall;
- {$EXTERNALSYM FindDebugInfoFileEx}
- type
- PFINDFILEINPATHCALLBACK = function (filename: PSTR; context: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PFINDFILEINPATHCALLBACK}
- function SymFindFileInPath(hprocess: HANDLE; SearchPath, FileName: LPSTR; id: PVOID; two, three, flags: DWORD;
- FoundFile: LPSTR; callback: PFINDFILEINPATHCALLBACK; context: PVOID): BOOL; stdcall;
- {$EXTERNALSYM SymFindFileInPath}
- function FindExecutableImage(FileName, SymbolPath, ImageFilePath: PSTR): HANDLE; stdcall;
- {$EXTERNALSYM FindExecutableImage}
- type
- PFIND_EXE_FILE_CALLBACK = function (FileHandle: HANDLE; FileName: PSTR;
- CallerData: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PFIND_EXE_FILE_CALLBACK}
- PFindExeFileCallback = PFIND_EXE_FILE_CALLBACK;
- function FindExecutableImageEx(FileName, SymbolPath, ImageFilePath: PSTR;
- Callback: PFIND_EXE_FILE_CALLBACK; CallerData: PVOID): HANDLE; stdcall;
- {$EXTERNALSYM FindExecutableImageEx}
- function ImageNtHeader(Base: PVOID): PIMAGE_NT_HEADERS; stdcall;
- {$EXTERNALSYM ImageNtHeader}
- function ImageDirectoryEntryToDataEx(Base: PVOID; MappedAsImage: ByteBool;
- DirectoryEntry: USHORT; var Size: ULONG; var FoundHeader: PIMAGE_SECTION_HEADER): PVOID; stdcall;
- {$EXTERNALSYM ImageDirectoryEntryToDataEx}
- function ImageDirectoryEntryToData(Base: PVOID; MappedAsImage: ByteBool;
- DirectoryEntry: USHORT; var Size: ULONG): PVOID; stdcall;
- {$EXTERNALSYM ImageDirectoryEntryToData}
- function ImageRvaToSection(NtHeaders: PIMAGE_NT_HEADERS; Base: PVOID; Rva: ULONG): PIMAGE_SECTION_HEADER; stdcall;
- {$EXTERNALSYM ImageRvaToSection}
- function ImageRvaToVa(NtHeaders: PIMAGE_NT_HEADERS; Base: PVOID; Rva: ULONG;
- var LastRvaSection: PIMAGE_SECTION_HEADER): PVOID; stdcall;
- {$EXTERNALSYM ImageRvaToVa}
- // Symbol server exports
- type
- PSYMBOLSERVERPROC = function (a1, a2: LPCSTR; a3: PVOID; a4, a5: DWORD; a6: LPSTR): BOOL; stdcall;
- {$EXTERNALSYM PSYMBOLSERVERPROC}
- PSYMBOLSERVEROPENPROC = function: BOOL; stdcall;
- {$EXTERNALSYM PSYMBOLSERVEROPENPROC}
- PSYMBOLSERVERCLOSEPROC = function: BOOL; stdcall;
- {$EXTERNALSYM PSYMBOLSERVERCLOSEPROC}
- PSYMBOLSERVERSETOPTIONSPROC = function (a1: UINT_PTR; a2: ULONG64): BOOL; stdcall;
- {$EXTERNALSYM PSYMBOLSERVERSETOPTIONSPROC}
- PSYMBOLSERVERCALLBACKPROC = function (action: UINT_PTR; data: ULONG64; context: ULONG64): BOOL; stdcall;
- {$EXTERNALSYM PSYMBOLSERVERCALLBACKPROC}
- PSYMBOLSERVERGETOPTIONSPROC = function: UINT_PTR; stdcall;
- {$EXTERNALSYM PSYMBOLSERVERGETOPTIONSPROC}
- PSYMBOLSERVERPINGPROC = function (a1: LPCSTR): BOOL; stdcall;
- {$EXTERNALSYM PSYMBOLSERVERPINGPROC}
- const
- SSRVOPT_CALLBACK = $01;
- {$EXTERNALSYM SSRVOPT_CALLBACK}
- SSRVOPT_DWORD = $02;
- {$EXTERNALSYM SSRVOPT_DWORD}
- SSRVOPT_DWORDPTR = $04;
- {$EXTERNALSYM SSRVOPT_DWORDPTR}
- SSRVOPT_GUIDPTR = $08;
- {$EXTERNALSYM SSRVOPT_GUIDPTR}
- SSRVOPT_OLDGUIDPTR = $10;
- {$EXTERNALSYM SSRVOPT_OLDGUIDPTR}
- SSRVOPT_UNATTENDED = $20;
- {$EXTERNALSYM SSRVOPT_UNATTENDED}
- SSRVOPT_RESET = ULONG_PTR(-1);
- {$EXTERNALSYM SSRVOPT_RESET}
- SSRVACTION_TRACE = 1;
- {$EXTERNALSYM SSRVACTION_TRACE}
- // This api won't be ported to Win64 - Fix your code.
- type
- PIMAGE_DEBUG_INFORMATION = ^IMAGE_DEBUG_INFORMATION;
- {$EXTERNALSYM PIMAGE_DEBUG_INFORMATION}
- _IMAGE_DEBUG_INFORMATION = record
- List: LIST_ENTRY;
- ReservedSize: DWORD;
- ReservedMappedBase: PVOID;
- ReservedMachine: USHORT;
- ReservedCharacteristics: USHORT;
- ReservedCheckSum: DWORD;
- ImageBase: DWORD;
- SizeOfImage: DWORD;
- ReservedNumberOfSections: DWORD;
- ReservedSections: PIMAGE_SECTION_HEADER;
- ReservedExportedNamesSize: DWORD;
- ReservedExportedNames: PSTR;
- ReservedNumberOfFunctionTableEntries: DWORD;
- ReservedFunctionTableEntries: PIMAGE_FUNCTION_ENTRY;
- ReservedLowestFunctionStartingAddress: DWORD;
- ReservedHighestFunctionEndingAddress: DWORD;
- ReservedNumberOfFpoTableEntries: DWORD;
- ReservedFpoTableEntries: PFPO_DATA;
- SizeOfCoffSymbols: DWORD;
- CoffSymbols: PIMAGE_COFF_SYMBOLS_HEADER;
- ReservedSizeOfCodeViewSymbols: DWORD;
- ReservedCodeViewSymbols: PVOID;
- ImageFilePath: PSTR;
- ImageFileName: PSTR;
- ReservedDebugFilePath: PSTR;
- ReservedTimeDateStamp: DWORD;
- ReservedRomImage: BOOL;
- ReservedDebugDirectory: PIMAGE_DEBUG_DIRECTORY;
- ReservedNumberOfDebugDirectories: DWORD;
- ReservedOriginalFunctionTableBaseAddress: DWORD;
- Reserved: array [0..1] of DWORD;
- end;
- {$EXTERNALSYM _IMAGE_DEBUG_INFORMATION}
- IMAGE_DEBUG_INFORMATION = _IMAGE_DEBUG_INFORMATION;
- {$EXTERNALSYM IMAGE_DEBUG_INFORMATION}
- TImageDebugInformation = IMAGE_DEBUG_INFORMATION;
- PImageDebugInformation = PIMAGE_DEBUG_INFORMATION;
- function MapDebugInformation(FileHandle: HANDLE; FileName, SymbolPath: PSTR;
- ImageBase: DWORD): PIMAGE_DEBUG_INFORMATION; stdcall;
- {$EXTERNALSYM MapDebugInformation}
- function UnmapDebugInformation(DebugInfo: PIMAGE_DEBUG_INFORMATION): BOOL; stdcall;
- {$EXTERNALSYM UnmapDebugInformation}
- function SearchTreeForFile(RootPath, InputPathName, OutputPathBuffer: PSTR): BOOL; stdcall;
- {$EXTERNALSYM SearchTreeForFile}
- type
- PENUMDIRTREE_CALLBACK = function (FilePath: LPCSTR; CallerData: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PENUMDIRTREE_CALLBACK}
- PEnumDirTreeCallback = PENUMDIRTREE_CALLBACK;
- function EnumDirTree(hProcess: HANDLE; RootPath, InputPathName, OutputPathBuffer: PSTR;
- Callback: PENUMDIRTREE_CALLBACK; CallbackData: PVOID): BOOL; stdcall;
- {$EXTERNALSYM EnumDirTree}
- function MakeSureDirectoryPathExists(DirPath: PCSTR): BOOL; stdcall;
- {$EXTERNALSYM MakeSureDirectoryPathExists}
- //
- // UnDecorateSymbolName Flags
- //
- const
- UNDNAME_COMPLETE = ($0000); // Enable full undecoration
- {$EXTERNALSYM UNDNAME_COMPLETE}
- UNDNAME_NO_LEADING_UNDERSCORES = ($0001); // Remove leading underscores from MS extended keywords
- {$EXTERNALSYM UNDNAME_NO_LEADING_UNDERSCORES}
- UNDNAME_NO_MS_KEYWORDS = ($0002); // Disable expansion of MS extended keywords
- {$EXTERNALSYM UNDNAME_NO_MS_KEYWORDS}
- UNDNAME_NO_FUNCTION_RETURNS = ($0004); // Disable expansion of return type for primary declaration
- {$EXTERNALSYM UNDNAME_NO_FUNCTION_RETURNS}
- UNDNAME_NO_ALLOCATION_MODEL = ($0008); // Disable expansion of the declaration model
- {$EXTERNALSYM UNDNAME_NO_ALLOCATION_MODEL}
- UNDNAME_NO_ALLOCATION_LANGUAGE = ($0010); // Disable expansion of the declaration language specifier
- {$EXTERNALSYM UNDNAME_NO_ALLOCATION_LANGUAGE}
- UNDNAME_NO_MS_THISTYPE = ($0020); // NYI Disable expansion of MS keywords on the 'this' type for primary declaration
- {$EXTERNALSYM UNDNAME_NO_MS_THISTYPE}
- UNDNAME_NO_CV_THISTYPE = ($0040); // NYI Disable expansion of CV modifiers on the 'this' type for primary declaration
- {$EXTERNALSYM UNDNAME_NO_CV_THISTYPE}
- UNDNAME_NO_THISTYPE = ($0060); // Disable all modifiers on the 'this' type
- {$EXTERNALSYM UNDNAME_NO_THISTYPE}
- UNDNAME_NO_ACCESS_SPECIFIERS = ($0080); // Disable expansion of access specifiers for members
- {$EXTERNALSYM UNDNAME_NO_ACCESS_SPECIFIERS}
- UNDNAME_NO_THROW_SIGNATURES = ($0100); // Disable expansion of 'throw-signatures' for functions and pointers to functions
- {$EXTERNALSYM UNDNAME_NO_THROW_SIGNATURES}
- UNDNAME_NO_MEMBER_TYPE = ($0200); // Disable expansion of 'static' or 'virtual'ness of members
- {$EXTERNALSYM UNDNAME_NO_MEMBER_TYPE}
- UNDNAME_NO_RETURN_UDT_MODEL = ($0400); // Disable expansion of MS model for UDT returns
- {$EXTERNALSYM UNDNAME_NO_RETURN_UDT_MODEL}
- UNDNAME_32_BIT_DECODE = ($0800); // Undecorate 32-bit decorated names
- {$EXTERNALSYM UNDNAME_32_BIT_DECODE}
- UNDNAME_NAME_ONLY = ($1000); // Crack only the name for primary declaration;
- {$EXTERNALSYM UNDNAME_NAME_ONLY}
- // return just [scope::]name. Does expand template params
- UNDNAME_NO_ARGUMENTS = ($2000); // Don't undecorate arguments to function
- {$EXTERNALSYM UNDNAME_NO_ARGUMENTS}
- UNDNAME_NO_SPECIAL_SYMS = ($4000); // Don't undecorate special names (v-table, vcall, vector xxx, metatype, etc)
- {$EXTERNALSYM UNDNAME_NO_SPECIAL_SYMS}
- function UnDecorateSymbolName(DecoratedName: PCSTR; UnDecoratedName: PSTR;
- UndecoratedLength: DWORD; Flags: DWORD): DWORD; stdcall;
- {$EXTERNALSYM UnDecorateSymbolName}
- //
- // these values are used for synthesized file types
- // that can be passed in as image headers instead of
- // the standard ones from ntimage.h
- //
- const
- DBHHEADER_DEBUGDIRS = $1;
- {$EXTERNALSYM DBHHEADER_DEBUGDIRS}
- type
- _MODLOAD_DATA = record
- ssize: DWORD; // size of this struct
- ssig: DWORD; // signature identifying the passed data
- data: PVOID; // pointer to passed data
- size: DWORD; // size of passed data
- flags: DWORD; // options
- end;
- {$EXTERNALSYM _MODLOAD_DATA}
- MODLOAD_DATA = _MODLOAD_DATA;
- {$EXTERNALSYM MODLOAD_DATA}
- PMODLOAD_DATA = ^MODLOAD_DATA;
- {$EXTERNALSYM PMODLOAD_DATA}
- TModLoadData = MODLOAD_DATA;
- PModLoadData = PMODLOAD_DATA;
- //
- // StackWalking API
- //
- type
- ADDRESS_MODE = (
- AddrMode1616,
- AddrMode1632,
- AddrModeReal,
- AddrModeFlat);
- {$EXTERNALSYM ADDRESS_MODE}
- TAddressMode = ADDRESS_MODE;
- LPADDRESS64 = ^ADDRESS64;
- {$EXTERNALSYM PADDRESS64}
- _tagADDRESS64 = record
- Offset: DWORD64;
- Segment: WORD;
- Mode: ADDRESS_MODE;
- end;
- {$EXTERNALSYM _tagADDRESS64}
- ADDRESS64 = _tagADDRESS64;
- {$EXTERNALSYM ADDRESS64}
- TAddress64 = ADDRESS64;
- PAddress64 = LPADDRESS64;
- LPADDRESS = ^ADDRESS;
- {$EXTERNALSYM PADDRESS}
- _tagADDRESS = record
- Offset: DWORD;
- Segment: WORD;
- Mode: ADDRESS_MODE;
- end;
- {$EXTERNALSYM _tagADDRESS}
- ADDRESS = _tagADDRESS;
- {$EXTERNALSYM ADDRESS}
- TAddress = ADDRESS;
- PAddress = LPADDRESS;
- procedure Address32To64(a32: LPADDRESS; a64: LPADDRESS64);
- {$EXTERNALSYM Address32To64}
- procedure Address64To32(a64: LPADDRESS64; a32: LPADDRESS);
- {$EXTERNALSYM Address64To32}
- //
- // This structure is included in the STACKFRAME structure,
- // and is used to trace through usermode callbacks in a thread's
- // kernel stack. The values must be copied by the kernel debugger
- // from the DBGKD_GET_VERSION and WAIT_STATE_CHANGE packets.
- //
- //
- // New KDHELP structure for 64 bit system support.
- // This structure is preferred in new code.
- //
- type
- PKDHELP64 = ^KDHELP64;
- {$EXTERNALSYM PKDHELP64}
- _KDHELP64 = record
- //
- // address of kernel thread object, as provided in the
- // WAIT_STATE_CHANGE packet.
- //
- Thread: DWORD64;
- //
- // offset in thread object to pointer to the current callback frame
- // in kernel stack.
- //
- ThCallbackStack: DWORD;
- //
- // offset in thread object to pointer to the current callback backing
- // store frame in kernel stack.
- //
- ThCallbackBStore: DWORD;
- //
- // offsets to values in frame:
- //
- // address of next callback frame
- NextCallback: DWORD;
- // address of saved frame pointer (if applicable)
- FramePointer: DWORD;
- //
- // Address of the kernel function that calls out to user mode
- //
- KiCallUserMode: DWORD64;
- //
- // Address of the user mode dispatcher function
- //
- KeUserCallbackDispatcher: DWORD64;
- //
- // Lowest kernel mode address
- //
- SystemRangeStart: DWORD64;
- Reserved: array [0..7] of DWORD64;
- end;
- {$EXTERNALSYM _KDHELP64}
- KDHELP64 = _KDHELP64;
- {$EXTERNALSYM KDHELP64}
- TKdHelp64 = KDHELP64;
- //PKdHelp64 = PKDHELP64;
- PKDHELP = ^KDHELP;
- {$EXTERNALSYM PKDHELP}
- _KDHELP = record
- //
- // address of kernel thread object, as provided in the
- // WAIT_STATE_CHANGE packet.
- //
- Thread: DWORD;
- //
- // offset in thread object to pointer to the current callback frame
- // in kernel stack.
- //
- ThCallbackStack: DWORD;
- //
- // offsets to values in frame:
- //
- // address of next callback frame
- NextCallback: DWORD;
- // address of saved frame pointer (if applicable)
- FramePointer: DWORD;
- //
- // Address of the kernel function that calls out to user mode
- //
- KiCallUserMode: DWORD;
- //
- // Address of the user mode dispatcher function
- //
- KeUserCallbackDispatcher: DWORD;
- //
- // Lowest kernel mode address
- //
- SystemRangeStart: DWORD;
- //
- // offset in thread object to pointer to the current callback backing
- // store frame in kernel stack.
- //
- ThCallbackBStore: DWORD;
- Reserved: array [0..7] of DWORD;
- end;
- {$EXTERNALSYM _KDHELP}
- KDHELP = _KDHELP;
- {$EXTERNALSYM KDHELP}
- TKdHelp = KDHELP;
- //PKdHelp = PKDHELP;
- procedure KdHelp32To64(p32: PKDHELP; p64: PKDHELP64);
- {$EXTERNALSYM KdHelp32To64}
- type
- LPSTACKFRAME64 = ^STACKFRAME64;
- {$EXTERNALSYM LPSTACKFRAME64}
- _tagSTACKFRAME64 = record
- AddrPC: ADDRESS64; // program counter
- AddrReturn: ADDRESS64; // return address
- AddrFrame: ADDRESS64; // frame pointer
- AddrStack: ADDRESS64; // stack pointer
- AddrBStore: ADDRESS64; // backing store pointer
- FuncTableEntry: PVOID; // pointer to pdata/fpo or NULL
- Params: array [0..3] of DWORD64; // possible arguments to the function
- Far: BOOL; // WOW far call
- Virtual: BOOL; // is this a virtual frame?
- Reserved: array [0..2] of DWORD64;
- KdHelp: KDHELP64;
- end;
- {$EXTERNALSYM _tagSTACKFRAME64}
- STACKFRAME64 = _tagSTACKFRAME64;
- {$EXTERNALSYM STACKFRAME64}
- TStackFrame64 = STACKFRAME64;
- PStackFrame64 = LPSTACKFRAME64;
- LPSTACKFRAME = ^STACKFRAME;
- {$EXTERNALSYM LPSTACKFRAME}
- _tagSTACKFRAME = record
- AddrPC: ADDRESS; // program counter
- AddrReturn: ADDRESS; // return address
- AddrFrame: ADDRESS; // frame pointer
- AddrStack: ADDRESS; // stack pointer
- FuncTableEntry: PVOID; // pointer to pdata/fpo or NULL
- Params: array [0..3] of DWORD; // possible arguments to the function
- Far: BOOL; // WOW far call
- Virtual: BOOL; // is this a virtual frame?
- Reserved: array [0..2] of DWORD;
- KdHelp: KDHELP;
- AddrBStore: ADDRESS; // backing store pointer
- end;
- {$EXTERNALSYM _tagSTACKFRAME}
- STACKFRAME = _tagSTACKFRAME;
- {$EXTERNALSYM STACKFRAME}
- TStackFrame = STACKFRAME;
- PStackFrame = LPSTACKFRAME;
- PREAD_PROCESS_MEMORY_ROUTINE64 = function (hProcess: HANDLE; qwBaseAddress: DWORD64;
- lpBuffer: PVOID; nSize: DWORD; var lpNumberOfBytesRead: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PREAD_PROCESS_MEMORY_ROUTINE64}
- PReadProcessMemoryRoutine64 = PREAD_PROCESS_MEMORY_ROUTINE64;
- PFUNCTION_TABLE_ACCESS_ROUTINE64 = function (hProcess: HANDLE;
- AddrBase: DWORD64): PVOID; stdcall;
- {$EXTERNALSYM PFUNCTION_TABLE_ACCESS_ROUTINE64}
- PFunctionTableAccessRoutine64 = PFUNCTION_TABLE_ACCESS_ROUTINE64;
- PGET_MODULE_BASE_ROUTINE64 = function (hProcess: HANDLE;
- Address: DWORD64): DWORD64; stdcall;
- {$EXTERNALSYM PGET_MODULE_BASE_ROUTINE64}
- PGetModuleBaseRoutine64 = PGET_MODULE_BASE_ROUTINE64;
- PTRANSLATE_ADDRESS_ROUTINE64 = function (hProcess: HANDLE; hThread: HANDLE;
- const lpaddr: ADDRESS64): DWORD64; stdcall;
- {$EXTERNALSYM PTRANSLATE_ADDRESS_ROUTINE64}
- PTranslateAddressRoutine64 = PTRANSLATE_ADDRESS_ROUTINE64;
- function StackWalk64(MachineType: DWORD; hProcess: HANDLE; hThread: HANDLE;
- var StackFrame: STACKFRAME64; ContextRecord: PVOID;
- ReadMemoryRoutine: PREAD_PROCESS_MEMORY_ROUTINE64;
- FunctionTableAccessRoutine: PFUNCTION_TABLE_ACCESS_ROUTINE64;
- GetModuleBaseRoutine: PGET_MODULE_BASE_ROUTINE64;
- TranslateAddress: PTRANSLATE_ADDRESS_ROUTINE64): BOOL; stdcall;
- {$EXTERNALSYM StackWalk64}
- type
- PREAD_PROCESS_MEMORY_ROUTINE = function (hProcess: HANDLE;
- lpBaseAddress: DWORD; lpBuffer: PVOID; nSize: DWORD;
- var lpNumberOfBytesRead: DWORD): BOOL; stdcall;
- {$EXTERNALSYM PREAD_PROCESS_MEMORY_ROUTINE}
- PreadProcessMemoryRoutine = PREAD_PROCESS_MEMORY_ROUTINE;
- PFUNCTION_TABLE_ACCESS_ROUTINE = function (hProcess: HANDLE; AddrBase: DWORD): PVOID; stdcall;
- {$EXTERNALSYM PFUNCTION_TABLE_ACCESS_ROUTINE}
- PFunctionTableAccessRoutine = PFUNCTION_TABLE_ACCESS_ROUTINE;
- PGET_MODULE_BASE_ROUTINE = function (hProcess: HANDLE; Address: DWORD): DWORD; stdcall;
- {$EXTERNALSYM PGET_MODULE_BASE_ROUTINE}
- PGetModuleBaseRoutine = PGET_MODULE_BASE_ROUTINE;
- PTRANSLATE_ADDRESS_ROUTINE = function (hProcess: HANDLE; hThread: HANDLE;
- const lpaddr: ADDRESS): DWORD; stdcall;
- {$EXTERNALSYM PTRANSLATE_ADDRESS_ROUTINE}
- PTranslateAddressRoutine = PTRANSLATE_ADDRESS_ROUTINE;
- function StackWalk(MachineType: DWORD; hProcess: HANDLE; hThread: HANDLE;
- var StackFrame: STACKFRAME; ContextRecord: PVOID;
- ReadMemoryRoutine: PREAD_PROCESS_MEMORY_ROUTINE;
- FunctionTableAccessRoutine: PFUNCTION_TABLE_ACCESS_ROUTINE;
- GetModuleBaseRoutine: PGET_MODULE_BASE_ROUTINE;
- TranslateAddress: PTRANSLATE_ADDRESS_ROUTINE): BOOL; stdcall;
- {$EXTERNALSYM StackWalk}
- const
- API_VERSION_NUMBER = 9;
- {$EXTERNALSYM API_VERSION_NUMBER}
- type
- LPAPI_VERSION = ^API_VERSION;
- {$EXTERNALSYM LPAPI_VERSION}
- API_VERSION = record
- MajorVersion: USHORT;
- MinorVersion: USHORT;
- Revision: USHORT;
- Reserved: USHORT;
- end;
- {$EXTERNALSYM API_VERSION}
- TApiVersion = API_VERSION;
- PApiVersion = LPAPI_VERSION;
- function ImagehlpApiVersion: LPAPI_VERSION; stdcall;
- {$EXTERNALSYM ImagehlpApiVersion}
- function ImagehlpApiVersionEx(const AppVersion: API_VERSION): LPAPI_VERSION; stdcall;
- {$EXTERNALSYM ImagehlpApiVersionEx}
- function GetTimestampForLoadedLibrary(Module: HMODULE): DWORD; stdcall;
- {$EXTERNALSYM GetTimestampForLoadedLibrary}
- //
- // typedefs for function pointers
- //
- type
- PSYM_ENUMMODULES_CALLBACK64 = function (ModuleName: PSTR; BaseOfDll: DWORD64;
- UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMMODULES_CALLBACK64}
- PSymEnummodulesCallback64 = PSYM_ENUMMODULES_CALLBACK64;
- PSYM_ENUMSYMBOLS_CALLBACK64 = function (SymbolName: PSTR; SymbolAddress: DWORD64;
- SymbolSize: ULONG; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMSYMBOLS_CALLBACK64}
- PSymEnumsymbolsCallback64 = PSYM_ENUMSYMBOLS_CALLBACK64;
- PSYM_ENUMSYMBOLS_CALLBACK64W = function (SymbolName: PWSTR;
- SymbolAddress: DWORD64; SymbolSize: ULONG; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMSYMBOLS_CALLBACK64W}
- PSymEnumsymbolsCallback64w = PSYM_ENUMSYMBOLS_CALLBACK64W;
- PENUMLOADED_MODULES_CALLBACK64 = function (ModuleName: PSTR;
- ModuleBase: DWORD64; ModuleSize: ULONG; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PENUMLOADED_MODULES_CALLBACK64}
- PSnumloadedModulesCallback64 = PENUMLOADED_MODULES_CALLBACK64;
- PSYMBOL_REGISTERED_CALLBACK64 = function (hProcess: HANDLE; ActionCode: ULONG;
- CallbackData: ULONG64; UserContext: ULONG64): BOOL; stdcall;
- {$EXTERNALSYM PSYMBOL_REGISTERED_CALLBACK64}
- PSymbolRegisteredCallback64 = PSYMBOL_REGISTERED_CALLBACK64;
- PSYMBOL_FUNCENTRY_CALLBACK = function (hProcess: HANDLE; AddrBase: DWORD;
- UserContext: PVOID): PVOID; stdcall;
- {$EXTERNALSYM PSYMBOL_FUNCENTRY_CALLBACK}
- PSymbolFuncentryCallback = PSYMBOL_FUNCENTRY_CALLBACK;
- PSYMBOL_FUNCENTRY_CALLBACK64 = function (hProcess: HANDLE; AddrBase: ULONG64;
- UserContext: ULONG64): PVOID; stdcall;
- {$EXTERNALSYM PSYMBOL_FUNCENTRY_CALLBACK64}
- PSymbolFuncentryCallback64 = PSYMBOL_FUNCENTRY_CALLBACK64;
- PSYM_ENUMMODULES_CALLBACK = function (ModuleName: PSTR; BaseOfDll: ULONG;
- UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMMODULES_CALLBACK}
- PSymEnummodulesCallback = PSYM_ENUMMODULES_CALLBACK;
- PSYM_ENUMSYMBOLS_CALLBACK = function (SymbolName: PSTR; SymbolAddress: ULONG;
- SymbolSize: ULONG; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMSYMBOLS_CALLBACK}
- PSymEnumsymbolsCallback = PSYM_ENUMSYMBOLS_CALLBACK;
- PSYM_ENUMSYMBOLS_CALLBACKW = function (SymbolName: PWSTR; SymbolAddress: ULONG;
- SymbolSize: ULONG; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMSYMBOLS_CALLBACKW}
- PSymEnumsymbolsCallbackw = PSYM_ENUMSYMBOLS_CALLBACKW;
- PENUMLOADED_MODULES_CALLBACK = function (ModuleName: PSTR; ModuleBase: ULONG;
- ModuleSize: ULONG; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PENUMLOADED_MODULES_CALLBACK}
- PEnumloadedModulesCallback = PENUMLOADED_MODULES_CALLBACK;
- PSYMBOL_REGISTERED_CALLBACK = function (hProcess: HANDLE; ActionCode: ULONG;
- CallbackData: PVOID; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYMBOL_REGISTERED_CALLBACK}
- PSymbolRegisteredCallback = PSYMBOL_REGISTERED_CALLBACK;
- //
- // flags found in SYMBOL_INFO.Flags
- //
- const
- SYMFLAG_VALUEPRESENT = $00000001;
- {$EXTERNALSYM SYMFLAG_VALUEPRESENT}
- SYMFLAG_REGISTER = $00000008;
- {$EXTERNALSYM SYMFLAG_REGISTER}
- SYMFLAG_REGREL = $00000010;
- {$EXTERNALSYM SYMFLAG_REGREL}
- SYMFLAG_FRAMEREL = $00000020;
- {$EXTERNALSYM SYMFLAG_FRAMEREL}
- SYMFLAG_PARAMETER = $00000040;
- {$EXTERNALSYM SYMFLAG_PARAMETER}
- SYMFLAG_LOCAL = $00000080;
- {$EXTERNALSYM SYMFLAG_LOCAL}
- SYMFLAG_CONSTANT = $00000100;
- {$EXTERNALSYM SYMFLAG_CONSTANT}
- SYMFLAG_EXPORT = $00000200;
- {$EXTERNALSYM SYMFLAG_EXPORT}
- SYMFLAG_FORWARDER = $00000400;
- {$EXTERNALSYM SYMFLAG_FORWARDER}
- SYMFLAG_FUNCTION = $00000800;
- {$EXTERNALSYM SYMFLAG_FUNCTION}
- SYMFLAG_VIRTUAL = $00001000;
- {$EXTERNALSYM SYMFLAG_VIRTUAL}
- SYMFLAG_THUNK = $00002000;
- {$EXTERNALSYM SYMFLAG_THUNK}
- SYMFLAG_TLSREL = $00004000;
- {$EXTERNALSYM SYMFLAG_TLSREL}
- //
- // symbol type enumeration
- //
- type
- SYM_TYPE = (
- SymNone,
- SymCoff,
- SymCv,
- SymPdb,
- SymExport,
- SymDeferred,
- SymSym, // .sym file
- SymDia,
- SymVirtual,
- NumSymTypes);
- {$EXTERNALSYM SYM_TYPE}
- TSymType = SYM_TYPE;
- //
- // symbol data structure
- //
- PIMAGEHLP_SYMBOL64 = ^IMAGEHLP_SYMBOL64;
- {$EXTERNALSYM PIMAGEHLP_SYMBOL64}
- _IMAGEHLP_SYMBOL64 = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_SYMBOL64)
- Address: DWORD64; // virtual address including dll base address
- Size: DWORD; // estimated size of symbol, can be zero
- Flags: DWORD; // info about the symbols, see the SYMF defines
- MaxNameLength: DWORD; // maximum size of symbol name in 'Name'
- Name: array [0..0] of CHAR; // symbol name (null terminated string)
- end;
- {$EXTERNALSYM _IMAGEHLP_SYMBOL64}
- IMAGEHLP_SYMBOL64 = _IMAGEHLP_SYMBOL64;
- {$EXTERNALSYM IMAGEHLP_SYMBOL64}
- TImageHlpSymbol64 = IMAGEHLP_SYMBOL64;
- PImageHlpSymbol64 = PIMAGEHLP_SYMBOL64;
- _IMAGEHLP_SYMBOL64_PACKAGE = record
- sym: IMAGEHLP_SYMBOL64;
- name: array [0..MAX_SYM_NAME] of CHAR;
- end;
- {$EXTERNALSYM _IMAGEHLP_SYMBOL64_PACKAGE}
- IMAGEHLP_SYMBOL64_PACKAGE = _IMAGEHLP_SYMBOL64_PACKAGE;
- {$EXTERNALSYM IMAGEHLP_SYMBOL64_PACKAGE}
- PIMAGEHLP_SYMBOL64_PACKAGE = ^IMAGEHLP_SYMBOL64_PACKAGE;
- {$EXTERNALSYM PIMAGEHLP_SYMBOL64_PACKAGE}
- TImageHlpSymbol64Package = IMAGEHLP_SYMBOL64_PACKAGE;
- PImageHlpSymbol64Package = PIMAGEHLP_SYMBOL64_PACKAGE;
- //#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
- //
- //#define IMAGEHLP_SYMBOL IMAGEHLP_SYMBOL64
- //#define PIMAGEHLP_SYMBOL PIMAGEHLP_SYMBOL64
- //#define IMAGEHLP_SYMBOL_PACKAGE IMAGEHLP_SYMBOL64_PACKAGE
- //#define PIMAGEHLP_SYMBOL_PACKAGE PIMAGEHLP_SYMBOL64_PACKAGE
- //
- //#else
- PIMAGEHLP_SYMBOL = ^IMAGEHLP_SYMBOL;
- {$EXTERNALSYM PIMAGEHLP_SYMBOL}
- _IMAGEHLP_SYMBOL = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_SYMBOL)
- Address: DWORD; // virtual address including dll base address
- Size: DWORD; // estimated size of symbol, can be zero
- Flags: DWORD; // info about the symbols, see the SYMF defines
- MaxNameLength: DWORD; // maximum size of symbol name in 'Name'
- Name: array [0..0] of CHAR; // symbol name (null terminated string)
- end;
- {$EXTERNALSYM _IMAGEHLP_SYMBOL}
- IMAGEHLP_SYMBOL = _IMAGEHLP_SYMBOL;
- {$EXTERNALSYM IMAGEHLP_SYMBOL}
- TImageHlpSymbol = IMAGEHLP_SYMBOL;
- PImageHlpSymbol = PIMAGEHLP_SYMBOL;
- _IMAGEHLP_SYMBOL_PACKAGE = record
- sym: IMAGEHLP_SYMBOL;
- name: array [0..MAX_SYM_NAME] of CHAR;
- end;
- {$EXTERNALSYM _IMAGEHLP_SYMBOL_PACKAGE}
- IMAGEHLP_SYMBOL_PACKAGE = _IMAGEHLP_SYMBOL_PACKAGE;
- {$EXTERNALSYM IMAGEHLP_SYMBOL_PACKAGE}
- PIMAGEHLP_SYMBOL_PACKAGE = ^IMAGEHLP_SYMBOL_PACKAGE;
- {$EXTERNALSYM PIMAGEHLP_SYMBOL_PACKAGE}
- TImageHlpSymbolPackage = IMAGEHLP_SYMBOL_PACKAGE;
- PImageHlpSymbolPackage = PIMAGEHLP_SYMBOL_PACKAGE;
- //#endif
- //
- // module data structure
- //
- PIMAGEHLP_MODULE64 = ^IMAGEHLP_MODULE64;
- {$EXTERNALSYM PIMAGEHLP_MODULE64}
- _IMAGEHLP_MODULE64 = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE64)
- BaseOfImage: DWORD64; // base load address of module
- ImageSize: DWORD; // virtual size of the loaded module
- TimeDateStamp: DWORD; // date/time stamp from pe header
- CheckSum: DWORD; // checksum from the pe header
- NumSyms: DWORD; // number of symbols in the symbol table
- SymType: SYM_TYPE; // type of symbols loaded
- ModuleName: array [0..3] of CHAR; // module name
- ImageName: array [0..255] of CHAR; // image name
- LoadedImageName: array [0..255] of CHAR; // symbol file name
- end;
- {$EXTERNALSYM _IMAGEHLP_MODULE64}
- IMAGEHLP_MODULE64 = _IMAGEHLP_MODULE64;
- {$EXTERNALSYM IMAGEHLP_MODULE64}
- TImageHlpModule64 = IMAGEHLP_MODULE64;
- PImageHlpModule64 = PIMAGEHLP_MODULE64;
- PIMAGEHLP_MODULEW64 = ^IMAGEHLP_MODULEW64;
- {$EXTERNALSYM PIMAGEHLP_MODULEW64}
- _IMAGEHLP_MODULE64W = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE64)
- BaseOfImage: DWORD64; // base load address of module
- ImageSize: DWORD; // virtual size of the loaded module
- TimeDateStamp: DWORD; // date/time stamp from pe header
- CheckSum: DWORD; // checksum from the pe header
- NumSyms: DWORD; // number of symbols in the symbol table
- SymType: SYM_TYPE; // type of symbols loaded
- ModuleName: array [0..31] of WCHAR; // module name
- ImageName: array [0..255] of WCHAR; // image name
- LoadedImageName: array [0..255] of WCHAR; // symbol file name
- end;
- {$EXTERNALSYM _IMAGEHLP_MODULE64W}
- IMAGEHLP_MODULEW64 = _IMAGEHLP_MODULE64W;
- {$EXTERNALSYM IMAGEHLP_MODULEW64}
- TImageHlpModuleW64 = IMAGEHLP_MODULEW64;
- PImageHlpModuleW64 = PIMAGEHLP_MODULEW64;
- PIMAGEHLP_MODULE = ^IMAGEHLP_MODULE;
- {$EXTERNALSYM PIMAGEHLP_MODULE}
- _IMAGEHLP_MODULE = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE)
- BaseOfImage: DWORD; // base load address of module
- ImageSize: DWORD; // virtual size of the loaded module
- TimeDateStamp: DWORD; // date/time stamp from pe header
- CheckSum: DWORD; // checksum from the pe header
- NumSyms: DWORD; // number of symbols in the symbol table
- SymType: SYM_TYPE; // type of symbols loaded
- ModuleName: array [0..31] of CHAR; // module name
- ImageName: array [0..255] of CHAR; // image name
- LoadedImageName: array [0..255] of CHAR; // symbol file name
- end;
- {$EXTERNALSYM _IMAGEHLP_MODULE}
- IMAGEHLP_MODULE = _IMAGEHLP_MODULE;
- {$EXTERNALSYM IMAGEHLP_MODULE}
- TImageHlpModule = IMAGEHLP_MODULE;
- PImageHlpModule = PIMAGEHLP_MODULE;
- PIMAGEHLP_MODULEW = ^IMAGEHLP_MODULEW;
- {$EXTERNALSYM PIMAGEHLP_MODULEW}
- _IMAGEHLP_MODULEW = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_MODULE)
- BaseOfImage: DWORD; // base load address of module
- ImageSize: DWORD; // virtual size of the loaded module
- TimeDateStamp: DWORD; // date/time stamp from pe header
- CheckSum: DWORD; // checksum from the pe header
- NumSyms: DWORD; // number of symbols in the symbol table
- SymType: SYM_TYPE; // type of symbols loaded
- ModuleName: array [0..31] of WCHAR; // module name
- ImageName: array [0..255] of WCHAR; // image name
- LoadedImageName: array [0..255] of WCHAR; // symbol file name
- end;
- {$EXTERNALSYM _IMAGEHLP_MODULEW}
- IMAGEHLP_MODULEW = _IMAGEHLP_MODULEW;
- {$EXTERNALSYM IMAGEHLP_MODULEW}
- TImageHlpModuleW = IMAGEHLP_MODULEW;
- PImageHlpModuleW = PIMAGEHLP_MODULEW;
- //
- // source file line data structure
- //
- PIMAGEHLP_LINE64 = ^IMAGEHLP_LINE64;
- {$EXTERNALSYM PIMAGEHLP_LINE64}
- _IMAGEHLP_LINE64 = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_LINE64)
- Key: PVOID; // internal
- LineNumber: DWORD; // line number in file
- FileName: PCHAR; // full filename
- Address: DWORD64; // first instruction of line
- end;
- {$EXTERNALSYM _IMAGEHLP_LINE64}
- IMAGEHLP_LINE64 = _IMAGEHLP_LINE64;
- {$EXTERNALSYM IMAGEHLP_LINE64}
- TImageHlpLine64 = IMAGEHLP_LINE64;
- PImageHlpLine64 = PIMAGEHLP_LINE64;
- PIMAGEHLP_LINE = ^IMAGEHLP_LINE;
- {$EXTERNALSYM PIMAGEHLP_LINE}
- _IMAGEHLP_LINE = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_LINE)
- Key: PVOID; // internal
- LineNumber: DWORD; // line number in file
- FileName: PCHAR; // full filename
- Address: DWORD; // first instruction of line
- end;
- {$EXTERNALSYM _IMAGEHLP_LINE}
- IMAGEHLP_LINE = _IMAGEHLP_LINE;
- {$EXTERNALSYM IMAGEHLP_LINE}
- TImageHlpLine = IMAGEHLP_LINE;
- PImageHlpLine = PIMAGEHLP_LINE;
- //
- // source file structure
- //
- type
- _SOURCEFILE = record
- ModBase: DWORD64; // base address of loaded module
- FileName: PCHAR; // full filename of source
- end;
- {$EXTERNALSYM _SOURCEFILE}
- SOURCEFILE = _SOURCEFILE;
- {$EXTERNALSYM SOURCEFILE}
- PSOURCEFILE = ^SOURCEFILE;
- {$EXTERNALSYM PSOURCEFILE}
- TSourceFile = SOURCEFILE;
- //
- // data structures used for registered symbol callbacks
- //
- const
- CBA_DEFERRED_SYMBOL_LOAD_START = $00000001;
- {$EXTERNALSYM CBA_DEFERRED_SYMBOL_LOAD_START}
- CBA_DEFERRED_SYMBOL_LOAD_COMPLETE = $00000002;
- {$EXTERNALSYM CBA_DEFERRED_SYMBOL_LOAD_COMPLETE}
- CBA_DEFERRED_SYMBOL_LOAD_FAILURE = $00000003;
- {$EXTERNALSYM CBA_DEFERRED_SYMBOL_LOAD_FAILURE}
- CBA_SYMBOLS_UNLOADED = $00000004;
- {$EXTERNALSYM CBA_SYMBOLS_UNLOADED}
- CBA_DUPLICATE_SYMBOL = $00000005;
- {$EXTERNALSYM CBA_DUPLICATE_SYMBOL}
- CBA_READ_MEMORY = $00000006;
- {$EXTERNALSYM CBA_READ_MEMORY}
- CBA_DEFERRED_SYMBOL_LOAD_CANCEL = $00000007;
- {$EXTERNALSYM CBA_DEFERRED_SYMBOL_LOAD_CANCEL}
- CBA_SET_OPTIONS = $00000008;
- {$EXTERNALSYM CBA_SET_OPTIONS}
- CBA_EVENT = $00000010;
- {$EXTERNALSYM CBA_EVENT}
- CBA_DEFERRED_SYMBOL_LOAD_PARTIAL = $00000020;
- {$EXTERNALSYM CBA_DEFERRED_SYMBOL_LOAD_PARTIAL}
- CBA_DEBUG_INFO = $10000000;
- {$EXTERNALSYM CBA_DEBUG_INFO}
- type
- PIMAGEHLP_CBA_READ_MEMORY = ^IMAGEHLP_CBA_READ_MEMORY;
- {$EXTERNALSYM PIMAGEHLP_CBA_READ_MEMORY}
- _IMAGEHLP_CBA_READ_MEMORY = record
- addr: DWORD64; // address to read from
- buf: PVOID; // buffer to read to
- bytes: DWORD; // amount of bytes to read
- bytesread: LPDWORD; // pointer to store amount of bytes read
- end;
- {$EXTERNALSYM _IMAGEHLP_CBA_READ_MEMORY}
- IMAGEHLP_CBA_READ_MEMORY = _IMAGEHLP_CBA_READ_MEMORY;
- {$EXTERNALSYM IMAGEHLP_CBA_READ_MEMORY}
- TImageHlpCbaReadMemory = IMAGEHLP_CBA_READ_MEMORY;
- PImageHlpCbaReadMemory = PIMAGEHLP_CBA_READ_MEMORY;
- const
- sevInfo = 0;
- {$EXTERNALSYM sevInfo}
- sevProblem = 1;
- {$EXTERNALSYM sevProblem}
- sevAttn = 2;
- {$EXTERNALSYM sevAttn}
- sevFatal = 3;
- {$EXTERNALSYM sevFatal}
- sevMax = 4; // unused
- {$EXTERNALSYM sevMax}
- type
- _IMAGEHLP_CBA_EVENT = record
- severity: DWORD; // values from sevInfo to sevFatal
- code: DWORD; // numerical code IDs the error
- desc: PCHAR; // may contain a text description of the error
- object_: PVOID; // value dependant upon the error code
- end;
- {$EXTERNALSYM _IMAGEHLP_CBA_EVENT}
- IMAGEHLP_CBA_EVENT = _IMAGEHLP_CBA_EVENT;
- {$EXTERNALSYM IMAGEHLP_CBA_EVENT}
- PIMAGEHLP_CBA_EVENT = ^IMAGEHLP_CBA_EVENT;
- {$EXTERNALSYM PIMAGEHLP_CBA_EVENT}
- TImageHlpCbaEvent = IMAGEHLP_CBA_EVENT;
- PImageHlpCbaEvent = PIMAGEHLP_CBA_EVENT;
- PIMAGEHLP_DEFERRED_SYMBOL_LOAD64 = ^IMAGEHLP_DEFERRED_SYMBOL_LOAD64;
- {$EXTERNALSYM PIMAGEHLP_DEFERRED_SYMBOL_LOAD64}
- _IMAGEHLP_DEFERRED_SYMBOL_LOAD64 = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_DEFERRED_SYMBOL_LOAD64)
- BaseOfImage: DWORD64; // base load address of module
- CheckSum: DWORD; // checksum from the pe header
- TimeDateStamp: DWORD; // date/time stamp from pe header
- FileName: array [0..MAX_PATH - 1] of CHAR; // symbols file or image name
- Reparse: ByteBool; // load failure reparse
- hFile: HANDLE; // file handle, if passed
- Flags: DWORD; //
- end;
- {$EXTERNALSYM _IMAGEHLP_DEFERRED_SYMBOL_LOAD64}
- IMAGEHLP_DEFERRED_SYMBOL_LOAD64 = _IMAGEHLP_DEFERRED_SYMBOL_LOAD64;
- {$EXTERNALSYM IMAGEHLP_DEFERRED_SYMBOL_LOAD64}
- TImageHlpDeferredSymbolLoad64 = IMAGEHLP_DEFERRED_SYMBOL_LOAD64;
- PImageHlpDeferredSymbolLoad64 = PIMAGEHLP_DEFERRED_SYMBOL_LOAD64;
- const
- DSLFLAG_MISMATCHED_PDB = $1;
- {$EXTERNALSYM DSLFLAG_MISMATCHED_PDB}
- DSLFLAG_MISMATCHED_DBG = $2;
- {$EXTERNALSYM DSLFLAG_MISMATCHED_DBG}
- type
- PIMAGEHLP_DEFERRED_SYMBOL_LOAD = ^IMAGEHLP_DEFERRED_SYMBOL_LOAD;
- {$EXTERNALSYM PIMAGEHLP_DEFERRED_SYMBOL_LOAD}
- _IMAGEHLP_DEFERRED_SYMBOL_LOAD = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_DEFERRED_SYMBOL_LOAD)
- BaseOfImage: DWORD; // base load address of module
- CheckSum: DWORD; // checksum from the pe header
- TimeDateStamp: DWORD; // date/time stamp from pe header
- FileName: array [0..MAX_PATH - 1] of CHAR; // symbols file or image name
- Reparse: ByteBool; // load failure reparse
- hFile: HANDLE; // file handle, if passed
- end;
- {$EXTERNALSYM _IMAGEHLP_DEFERRED_SYMBOL_LOAD}
- IMAGEHLP_DEFERRED_SYMBOL_LOAD = _IMAGEHLP_DEFERRED_SYMBOL_LOAD;
- {$EXTERNALSYM IMAGEHLP_DEFERRED_SYMBOL_LOAD}
- TImageHlpDeferredSymbolLoad = IMAGEHLP_DEFERRED_SYMBOL_LOAD;
- PImageHlpDeferredSymbolLoad = PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
- PIMAGEHLP_DUPLICATE_SYMBOL64 = ^IMAGEHLP_DUPLICATE_SYMBOL64;
- {$EXTERNALSYM PIMAGEHLP_DUPLICATE_SYMBOL64}
- _IMAGEHLP_DUPLICATE_SYMBOL64 = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_DUPLICATE_SYMBOL64)
- NumberOfDups: DWORD; // number of duplicates in the Symbol array
- Symbol: PIMAGEHLP_SYMBOL64; // array of duplicate symbols
- SelectedSymbol: DWORD; // symbol selected (-1 to start)
- end;
- {$EXTERNALSYM _IMAGEHLP_DUPLICATE_SYMBOL64}
- IMAGEHLP_DUPLICATE_SYMBOL64 = _IMAGEHLP_DUPLICATE_SYMBOL64;
- {$EXTERNALSYM IMAGEHLP_DUPLICATE_SYMBOL64}
- TImageHlpDuplicateSymbol64 = IMAGEHLP_DUPLICATE_SYMBOL64;
- PImageHlpDuplicateSymbol64 = PIMAGEHLP_DUPLICATE_SYMBOL64;
- PIMAGEHLP_DUPLICATE_SYMBOL = ^IMAGEHLP_DUPLICATE_SYMBOL;
- {$EXTERNALSYM PIMAGEHLP_DUPLICATE_SYMBOL}
- _IMAGEHLP_DUPLICATE_SYMBOL = record
- SizeOfStruct: DWORD; // set to sizeof(IMAGEHLP_DUPLICATE_SYMBOL)
- NumberOfDups: DWORD; // number of duplicates in the Symbol array
- Symbol: PIMAGEHLP_SYMBOL; // array of duplicate symbols
- SelectedSymbol: DWORD; // symbol selected (-1 to start)
- end;
- {$EXTERNALSYM _IMAGEHLP_DUPLICATE_SYMBOL}
- IMAGEHLP_DUPLICATE_SYMBOL = _IMAGEHLP_DUPLICATE_SYMBOL;
- {$EXTERNALSYM IMAGEHLP_DUPLICATE_SYMBOL}
- TImageHlpDuplicateSymbol = IMAGEHLP_DUPLICATE_SYMBOL;
- PImageHlpDuplicateSymbol = PIMAGEHLP_DUPLICATE_SYMBOL;
- // If dbghelp ever needs to display graphical UI, it will use this as the parent window.
- //BOOL
- //SymSetParentWindow(
- // HWND hwnd
- // );
- //
- // options that are set/returned by SymSetOptions() & SymGetOptions()
- // these are used as a mask
- //
- const
- SYMOPT_CASE_INSENSITIVE = $00000001;
- {$EXTERNALSYM SYMOPT_CASE_INSENSITIVE}
- SYMOPT_UNDNAME = $00000002;
- {$EXTERNALSYM SYMOPT_UNDNAME}
- SYMOPT_DEFERRED_LOADS = $00000004;
- {$EXTERNALSYM SYMOPT_DEFERRED_LOADS}
- SYMOPT_NO_CPP = $00000008;
- {$EXTERNALSYM SYMOPT_NO_CPP}
- SYMOPT_LOAD_LINES = $00000010;
- {$EXTERNALSYM SYMOPT_LOAD_LINES}
- SYMOPT_OMAP_FIND_NEAREST = $00000020;
- {$EXTERNALSYM SYMOPT_OMAP_FIND_NEAREST}
- SYMOPT_LOAD_ANYTHING = $00000040;
- {$EXTERNALSYM SYMOPT_LOAD_ANYTHING}
- SYMOPT_IGNORE_CVREC = $00000080;
- {$EXTERNALSYM SYMOPT_IGNORE_CVREC}
- SYMOPT_NO_UNQUALIFIED_LOADS = $00000100;
- {$EXTERNALSYM SYMOPT_NO_UNQUALIFIED_LOADS}
- SYMOPT_FAIL_CRITICAL_ERRORS = $00000200;
- {$EXTERNALSYM SYMOPT_FAIL_CRITICAL_ERRORS}
- SYMOPT_EXACT_SYMBOLS = $00000400;
- {$EXTERNALSYM SYMOPT_EXACT_SYMBOLS}
- SYMOPT_ALLOW_ABSOLUTE_SYMBOLS = $00000800;
- {$EXTERNALSYM SYMOPT_ALLOW_ABSOLUTE_SYMBOLS}
- SYMOPT_IGNORE_NT_SYMPATH = $00001000;
- {$EXTERNALSYM SYMOPT_IGNORE_NT_SYMPATH}
- SYMOPT_INCLUDE_32BIT_MODULES = $00002000;
- {$EXTERNALSYM SYMOPT_INCLUDE_32BIT_MODULES}
- SYMOPT_PUBLICS_ONLY = $00004000;
- {$EXTERNALSYM SYMOPT_PUBLICS_ONLY}
- SYMOPT_NO_PUBLICS = $00008000;
- {$EXTERNALSYM SYMOPT_NO_PUBLICS}
- SYMOPT_AUTO_PUBLICS = $00010000;
- {$EXTERNALSYM SYMOPT_AUTO_PUBLICS}
- SYMOPT_NO_IMAGE_SEARCH = $00020000;
- {$EXTERNALSYM SYMOPT_NO_IMAGE_SEARCH}
- SYMOPT_SECURE = $00040000;
- {$EXTERNALSYM SYMOPT_SECURE}
- SYMOPT_DEBUG = DWORD($80000000);
- {$EXTERNALSYM SYMOPT_DEBUG}
- function SymSetOptions(SymOptions: DWORD): DWORD; stdcall;
- {$EXTERNALSYM SymSetOptions}
- function SymGetOptions: DWORD; stdcall;
- {$EXTERNALSYM SymGetOptions}
- function SymCleanup(hProcess: HANDLE): BOOL; stdcall;
- {$EXTERNALSYM SymCleanup}
- function SymMatchString(string_, expression: LPSTR; fCase: BOOL): BOOL; stdcall;
- {$EXTERNALSYM SymMatchString}
- type
- PSYM_ENUMSOURCFILES_CALLBACK = function (pSourceFile: PSOURCEFILE; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMSOURCFILES_CALLBACK}
- PSymEnumSourceFilesCallback = PSYM_ENUMSOURCFILES_CALLBACK;
- function SymEnumSourceFiles(hProcess: HANDLE; ModBase: ULONG64; Mask: LPSTR;
- cbSrcFiles: PSYM_ENUMSOURCFILES_CALLBACK; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM SymEnumSourceFiles}
- function SymEnumerateModules64(hProcess: HANDLE; EnumModulesCallback: PSYM_ENUMMODULES_CALLBACK64;
- UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM SymEnumerateModules64}
- function SymEnumerateModules(hProcess: HANDLE; EnumModulesCallback: PSYM_ENUMMODULES_CALLBACK;
- UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM SymEnumerateModules}
- function SymEnumerateSymbols64(hProcess: HANDLE; BaseOfDll: DWORD64;
- EnumSymbolsCallback: PSYM_ENUMSYMBOLS_CALLBACK64; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM SymEnumerateSymbols64}
- function SymEnumerateSymbolsW64(hProcess: HANDLE; BaseOfDll: DWORD64;
- EnumSymbolsCallback: PSYM_ENUMSYMBOLS_CALLBACK64W; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM SymEnumerateSymbolsW64}
- function SymEnumerateSymbols(hProcess: HANDLE; BaseOfDll: DWORD;
- EnumSymbolsCallback: PSYM_ENUMSYMBOLS_CALLBACK; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM SymEnumerateSymbols}
- function SymEnumerateSymbolsW(hProcess: HANDLE; BaseOfDll: DWORD;
- EnumSymbolsCallback: PSYM_ENUMSYMBOLS_CALLBACKW; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM SymEnumerateSymbolsW}
- function EnumerateLoadedModules64(hProcess: HANDLE; EnumLoadedModulesCallback: PENUMLOADED_MODULES_CALLBACK64;
- UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM EnumerateLoadedModules64}
- function EnumerateLoadedModules(hProcess: HANDLE; EnumLoadedModulesCallback: PENUMLOADED_MODULES_CALLBACK;
- UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM EnumerateLoadedModules}
- function SymFunctionTableAccess64(hProcess: HANDLE; AddrBase: DWORD64): PVOID; stdcall;
- {$EXTERNALSYM SymFunctionTableAccess64}
- function SymFunctionTableAccess(hProcess: HANDLE; AddrBase: DWORD): PVOID; stdcall;
- {$EXTERNALSYM SymFunctionTableAccess}
- function SymGetModuleInfo64(hProcess: HANDLE; qwAddr: DWORD64;
- var ModuleInfo: IMAGEHLP_MODULE64): BOOL; stdcall;
- {$EXTERNALSYM SymGetModuleInfo64}
- function SymGetModuleInfoW64(hProcess: HANDLE; qwAddr: DWORD64;
- var ModuleInfo: IMAGEHLP_MODULEW64): BOOL; stdcall;
- {$EXTERNALSYM SymGetModuleInfoW64}
- function SymGetModuleInfo(hProcess: HANDLE; dwAddr: DWORD;
- var ModuleInfo: IMAGEHLP_MODULE): BOOL; stdcall;
- {$EXTERNALSYM SymGetModuleInfo}
- function SymGetModuleInfoW(hProcess: HANDLE; dwAddr: DWORD;
- var ModuleInfo: IMAGEHLP_MODULEW): BOOL; stdcall;
- {$EXTERNALSYM SymGetModuleInfoW}
- function SymGetModuleBase64(hProcess: HANDLE; qwAddr: DWORD64): DWORD64; stdcall;
- {$EXTERNALSYM SymGetModuleBase64}
- function SymGetModuleBase(hProcess: HANDLE; dwAddr: DWORD): DWORD; stdcall;
- {$EXTERNALSYM SymGetModuleBase}
- function SymGetSymNext64(hProcess: HANDLE; var Symbol: IMAGEHLP_SYMBOL64): BOOL; stdcall;
- {$EXTERNALSYM SymGetSymNext64}
- function SymGetSymNext(hProcess: HANDLE; var Symbol: IMAGEHLP_SYMBOL): BOOL; stdcall;
- {$EXTERNALSYM SymGetSymNext}
- function SymGetSymPrev64(hProcess: HANDLE; var Symbol: IMAGEHLP_SYMBOL64): BOOL; stdcall;
- {$EXTERNALSYM SymGetSymPrev64}
- function SymGetSymPrev(hProcess: HANDLE; var Symbol: IMAGEHLP_SYMBOL): BOOL; stdcall;
- {$EXTERNALSYM SymGetSymPrev}
- function SymGetLineFromAddr64(hProcess: HANDLE; qwAddr: DWORD64;
- var pdwDisplacement: DWORD; var Line64: IMAGEHLP_LINE64): BOOL; stdcall;
- {$EXTERNALSYM SymGetLineFromAddr64}
- function SymGetLineFromAddr(hProcess: HANDLE; dwAddr: DWORD;
- var pdwDisplacement: DWORD; var Line: IMAGEHLP_LINE): BOOL; stdcall;
- {$EXTERNALSYM SymGetLineFromAddr}
- function SymGetLineFromName64(hProcess: HANDLE; ModuleName: PSTR; FileName: PSTR;
- dwLineNumber: DWORD; var plDisplacement: LONG; var Line: IMAGEHLP_LINE64): BOOL; stdcall;
- {$EXTERNALSYM SymGetLineFromName64}
- function SymGetLineFromName(hProcess: HANDLE; ModuleName: PSTR; FileName: PSTR;
- dwLineNumber: DWORD; var plDisplacement: LONG; var Line: IMAGEHLP_LINE): BOOL; stdcall;
- {$EXTERNALSYM SymGetLineFromName}
- function SymGetLineNext64(hProcess: HANDLE; var Line: IMAGEHLP_LINE64): BOOL; stdcall;
- {$EXTERNALSYM SymGetLineNext64}
- function SymGetLineNext(hProcess: HANDLE; var Line: IMAGEHLP_LINE): BOOL; stdcall;
- {$EXTERNALSYM SymGetLineNext}
- function SymGetLinePrev64(hProcess: HANDLE; var Line: IMAGEHLP_LINE64): BOOL; stdcall;
- {$EXTERNALSYM SymGetLinePrev64}
- function SymGetLinePrev(hProcess: HANDLE; var Line: IMAGEHLP_LINE): BOOL; stdcall;
- {$EXTERNALSYM SymGetLinePrev}
- function SymMatchFileName(FileName, Match: PSTR; var FileNameStop, MatchStop: PSTR): BOOL; stdcall;
- {$EXTERNALSYM SymMatchFileName}
- function SymInitialize(hProcess: HANDLE; UserSearchPath: PSTR; fInvadeProcess: BOOL): BOOL; stdcall;
- {$EXTERNALSYM SymInitialize}
- function SymGetSearchPath(hProcess: HANDLE; SearchPath: PSTR; SearchPathLength: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SymGetSearchPath}
- function SymSetSearchPath(hProcess: HANDLE; SearchPath: PSTR): BOOL; stdcall;
- {$EXTERNALSYM SymSetSearchPath}
- function SymLoadModule64(hProcess, hFile: HANDLE; ImageName, ModuleName: PSTR;
- BaseOfDll: DWORD64; SizeOfDll: DWORD): DWORD64; stdcall;
- {$EXTERNALSYM SymLoadModule64}
- const
- SLMFLAG_VIRTUAL = $1;
- {$EXTERNALSYM SLMFLAG_VIRTUAL}
- function SymLoadModuleEx(hProcess, hFile: HANDLE; ImageName, ModuleName: PSTR; BaseOfDll: DWORD64;
- DllSize: DWORD; Data: PMODLOAD_DATA; Flag: DWORD): DWORD64; stdcall;
- {$EXTERNALSYM SymLoadModuleEx}
- function SymLoadModule(hProcess, hFile: HANDLE; ImageName, ModuleName: PSTR;
- BaseOfDll: DWORD; SizeOfDll: DWORD): DWORD; stdcall;
- {$EXTERNALSYM SymLoadModule}
- function SymUnloadModule64(hProcess: HANDLE; BaseOfDll: DWORD64): BOOL; stdcall;
- {$EXTERNALSYM SymUnloadModule64}
- function SymUnloadModule(hProcess: HANDLE; BaseOfDll: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SymUnloadModule}
- function SymUnDName64(const sym: IMAGEHLP_SYMBOL64; UnDecName: PSTR;
- UnDecNameLength: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SymUnDName64}
- function SymUnDName(const sym: IMAGEHLP_SYMBOL; UnDecName: PSTR;
- UnDecNameLength: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SymUnDName}
- function SymRegisterCallback64(hProcess: HANDLE; CallbackFunction: PSYMBOL_REGISTERED_CALLBACK64;
- UserContext: ULONG64): BOOL; stdcall;
- {$EXTERNALSYM SymRegisterCallback64}
- function SymRegisterFunctionEntryCallback64(hProcess: HANDLE; CallbackFunction: PSYMBOL_FUNCENTRY_CALLBACK64;
- UserContext: ULONG64): BOOL; stdcall;
- {$EXTERNALSYM SymRegisterFunctionEntryCallback64}
- function SymRegisterCallback(hProcess: HANDLE; CallbackFunction: PSYMBOL_REGISTERED_CALLBACK;
- UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM SymRegisterCallback}
- function SymRegisterFunctionEntryCallback(hProcess: HANDLE; CallbackFunction: PSYMBOL_FUNCENTRY_CALLBACK;
- UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM SymRegisterFunctionEntryCallback}
- type
- PIMAGEHLP_SYMBOL_SRC = ^IMAGEHLP_SYMBOL_SRC;
- {$EXTERNALSYM PIMAGEHLP_SYMBOL_SRC}
- _IMAGEHLP_SYMBOL_SRC = record
- sizeofstruct: DWORD;
- type_: DWORD;
- file_: array [0..MAX_PATH - 1] of Char;
- end;
- {$EXTERNALSYM _IMAGEHLP_SYMBOL_SRC}
- IMAGEHLP_SYMBOL_SRC = _IMAGEHLP_SYMBOL_SRC;
- {$EXTERNALSYM IMAGEHLP_SYMBOL_SRC}
- TImageHlpSymbolSrc = IMAGEHLP_SYMBOL_SRC;
- PImageHlpSymbolSrc = PIMAGEHLP_SYMBOL_SRC;
- PMODULE_TYPE_INFO = ^MODULE_TYPE_INFO;
- {$EXTERNALSYM PMODULE_TYPE_INFO}
- _MODULE_TYPE_INFO = record
- dataLength: USHORT;
- leaf: USHORT;
- data: array [0..0] of BYTE;
- end;
- {$EXTERNALSYM _MODULE_TYPE_INFO}
- MODULE_TYPE_INFO = _MODULE_TYPE_INFO;
- {$EXTERNALSYM MODULE_TYPE_INFO}
- TModuleTypeInfo = MODULE_TYPE_INFO;
- PModuleTypeInfo = PMODULE_TYPE_INFO;
- type
- PSYMBOL_INFO = ^SYMBOL_INFO;
- {$EXTERNALSYM PSYMBOL_INFO}
- _SYMBOL_INFO = record
- SizeOfStruct: ULONG;
- TypeIndex: ULONG; // Type Index of symbol
- Reserved: array [0..1] of ULONG64;
- Info: ULONG;
- Size: ULONG;
- ModBase: ULONG64; // Base Address of module comtaining this symbol
- Flags: ULONG;
- Value: ULONG64; // Value of symbol, ValuePresent should be 1
- Address: ULONG64; // Address of symbol including base address of module
- Register_: ULONG; // register holding value or pointer to value
- Scope: ULONG; // scope of the symbol
- Tag: ULONG; // pdb classification
- NameLen: ULONG; // Actual length of name
- MaxNameLen: ULONG;
- Name: array [0..0] of CHAR; // Name of symbol
- end;
- {$EXTERNALSYM _SYMBOL_INFO}
- SYMBOL_INFO = _SYMBOL_INFO;
- {$EXTERNALSYM SYMBOL_INFO}
- TSymbolInfo = SYMBOL_INFO;
- PSymbolInfo = PSYMBOL_INFO;
- _SYMBOL_INFO_PACKAGE = record
- si: SYMBOL_INFO;
- name: array [0..MAX_SYM_NAME] of CHAR;
- end;
- {$EXTERNALSYM _SYMBOL_INFO_PACKAGE}
- SYMBOL_INFO_PACKAGE = _SYMBOL_INFO_PACKAGE;
- {$EXTERNALSYM SYMBOL_INFO_PACKAGE}
- PSYMBOL_INFO_PACKAGE = ^SYMBOL_INFO_PACKAGE;
- {$EXTERNALSYM PSYMBOL_INFO_PACKAGE}
- TSymbolInfoPackage = SYMBOL_INFO_PACKAGE;
- PSymbolInfoPackage = PSYMBOL_INFO_PACKAGE;
- PIMAGEHLP_STACK_FRAME = ^IMAGEHLP_STACK_FRAME;
- {$EXTERNALSYM PIMAGEHLP_STACK_FRAME}
- _IMAGEHLP_STACK_FRAME = record
- InstructionOffset: ULONG64;
- ReturnOffset: ULONG64;
- FrameOffset: ULONG64;
- StackOffset: ULONG64;
- BackingStoreOffset: ULONG64;
- FuncTableEntry: ULONG64;
- Params: array [0..3] of ULONG64;
- Reserved: array [0..4] of ULONG64;
- Virtual_: BOOL;
- Reserved2: ULONG;
- end;
- {$EXTERNALSYM _IMAGEHLP_STACK_FRAME}
- IMAGEHLP_STACK_FRAME = _IMAGEHLP_STACK_FRAME;
- {$EXTERNALSYM IMAGEHLP_STACK_FRAME}
- TImageHlpStackFrame = IMAGEHLP_STACK_FRAME;
- PImageHlpStackFrame = PIMAGEHLP_STACK_FRAME;
- IMAGEHLP_CONTEXT = LPVOID;
- {$EXTERNALSYM IMAGEHLP_CONTEXT}
- PIMAGEHLP_CONTEXT = ^IMAGEHLP_CONTEXT;
- {$EXTERNALSYM PIMAGEHLP_CONTEXT}
- TImageHlpContext = IMAGEHLP_CONTEXT;
- PImageHlpContext = PIMAGEHLP_CONTEXT;
- function SymSetContext(hProcess: HANDLE; StackFrame: PIMAGEHLP_STACK_FRAME; Context: PIMAGEHLP_CONTEXT): BOOL; stdcall;
- {$EXTERNALSYM SymSetContext}
- function SymFromAddr(hProcess: HANDLE; Address: DWORD64; Displacement: PDWORD64; Symbol: PSYMBOL_INFO): BOOL; stdcall;
- {$EXTERNALSYM SymFromAddr}
- // While SymFromName will provide a symbol from a name,
- // SymEnumSymbols can provide the same matching information
- // for ALL symbols with a matching name, even regular
- // expressions. That way you can search across modules
- // and differentiate between identically named symbols.
- function SymFromName(hProcess: HANDLE; Name: LPSTR; Symbol: PSYMBOL_INFO): BOOL; stdcall;
- {$EXTERNALSYM SymFromName}
- type
- PSYM_ENUMERATESYMBOLS_CALLBACK = function (pSymInfo: PSYMBOL_INFO; SymbolSize: ULONG; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PSYM_ENUMERATESYMBOLS_CALLBACK}
- PSymEnumerateSymbolsCallback = PSYM_ENUMERATESYMBOLS_CALLBACK;
- function SymEnumSymbols(hProcess: HANDLE; BaseOfDll: ULONG64; Mask: PCSTR; EnumSymbolsCallback: PSYM_ENUMERATESYMBOLS_CALLBACK; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM SymEnumSymbols}
- function SymEnumSymbolsForAddr(hProcess: HANDLE; Address: DWORD64;
- EnumSymbolsCallback: PSYM_ENUMERATESYMBOLS_CALLBACK; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM SymEnumSymbolsForAddr}
- type
- _IMAGEHLP_SYMBOL_TYPE_INFO = (
- TI_GET_SYMTAG,
- TI_GET_SYMNAME,
- TI_GET_LENGTH,
- TI_GET_TYPE,
- TI_GET_TYPEID,
- TI_GET_BASETYPE,
- TI_GET_ARRAYINDEXTYPEID,
- TI_FINDCHILDREN,
- TI_GET_DATAKIND,
- TI_GET_ADDRESSOFFSET,
- TI_GET_OFFSET,
- TI_GET_VALUE,
- TI_GET_COUNT,
- TI_GET_CHILDRENCOUNT,
- TI_GET_BITPOSITION,
- TI_GET_VIRTUALBASECLASS,
- TI_GET_VIRTUALTABLESHAPEID,
- TI_GET_VIRTUALBASEPOINTEROFFSET,
- TI_GET_CLASSPARENTID,
- TI_GET_NESTED,
- TI_GET_SYMINDEX,
- TI_GET_LEXICALPARENT,
- TI_GET_ADDRESS,
- TI_GET_THISADJUST,
- TI_GET_UDTKIND,
- TI_IS_EQUIV_TO,
- TI_GET_CALLING_CONVENTION);
- {$EXTERNALSYM _IMAGEHLP_SYMBOL_TYPE_INFO}
- IMAGEHLP_SYMBOL_TYPE_INFO = _IMAGEHLP_SYMBOL_TYPE_INFO;
- {$EXTERNALSYM IMAGEHLP_SYMBOL_TYPE_INFO}
- TImageHlpSymbolTypeInfo = IMAGEHLP_SYMBOL_TYPE_INFO;
- PTI_FINDCHILDREN_PARAMS = ^TI_FINDCHILDREN_PARAMS;
- {$EXTERNALSYM PTI_FINDCHILDREN_PARAMS}
- _TI_FINDCHILDREN_PARAMS = record
- Count: ULONG;
- Start: ULONG;
- ChildId: array [0..0] of ULONG;
- end;
- {$EXTERNALSYM _TI_FINDCHILDREN_PARAMS}
- TI_FINDCHILDREN_PARAMS = _TI_FINDCHILDREN_PARAMS;
- {$EXTERNALSYM TI_FINDCHILDREN_PARAMS}
- TTiFindChildrenParams = TI_FINDCHILDREN_PARAMS;
- PTiFindChildrenParams = PTI_FINDCHILDREN_PARAMS;
- function SymGetTypeInfo(hProcess: HANDLE; ModBase: DWORD64; TypeId: ULONG; GetType: IMAGEHLP_SYMBOL_TYPE_INFO; pInfo: PVOID): BOOL; stdcall;
- {$EXTERNALSYM SymGetTypeInfo}
- function SymEnumTypes(hProcess: HANDLE; BaseOfDll: ULONG64; EnumSymbolsCallback: PSYM_ENUMERATESYMBOLS_CALLBACK; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM SymEnumTypes}
- function SymGetTypeFromName(hProcess: HANDLE; BaseOfDll: ULONG64; Name: LPSTR; Symbol: PSYMBOL_INFO): BOOL; stdcall;
- {$EXTERNALSYM SymGetTypeFromName}
- function SymAddSymbol(hProcess: HANDLE; BaseOfDll: ULONG64; Name: PCSTR; Address: DWORD64; Size, Flags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SymAddSymbol}
- function SymDeleteSymbol(hProcess: HANDLE; BaseOfDll: ULONG64; Name: PCSTR; Address: DWORD64; Flags: DWORD): BOOL; stdcall;
- {$EXTERNALSYM SymDeleteSymbol}
- //
- // Full user-mode dump creation.
- //
- type
- PDBGHELP_CREATE_USER_DUMP_CALLBACK = function (DataType: DWORD; var Data: PVOID; DataLength: LPDWORD; UserData: PVOID): BOOL; stdcall;
- {$EXTERNALSYM PDBGHELP_CREATE_USER_DUMP_CALLBACK}
- PDbgHelpCreateUserDumpCallback = PDBGHELP_CREATE_USER_DUMP_CALLBACK;
- function DbgHelpCreateUserDump(FileName: LPSTR; Callback: PDBGHELP_CREATE_USER_DUMP_CALLBACK; UserData: PVOID): BOOL; stdcall;
- {$EXTERNALSYM DbgHelpCreateUserDump}
- function DbgHelpCreateUserDumpW(FileName: LPWSTR; Callback: PDBGHELP_CREATE_USER_DUMP_CALLBACK; UserData: PVOID): BOOL; stdcall;
- {$EXTERNALSYM DbgHelpCreateUserDumpW}
- // -----------------------------------------------------------------
- // The following 4 legacy APIs are fully supported, but newer
- // ones are recommended. SymFromName and SymFromAddr provide
- // much more detailed info on the returned symbol.
- function SymGetSymFromAddr64(hProcess: HANDLE; qwAddr: DWORD64; pdwDisplacement: PDWORD64; Symbol: PIMAGEHLP_SYMBOL64): BOOL; stdcall;
- {$EXTERNALSYM SymGetSymFromAddr64}
- function SymGetSymFromAddr(hProcess: HANDLE; dwAddr: DWORD; pdwDisplacement: PDWORD; Symbol: PIMAGEHLP_SYMBOL): BOOL; stdcall;
- {$EXTERNALSYM SymGetSymFromAddr}
- // While following two APIs will provide a symbol from a name,
- // SymEnumSymbols can provide the same matching information
- // for ALL symbols with a matching name, even regular
- // expressions. That way you can search across modules
- // and differentiate between identically named symbols.
- function SymGetSymFromName64(hProcess: HANDLE; Name: PSTR; Symbol: PIMAGEHLP_SYMBOL64): BOOL; stdcall;
- {$EXTERNALSYM SymGetSymFromName64}
- function SymGetSymFromName(hProcess: HANDLE; Name: PSTR; Symbol: PIMAGEHLP_SYMBOL): BOOL; stdcall;
- {$EXTERNALSYM SymGetSymFromName}
- // -----------------------------------------------------------------
- // The following APIs exist only for backwards compatibility
- // with a pre-release version documented in an MSDN release.
- // You should use SymFindFileInPath if you want to maintain
- // future compatibility.
- function FindFileInPath(hprocess: HANDLE; SearchPath: LPSTR; FileName: LPSTR; id: PVOID; two: DWORD; three: DWORD; flags: DWORD; FilePath: LPSTR): BOOL; stdcall;
- {$EXTERNALSYM FindFileInPath}
- // You should use SymFindFileInPath if you want to maintain
- // future compatibility.
- function FindFileInSearchPath(hprocess: HANDLE; SearchPath: LPSTR; FileName: LPSTR; one: DWORD; two: DWORD; three: DWORD; FilePath: LPSTR): BOOL; stdcall;
- {$EXTERNALSYM FindFileInSearchPath}
- function SymEnumSym(hProcess: HANDLE; BaseOfDll: ULONG64; EnumSymbolsCallback: PSYM_ENUMERATESYMBOLS_CALLBACK; UserContext: PVOID): BOOL; stdcall;
- {$EXTERNALSYM SymEnumSym}
- // These values should not be used.
- // They have been replaced by SYMFLAG_ values.
- const
- SYMF_OMAP_GENERATED = $00000001;
- SYMF_OMAP_MODIFIED = $00000002;
- SYMF_REGISTER = $00000008;
- SYMF_REGREL = $00000010;
- SYMF_FRAMEREL = $00000020;
- SYMF_PARAMETER = $00000040;
- SYMF_LOCAL = $00000080;
- SYMF_CONSTANT = $00000100;
- SYMF_EXPORT = $00000200;
- SYMF_FORWARDER = $00000400;
- SYMF_FUNCTION = $00000800;
- SYMF_VIRTUAL = $00001000;
- SYMF_THUNK = $00002000;
- SYMF_TLSREL = $00004000;
- // These values should also not be used.
- // They have been replaced by SYMFLAG_ values.
- IMAGEHLP_SYMBOL_INFO_VALUEPRESENT = 1;
- IMAGEHLP_SYMBOL_INFO_REGISTER = SYMF_REGISTER; // 0x0008
- IMAGEHLP_SYMBOL_INFO_REGRELATIVE = SYMF_REGREL; // 0x0010
- IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE = SYMF_FRAMEREL; // 0x0020
- IMAGEHLP_SYMBOL_INFO_PARAMETER = SYMF_PARAMETER; // 0x0040
- IMAGEHLP_SYMBOL_INFO_LOCAL = SYMF_LOCAL; // 0x0080
- IMAGEHLP_SYMBOL_INFO_CONSTANT = SYMF_CONSTANT; // 0x0100
- IMAGEHLP_SYMBOL_FUNCTION = SYMF_FUNCTION; // 0x0800
- IMAGEHLP_SYMBOL_VIRTUAL = SYMF_VIRTUAL; // 0x1000
- IMAGEHLP_SYMBOL_THUNK = SYMF_THUNK; // 0x2000
- IMAGEHLP_SYMBOL_INFO_TLSRELATIVE = SYMF_TLSREL; // 0x4000
- const
- MINIDUMP_SIGNATURE = ('PMDM');
- {$EXTERNALSYM MINIDUMP_SIGNATURE}
- MINIDUMP_VERSION = (42899);
- {$EXTERNALSYM MINIDUMP_VERSION}
- type
- RVA = DWORD;
- {$EXTERNALSYM RVA}
- RVA64 = ULONG64;
- {$EXTERNALSYM RVA64}
- _MINIDUMP_LOCATION_DESCRIPTOR = record
- DataSize: ULONG32;
- Rva: RVA;
- end;
- {$EXTERNALSYM _MINIDUMP_LOCATION_DESCRIPTOR}
- MINIDUMP_LOCATION_DESCRIPTOR = _MINIDUMP_LOCATION_DESCRIPTOR;
- {$EXTERNALSYM MINIDUMP_LOCATION_DESCRIPTOR}
- TMinidumpLocationDescriptor = MINIDUMP_LOCATION_DESCRIPTOR;
- PMinidumpLocationDescriptor = ^MINIDUMP_LOCATION_DESCRIPTOR;
- _MINIDUMP_LOCATION_DESCRIPTOR64 = record
- DataSize: ULONG64;
- Rva: RVA64;
- end;
- {$EXTERNALSYM _MINIDUMP_LOCATION_DESCRIPTOR64}
- MINIDUMP_LOCATION_DESCRIPTOR64 = _MINIDUMP_LOCATION_DESCRIPTOR64;
- {$EXTERNALSYM MINIDUMP_LOCATION_DESCRIPTOR64}
- TMinidumpLocationDescriptor64 = MINIDUMP_LOCATION_DESCRIPTOR64;
- PMinidumpLocationDescriptor64 = ^MINIDUMP_LOCATION_DESCRIPTOR64;
- PMINIDUMP_MEMORY_DESCRIPTOR = ^MINIDUMP_MEMORY_DESCRIPTOR;
- {$EXTERNALSYM PMINIDUMP_MEMORY_DESCRIPTOR}
- _MINIDUMP_MEMORY_DESCRIPTOR = record
- StartOfMemoryRange: ULONG64;
- Memory: MINIDUMP_LOCATION_DESCRIPTOR;
- end;
- {$EXTERNALSYM _MINIDUMP_MEMORY_DESCRIPTOR}
- MINIDUMP_MEMORY_DESCRIPTOR = _MINIDUMP_MEMORY_DESCRIPTOR;
- {$EXTERNALSYM MINIDUMP_MEMORY_DESCRIPTOR}
- TMinidumpMemoryDescriptor = MINIDUMP_MEMORY_DESCRIPTOR;
- PMinidumpMemoryDescriptor = PMINIDUMP_MEMORY_DESCRIPTOR;
- // DESCRIPTOR64 is used for full-memory minidumps where
- // all of the raw memory is laid out sequentially at the
- // end of the dump. There is no need for individual RVAs
- // as the RVA is the base RVA plus the sum of the preceeding
- // data blocks.
- PMINIDUMP_MEMORY_DESCRIPTOR64 = ^MINIDUMP_MEMORY_DESCRIPTOR64;
- {$EXTERNALSYM PMINIDUMP_MEMORY_DESCRIPTOR64}
- _MINIDUMP_MEMORY_DESCRIPTOR64 = record
- StartOfMemoryRange: ULONG64;
- DataSize: ULONG64;
- end;
- {$EXTERNALSYM _MINIDUMP_MEMORY_DESCRIPTOR64}
- MINIDUMP_MEMORY_DESCRIPTOR64 = _MINIDUMP_MEMORY_DESCRIPTOR64;
- {$EXTERNALSYM MINIDUMP_MEMORY_DESCRIPTOR64}
- TMinidumpMemoryDescriptor64 = MINIDUMP_MEMORY_DESCRIPTOR64;
- PMinidumpMemoryDescriptor64 = PMINIDUMP_MEMORY_DESCRIPTOR64;
- PMINIDUMP_HEADER = ^MINIDUMP_HEADER;
- {$EXTERNALSYM PMINIDUMP_HEADER}
- _MINIDUMP_HEADER = record
- Signature: ULONG32;
- Version: ULONG32;
- NumberOfStreams: ULONG32;
- StreamDirectoryRva: RVA;
- CheckSum: ULONG32;
- U: record
- case Integer of
- 0: (Reserved: ULONG32);
- 1: (TimeDateStamp: ULONG32);
- end;
- Flags: ULONG64;
- end;
- {$EXTERNALSYM _MINIDUMP_HEADER}
- MINIDUMP_HEADER = _MINIDUMP_HEADER;
- {$EXTERNALSYM MINIDUMP_HEADER}
- TMinidumpHeader = MINIDUMP_HEADER;
- PMinidumpHeader = PMINIDUMP_HEADER;
- //
- // The MINIDUMP_HEADER field StreamDirectoryRva points to
- // an array of MINIDUMP_DIRECTORY structures.
- //
- PMINIDUMP_DIRECTORY = ^MINIDUMP_DIRECTORY;
- {$EXTERNALSYM PMINIDUMP_DIRECTORY}
- _MINIDUMP_DIRECTORY = record
- StreamType: ULONG32;
- Location: MINIDUMP_LOCATION_DESCRIPTOR;
- end;
- {$EXTERNALSYM _MINIDUMP_DIRECTORY}
- MINIDUMP_DIRECTORY = _MINIDUMP_DIRECTORY;
- {$EXTERNALSYM MINIDUMP_DIRECTORY}
- TMinidumpDirectory = MINIDUMP_DIRECTORY;
- PMinidumpDirectory = PMINIDUMP_DIRECTORY;
- PMINIDUMP_STRING = ^MINIDUMP_STRING;
- {$EXTERNALSYM PMINIDUMP_STRING}
- _MINIDUMP_STRING = record
- Length: ULONG32; // Length in bytes of the string
- Buffer: PWCHAR; // Variable size buffer
- end;
- {$EXTERNALSYM _MINIDUMP_STRING}
- MINIDUMP_STRING = _MINIDUMP_STRING;
- {$EXTERNALSYM MINIDUMP_STRING}
- TMinidumpString = MINIDUMP_STRING;
- PMinidumpString = PMINIDUMP_STRING;
- //
- // The MINIDUMP_DIRECTORY field StreamType may be one of the following types.
- // Types will be added in the future, so if a program reading the minidump
- // header encounters a stream type it does not understand it should ignore
- // the data altogether. Any tag above LastReservedStream will not be used by
- // the system and is reserved for program-specific information.
- //
- const
- UnusedStream = 0;
- {$EXTERNALSYM UnusedStream}
- ReservedStream0 = 1;
- {$EXTERNALSYM ReservedStream0}
- ReservedStream1 = 2;
- {$EXTERNALSYM ReservedStream1}
- ThreadListStream = 3;
- {$EXTERNALSYM ThreadListStream}
- ModuleListStream = 4;
- {$EXTERNALSYM ModuleListStream}
- MemoryListStream = 5;
- {$EXTERNALSYM MemoryListStream}
- ExceptionStream = 6;
- {$EXTERNALSYM ExceptionStream}
- SystemInfoStream = 7;
- {$EXTERNALSYM SystemInfoStream}
- ThreadExListStream = 8;
- {$EXTERNALSYM ThreadExListStream}
- Memory64ListStream = 9;
- {$EXTERNALSYM Memory64ListStream}
- CommentStreamA = 10;
- {$EXTERNALSYM CommentStreamA}
- CommentStreamW = 11;
- {$EXTERNALSYM CommentStreamW}
- HandleDataStream = 12;
- {$EXTERNALSYM HandleDataStream}
- FunctionTableStream = 13;
- {$EXTERNALSYM FunctionTableStream}
- UnloadedModuleListStream = 14;
- {$EXTERNALSYM UnloadedModuleListStream}
- MiscInfoStream = 15;
- {$EXTERNALSYM MiscInfoStream}
- LastReservedStream = $ffff;
- {$EXTERNALSYM LastReservedStream}
- type
- _MINIDUMP_STREAM_TYPE = DWORD;
- {$EXTERNALSYM MINIDUMP_STREAM_TYPE}
- MINIDUMP_STREAM_TYPE = _MINIDUMP_STREAM_TYPE;
- {$EXTERNALSYM _MINIDUMP_STREAM_TYPE}
- TMinidumpStreamType = MINIDUMP_STREAM_TYPE;
- //
- // The minidump system information contains processor and
- // Operating System specific information.
- //
- type
- _CPU_INFORMATION = record
- case Integer of
- //
- // X86 platforms use CPUID function to obtain processor information.
- //
- 0: (
- //
- // CPUID Subfunction 0, register EAX (VendorId [0]),
- // EBX (VendorId [1]) and ECX (VendorId [2]).
- //
- VendorId: array [0..2] of ULONG32;
- //
- // CPUID Subfunction 1, register EAX
- //
- VersionInformation: ULONG32;
- //
- // CPUID Subfunction 1, register EDX
- //
- FeatureInformation: ULONG32;
- //
- // CPUID, Subfunction 80000001, register EBX. This will only
- // be obtained if the vendor id is "AuthenticAMD".
- //
- AMDExtendedCpuFeatures: ULONG32);
- //
- // Non-x86 platforms use processor feature flags.
- //
- 1: (
- ProcessorFeatures: array [0..1] of ULONG64);
- end;
- _MINIDUMP_SYSTEM_INFO = record
- //
- // ProcessorArchitecture, ProcessorLevel and ProcessorRevision are all
- // taken from the SYSTEM_INFO structure obtained by GetSystemInfo( ).
- //
- ProcessorArchitecture: USHORT;
- ProcessorLevel: USHORT;
- ProcessorRevision: USHORT;
- U: record
- case Integer of
- 0: (Reserved0: USHORT);
- 1: (
- NumberOfProcessors: UCHAR;
- ProductType: UCHAR);
- end;
- //
- // MajorVersion, MinorVersion, BuildNumber, PlatformId and
- // CSDVersion are all taken from the OSVERSIONINFO structure
- // returned by GetVersionEx( ).
- //
- MajorVersion: ULONG32;
- MinorVersion: ULONG32;
- BuildNumber: ULONG32;
- PlatformId: ULONG32;
- //
- // RVA to a CSDVersion string in the string table.
- //
- CSDVersionRva: RVA;
- U2: record
- case Integer of
- 0: (Reserved1: ULONG32);
- 1: (
- SuiteMask: USHORT;
- Reserved2: USHORT);
- end;
- //
- // CPU information is obtained from one of two places.
- //
- // 1) On x86 computers, CPU_INFORMATION is obtained from the CPUID
- // instruction. You must use the X86 portion of the union for X86
- // computers.
- //
- // 2) On non-x86 architectures, CPU_INFORMATION is obtained by calling
- // IsProcessorFeatureSupported().
- //
- Cpu: _CPU_INFORMATION;
- end;
- {$EXTERNALSYM _MINIDUMP_SYSTEM_INFO}
- MINIDUMP_SYSTEM_INFO = _MINIDUMP_SYSTEM_INFO;
- {$EXTERNALSYM MINIDUMP_SYSTEM_INFO}
- PMINIDUMP_SYSTEM_INFO = ^MINIDUMP_SYSTEM_INFO;
- {$EXTERNALSYM PMINIDUMP_SYSTEM_INFO}
- TMinidumpSystemInfo = MINIDUMP_SYSTEM_INFO;
- PMinidumpSystemInfo = PMINIDUMP_SYSTEM_INFO;
- CPU_INFORMATION = _CPU_INFORMATION;
- {$EXTERNALSYM CPU_INFORMATION}
- PCPU_INFORMATION = CPU_INFORMATION;
- {$EXTERNALSYM PCPU_INFORMATION}
- //
- // The minidump thread contains standard thread
- // information plus an RVA to the memory for this
- // thread and an RVA to the CONTEXT structure for
- // this thread.
- //
- //
- // ThreadId must be 4 bytes on all architectures.
- //
- // C_ASSERT (sizeof ( ((PPROCESS_INFORMATION)0)->dwThreadId ) == 4);
- type
- PMINIDUMP_THREAD = ^MINIDUMP_THREAD;
- {$EXTERNALSYM PMINIDUMP_THREAD}
- _MINIDUMP_THREAD = record
- ThreadId: ULONG32;
- SuspendCount: ULONG32;
- PriorityClass: ULONG32;
- Priority: ULONG32;
- Teb: ULONG64;
- Stack: MINIDUMP_MEMORY_DESCRIPTOR;
- ThreadContext: MINIDUMP_LOCATION_DESCRIPTOR;
- end;
- {$EXTERNALSYM _MINIDUMP_THREAD}
- MINIDUMP_THREAD = _MINIDUMP_THREAD;
- {$EXTERNALSYM MINIDUMP_THREAD}
- TMinidumpThread = MINIDUMP_THREAD;
- PMinidumpThread = PMINIDUMP_THREAD;
- //
- // The thread list is a container of threads.
- //
- PMINIDUMP_THREAD_LIST = ^MINIDUMP_THREAD_LIST;
- {$EXTERNALSYM PMINIDUMP_THREAD_LIST}
- _MINIDUMP_THREAD_LIST = record
- NumberOfThreads: ULONG32;
- Threads: array [0..0] of MINIDUMP_THREAD;
- end;
- {$EXTERNALSYM _MINIDUMP_THREAD_LIST}
- MINIDUMP_THREAD_LIST = _MINIDUMP_THREAD_LIST;
- {$EXTERNALSYM MINIDUMP_THREAD_LIST}
- TMinidumpThreadList = MINIDUMP_THREAD_LIST;
- PMinidumpThreadList = PMINIDUMP_THREAD_LIST;
- PMINIDUMP_THREAD_EX = ^MINIDUMP_THREAD_EX;
- {$EXTERNALSYM PMINIDUMP_THREAD_EX}
- _MINIDUMP_THREAD_EX = record
- ThreadId: ULONG32;
- SuspendCount: ULONG32;
- PriorityClass: ULONG32;
- Priority: ULONG32;
- Teb: ULONG64;
- Stack: MINIDUMP_MEMORY_DESCRIPTOR;
- ThreadContext: MINIDUMP_LOCATION_DESCRIPTOR;
- BackingStore: MINIDUMP_MEMORY_DESCRIPTOR;
- end;
- {$EXTERNALSYM _MINIDUMP_THREAD_EX}
- MINIDUMP_THREAD_EX = _MINIDUMP_THREAD_EX;
- {$EXTERNALSYM MINIDUMP_THREAD_EX}
- TMinidumpThreadEx = MINIDUMP_THREAD_EX;
- PMinidumpThreadEx = PMINIDUMP_THREAD_EX;
- //
- // The thread list is a container of threads.
- //
- PMINIDUMP_THREAD_EX_LIST = ^MINIDUMP_THREAD_EX_LIST;
- {$EXTERNALSYM PMINIDUMP_THREAD_EX_LIST}
- _MINIDUMP_THREAD_EX_LIST = record
- NumberOfThreads: ULONG32;
- Threads: array [0..0] of MINIDUMP_THREAD_EX;
- end;
- {$EXTERNALSYM _MINIDUMP_THREAD_EX_LIST}
- MINIDUMP_THREAD_EX_LIST = _MINIDUMP_THREAD_EX_LIST;
- {$EXTERNALSYM MINIDUMP_THREAD_EX_LIST}
- TMinidumpThreadExList = MINIDUMP_THREAD_EX_LIST;
- PMinidumpThreadExList = PMINIDUMP_THREAD_EX_LIST;
- //
- // The MINIDUMP_EXCEPTION is the same as EXCEPTION on Win64.
- //
- PMINIDUMP_EXCEPTION = ^MINIDUMP_EXCEPTION;
- {$EXTERNALSYM PMINIDUMP_EXCEPTION}
- _MINIDUMP_EXCEPTION = record
- ExceptionCode: ULONG32;
- ExceptionFlags: ULONG32;
- ExceptionRecord: ULONG64;
- ExceptionAddress: ULONG64;
- NumberParameters: ULONG32;
- __unusedAlignment: ULONG32;
- ExceptionInformation: array [0..EXCEPTION_MAXIMUM_PARAMETERS - 1] of ULONG64;
- end;
- {$EXTERNALSYM _MINIDUMP_EXCEPTION}
- MINIDUMP_EXCEPTION = _MINIDUMP_EXCEPTION;
- {$EXTERNALSYM MINIDUMP_EXCEPTION}
- TMinidumpException = MINIDUMP_EXCEPTION;
- PMinidumpException = PMINIDUMP_EXCEPTION;
- //
- // The exception information stream contains the id of the thread that caused
- // the exception (ThreadId), the exception record for the exception
- // (ExceptionRecord) and an RVA to the thread context where the exception
- // occured.
- //
- PMINIDUMP_EXCEPTION_STREAM = ^MINIDUMP_EXCEPTION_STREAM;
- {$EXTERNALSYM PMINIDUMP_EXCEPTION_STREAM}
- _MINIDUMP_EXCEPTION_STREAM = record
- ThreadId: ULONG32;
- __alignment: ULONG32;
- ExceptionRecord: MINIDUMP_EXCEPTION;
- ThreadContext: MINIDUMP_LOCATION_DESCRIPTOR;
- end;
- {$EXTERNALSYM _MINIDUMP_EXCEPTION_STREAM}
- MINIDUMP_EXCEPTION_STREAM = _MINIDUMP_EXCEPTION_STREAM;
- {$EXTERNALSYM MINIDUMP_EXCEPTION_STREAM}
- TMinidumpExceptionStream = MINIDUMP_EXCEPTION_STREAM;
- PMinidumpExceptionStream = PMINIDUMP_EXCEPTION_STREAM;
- //
- // The MINIDUMP_MODULE contains information about a
- // a specific module. It includes the CheckSum and
- // the TimeDateStamp for the module so the module
- // can be reloaded during the analysis phase.
- //
- PMINIDUMP_MODULE = ^MINIDUMP_MODULE;
- {$EXTERNALSYM PMINIDUMP_MODULE}
- _MINIDUMP_MODULE = record
- BaseOfImage: ULONG64;
- SizeOfImage: ULONG32;
- CheckSum: ULONG32;
- TimeDateStamp: ULONG32;
- ModuleNameRva: RVA;
- VersionInfo: VS_FIXEDFILEINFO;
- CvRecord: MINIDUMP_LOCATION_DESCRIPTOR;
- MiscRecord: MINIDUMP_LOCATION_DESCRIPTOR;
- Reserved0: ULONG64; // Reserved for future use.
- Reserved1: ULONG64; // Reserved for future use.
- end;
- {$EXTERNALSYM _MINIDUMP_MODULE}
- MINIDUMP_MODULE = _MINIDUMP_MODULE;
- {$EXTERNALSYM MINIDUMP_MODULE}
- TMinidumpModule = MINIDUMP_MODULE;
- PMinidumpModule = PMINIDUMP_MODULE;
- //
- // The minidump module list is a container for modules.
- //
- PMINIDUMP_MODULE_LIST = ^MINIDUMP_MODULE_LIST;
- {$EXTERNALSYM PMINIDUMP_MODULE_LIST}
- _MINIDUMP_MODULE_LIST = record
- NumberOfModules: ULONG32;
- Modules: array [0..0] of MINIDUMP_MODULE;
- end;
- {$EXTERNALSYM _MINIDUMP_MODULE_LIST}
- MINIDUMP_MODULE_LIST = _MINIDUMP_MODULE_LIST;
- {$EXTERNALSYM MINIDUMP_MODULE_LIST}
- TMinidumpModuleList = MINIDUMP_MODULE_LIST;
- PMinidumpModuleList = PMINIDUMP_MODULE_LIST;
- //
- // Memory Ranges
- //
- PMINIDUMP_MEMORY_LIST = ^MINIDUMP_MEMORY_LIST;
- {$EXTERNALSYM PMINIDUMP_MEMORY_LIST}
- _MINIDUMP_MEMORY_LIST = record
- NumberOfMemoryRanges: ULONG32;
- MemoryRanges: array [0..0] of MINIDUMP_MEMORY_DESCRIPTOR;
- end;
- {$EXTERNALSYM _MINIDUMP_MEMORY_LIST}
- MINIDUMP_MEMORY_LIST = _MINIDUMP_MEMORY_LIST;
- {$EXTERNALSYM MINIDUMP_MEMORY_LIST}
- TMinidumpMemoryList = MINIDUMP_MEMORY_LIST;
- PMinidumpMemoryList = PMINIDUMP_MEMORY_LIST;
- PMINIDUMP_MEMORY64_LIST = ^MINIDUMP_MEMORY64_LIST;
- {$EXTERNALSYM PMINIDUMP_MEMORY64_LIST}
- _MINIDUMP_MEMORY64_LIST = record
- NumberOfMemoryRanges: ULONG64;
- BaseRva: RVA64;
- MemoryRanges: array [0..0] of MINIDUMP_MEMORY_DESCRIPTOR64;
- end;
- {$EXTERNALSYM _MINIDUMP_MEMORY64_LIST}
- MINIDUMP_MEMORY64_LIST = _MINIDUMP_MEMORY64_LIST;
- {$EXTERNALSYM MINIDUMP_MEMORY64_LIST}
- TMinidumpMemory64List = MINIDUMP_MEMORY64_LIST;
- PMinidumpMemory64List = PMINIDUMP_MEMORY64_LIST;
- //
- // Support for user supplied exception information.
- //
- PMINIDUMP_EXCEPTION_INFORMATION = ^MINIDUMP_EXCEPTION_INFORMATION;
- {$EXTERNALSYM PMINIDUMP_EXCEPTION_INFORMATION}
- _MINIDUMP_EXCEPTION_INFORMATION = record
- ThreadId: DWORD;
- ExceptionPointers: PEXCEPTION_POINTERS;
- ClientPointers: BOOL;
- end;
- {$EXTERNALSYM _MINIDUMP_EXCEPTION_INFORMATION}
- MINIDUMP_EXCEPTION_INFORMATION = _MINIDUMP_EXCEPTION_INFORMATION;
- {$EXTERNALSYM MINIDUMP_EXCEPTION_INFORMATION}
- TMinidumpExceptionInformation = MINIDUMP_EXCEPTION_INFORMATION;
- PMinidumpExceptionInformation = PMINIDUMP_EXCEPTION_INFORMATION;
- //
- // Support for capturing system handle state at the time of the dump.
- //
- PMINIDUMP_HANDLE_DESCRIPTOR = ^MINIDUMP_HANDLE_DESCRIPTOR;
- {$EXTERNALSYM PMINIDUMP_HANDLE_DESCRIPTOR}
- _MINIDUMP_HANDLE_DESCRIPTOR = record
- Handle: ULONG64;
- TypeNameRva: RVA;
- ObjectNameRva: RVA;
- Attributes: ULONG32;
- GrantedAccess: ULONG32;
- HandleCount: ULONG32;
- PointerCount: ULONG32;
- end;
- {$EXTERNALSYM _MINIDUMP_HANDLE_DESCRIPTOR}
- MINIDUMP_HANDLE_DESCRIPTOR = _MINIDUMP_HANDLE_DESCRIPTOR;
- {$EXTERNALSYM MINIDUMP_HANDLE_DESCRIPTOR}
- TMinidumpHandleDescriptor = MINIDUMP_HANDLE_DESCRIPTOR;
- PMinidumpHandleDescriptor = PMINIDUMP_HANDLE_DESCRIPTOR;
- PMINIDUMP_HANDLE_DATA_STREAM = ^MINIDUMP_HANDLE_DATA_STREAM;
- {$EXTERNALSYM PMINIDUMP_HANDLE_DATA_STREAM}
- _MINIDUMP_HANDLE_DATA_STREAM = record
- SizeOfHeader: ULONG32;
- SizeOfDescriptor: ULONG32;
- NumberOfDescriptors: ULONG32;
- Reserved: ULONG32;
- end;
- {$EXTERNALSYM _MINIDUMP_HANDLE_DATA_STREAM}
- MINIDUMP_HANDLE_DATA_STREAM = _MINIDUMP_HANDLE_DATA_STREAM;
- {$EXTERNALSYM MINIDUMP_HANDLE_DATA_STREAM}
- TMinidumpHandleDataStream = MINIDUMP_HANDLE_DATA_STREAM;
- PMinidumpHandleDataStream = PMINIDUMP_HANDLE_DATA_STREAM;
- //
- // Support for capturing dynamic function table state at the time of the dump.
- //
- PMINIDUMP_FUNCTION_TABLE_DESCRIPTOR = ^MINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
- {$EXTERNALSYM PMINIDUMP_FUNCTION_TABLE_DESCRIPTOR}
- _MINIDUMP_FUNCTION_TABLE_DESCRIPTOR = record
- MinimumAddress: ULONG64;
- MaximumAddress: ULONG64;
- BaseAddress: ULONG64;
- EntryCount: ULONG32;
- SizeOfAlignPad: ULONG32;
- end;
- {$EXTERNALSYM _MINIDUMP_FUNCTION_TABLE_DESCRIPTOR}
- MINIDUMP_FUNCTION_TABLE_DESCRIPTOR = _MINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
- {$EXTERNALSYM MINIDUMP_FUNCTION_TABLE_DESCRIPTOR}
- TMinidumpFunctionTableDescriptor = MINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
- PMinidumpFunctionTableDescriptor = PMINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
- PMINIDUMP_FUNCTION_TABLE_STREAM = ^MINIDUMP_FUNCTION_TABLE_STREAM;
- {$EXTERNALSYM PMINIDUMP_FUNCTION_TABLE_STREAM}
- _MINIDUMP_FUNCTION_TABLE_STREAM = record
- SizeOfHeader: ULONG32;
- SizeOfDescriptor: ULONG32;
- SizeOfNativeDescriptor: ULONG32;
- SizeOfFunctionEntry: ULONG32;
- NumberOfDescriptors: ULONG32;
- SizeOfAlignPad: ULONG32;
- end;
- {$EXTERNALSYM _MINIDUMP_FUNCTION_TABLE_STREAM}
- MINIDUMP_FUNCTION_TABLE_STREAM = _MINIDUMP_FUNCTION_TABLE_STREAM;
- {$EXTERNALSYM MINIDUMP_FUNCTION_TABLE_STREAM}
- TMinidumpFunctionTableStream = MINIDUMP_FUNCTION_TABLE_STREAM;
- PMinidumpFunctionTableStream = PMINIDUMP_FUNCTION_TABLE_STREAM;
- //
- // The MINIDUMP_UNLOADED_MODULE contains information about a
- // a specific module that was previously loaded but no
- // longer is. This can help with diagnosing problems where
- // callers attempt to call code that is no longer loaded.
- //
- _MINIDUMP_UNLOADED_MODULE = record
- BaseOfImage: ULONG64;
- SizeOfImage: ULONG32;
- CheckSum: ULONG32;
- TimeDateStamp: ULONG32;
- ModuleNameRva: RVA;
- end;
- {$EXTERNALSYM _MINIDUMP_UNLOADED_MODULE}
- MINIDUMP_UNLOADED_MODULE = _MINIDUMP_UNLOADED_MODULE;
- {$EXTERNALSYM MINIDUMP_UNLOADED_MODULE}
- PMINIDUMP_UNLOADED_MODULE = ^MINIDUMP_UNLOADED_MODULE;
- {$EXTERNALSYM PMINIDUMP_UNLOADED_MODULE}
- TMiniDumpUnloadedModule = MINIDUMP_UNLOADED_MODULE;
- PMiniDumpUnloadedModule = PMINIDUMP_UNLOADED_MODULE;
- //
- // The minidump unloaded module list is a container for unloaded modules.
- //
- _MINIDUMP_UNLOADED_MODULE_LIST = record
- SizeOfHeader: ULONG32;
- SizeOfEntry: ULONG32;
- NumberOfEntries: ULONG32;
- end;
- {$EXTERNALSYM _MINIDUMP_UNLOADED_MODULE_LIST}
- MINIDUMP_UNLOADED_MODULE_LIST = _MINIDUMP_UNLOADED_MODULE_LIST;
- {$EXTERNALSYM MINIDUMP_UNLOADED_MODULE_LIST}
- PMINIDUMP_UNLOADED_MODULE_LIST = ^MINIDUMP_UNLOADED_MODULE_LIST;
- {$EXTERNALSYM PMINIDUMP_UNLOADED_MODULE_LIST}
- TMiniDumpUnloadedModuleList = MINIDUMP_UNLOADED_MODULE_LIST;
- PMiniDumpUnloadedModuleList = PMINIDUMP_UNLOADED_MODULE_LIST;
- //
- // The miscellaneous information stream contains a variety
- // of small pieces of information. A member is valid if
- // it's within the available size and its corresponding
- // bit is set.