source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/imagehlp.h@ 1170

Last change on this file since 1170 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 5.1 KB
Line 
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _IMAGEHLP_
7#define _IMAGEHLP_
8
9#include <_mingw_unicode.h>
10
11#ifdef _WIN64
12#ifndef _IMAGEHLP64
13#define _IMAGEHLP64
14#endif
15#endif
16
17#include <wintrust.h>
18
19#include <psdk_inc/_dbg_LOAD_IMAGE.h>
20
21 typedef enum _IMAGEHLP_STATUS_REASON {
22 BindOutOfMemory,
23 BindRvaToVaFailed,
24 BindNoRoomInImage,
25 BindImportModuleFailed,
26 BindImportProcedureFailed,
27 BindImportModule,
28 BindImportProcedure,
29 BindForwarder,
30 BindForwarderNOT,
31 BindImageModified,
32 BindExpandFileHeaders,
33 BindImageComplete,
34 BindMismatchedSymbols,
35 BindSymbolsNotUpdated,
36 BindImportProcedure32,
37 BindImportProcedure64,
38 BindForwarder32,
39 BindForwarder64,
40 BindForwarderNOT32,
41 BindForwarderNOT64
42 } IMAGEHLP_STATUS_REASON;
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48 typedef WINBOOL (WINAPI *PIMAGEHLP_STATUS_ROUTINE)(IMAGEHLP_STATUS_REASON Reason,PCSTR ImageName,PCSTR DllName,ULONG_PTR Va,ULONG_PTR Parameter);
49 typedef WINBOOL (WINAPI *PIMAGEHLP_STATUS_ROUTINE32)(IMAGEHLP_STATUS_REASON Reason,PCSTR ImageName,PCSTR DllName,ULONG Va,ULONG_PTR Parameter);
50 typedef WINBOOL (WINAPI *PIMAGEHLP_STATUS_ROUTINE64)(IMAGEHLP_STATUS_REASON Reason,PCSTR ImageName,PCSTR DllName,ULONG64 Va,ULONG_PTR Parameter);
51
52#define BIND_NO_BOUND_IMPORTS 0x00000001
53#define BIND_NO_UPDATE 0x00000002
54#define BIND_ALL_IMAGES 0x00000004
55#define BIND_CACHE_IMPORT_DLLS 0x00000008
56#define BIND_REPORT_64BIT_VA 0x00000010
57
58#define CHECKSUM_SUCCESS 0
59#define CHECKSUM_OPEN_FAILURE 1
60#define CHECKSUM_MAP_FAILURE 2
61#define CHECKSUM_MAPVIEW_FAILURE 3
62#define CHECKSUM_UNICODE_FAILURE 4
63
64#define SPLITSYM_REMOVE_PRIVATE 0x00000001
65#define SPLITSYM_EXTRACT_ALL 0x00000002
66#define SPLITSYM_SYMBOLPATH_IS_SRC 0x00000004
67
68#define MapFileAndCheckSum __MINGW_NAME_AW(MapFileAndCheckSum)
69
70 WINBOOL IMAGEAPI BindImage(PCSTR ImageName,PCSTR DllPath,PCSTR SymbolPath);
71 WINBOOL IMAGEAPI BindImageEx(DWORD Flags,PCSTR ImageName,PCSTR DllPath,PCSTR SymbolPath,PIMAGEHLP_STATUS_ROUTINE StatusRoutine);
72 WINBOOL IMAGEAPI ReBaseImage(PCSTR CurrentImageName,PCSTR SymbolPath,WINBOOL fReBase,WINBOOL fRebaseSysfileOk,WINBOOL fGoingDown,ULONG CheckImageSize,ULONG *OldImageSize,ULONG_PTR *OldImageBase,ULONG *NewImageSize,ULONG_PTR *NewImageBase,ULONG TimeStamp);
73 WINBOOL IMAGEAPI ReBaseImage64(PCSTR CurrentImageName,PCSTR SymbolPath,WINBOOL fReBase,WINBOOL fRebaseSysfileOk,WINBOOL fGoingDown,ULONG CheckImageSize,ULONG *OldImageSize,ULONG64 *OldImageBase,ULONG *NewImageSize,ULONG64 *NewImageBase,ULONG TimeStamp);
74 WINBOOL IMAGEAPI GetImageConfigInformation(PLOADED_IMAGE LoadedImage,PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation);
75 DWORD IMAGEAPI GetImageUnusedHeaderBytes(PLOADED_IMAGE LoadedImage,PDWORD SizeUnusedHeaderBytes);
76 WINBOOL IMAGEAPI SetImageConfigInformation(PLOADED_IMAGE LoadedImage,PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation);
77 PIMAGE_NT_HEADERS IMAGEAPI CheckSumMappedFile (PVOID BaseAddress,DWORD FileLength,PDWORD HeaderSum,PDWORD CheckSum);
78 DWORD IMAGEAPI MapFileAndCheckSumA(PCSTR Filename,PDWORD HeaderSum,PDWORD CheckSum);
79 DWORD IMAGEAPI MapFileAndCheckSumW(PCWSTR Filename,PDWORD HeaderSum,PDWORD CheckSum);
80
81#define CERT_PE_IMAGE_DIGEST_DEBUG_INFO 0x01
82#define CERT_PE_IMAGE_DIGEST_RESOURCES 0x02
83#define CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO 0x04
84#define CERT_PE_IMAGE_DIGEST_NON_PE_INFO 0x08
85
86#define CERT_SECTION_TYPE_ANY 0xFF
87
88 typedef PVOID DIGEST_HANDLE;
89 typedef WINBOOL (WINAPI *DIGEST_FUNCTION)(DIGEST_HANDLE refdata,PBYTE pData,DWORD dwLength);
90
91 WINBOOL IMAGEAPI ImageGetDigestStream(HANDLE FileHandle,DWORD DigestLevel,DIGEST_FUNCTION DigestFunction,DIGEST_HANDLE DigestHandle);
92 WINBOOL IMAGEAPI ImageAddCertificate(HANDLE FileHandle,LPWIN_CERTIFICATE Certificate,PDWORD Index);
93 WINBOOL IMAGEAPI ImageRemoveCertificate(HANDLE FileHandle,DWORD Index);
94 WINBOOL IMAGEAPI ImageEnumerateCertificates(HANDLE FileHandle,WORD TypeFilter,PDWORD CertificateCount,PDWORD Indices,DWORD IndexCount);
95 WINBOOL IMAGEAPI ImageGetCertificateData(HANDLE FileHandle,DWORD CertificateIndex,LPWIN_CERTIFICATE Certificate,PDWORD RequiredLength);
96 WINBOOL IMAGEAPI ImageGetCertificateHeader(HANDLE FileHandle,DWORD CertificateIndex,LPWIN_CERTIFICATE Certificateheader);
97 PLOADED_IMAGE IMAGEAPI ImageLoad(PCSTR DllName,PCSTR DllPath);
98 WINBOOL IMAGEAPI ImageUnload(PLOADED_IMAGE LoadedImage);
99 WINBOOL IMAGEAPI MapAndLoad(PCSTR ImageName,PCSTR DllPath,PLOADED_IMAGE LoadedImage,WINBOOL DotDll,WINBOOL ReadOnly);
100 WINBOOL IMAGEAPI UnMapAndLoad(PLOADED_IMAGE LoadedImage);
101 WINBOOL IMAGEAPI TouchFileTimes(HANDLE FileHandle,PSYSTEMTIME pSystemTime);
102 WINBOOL IMAGEAPI SplitSymbols(PSTR ImageName,PCSTR SymbolsPath,PSTR SymbolFilePath,DWORD Flags);
103 WINBOOL IMAGEAPI UpdateDebugInfoFile(PCSTR ImageFileName,PCSTR SymbolPath,PSTR DebugFilePath,PIMAGE_NT_HEADERS32 NtHeaders);
104 WINBOOL IMAGEAPI UpdateDebugInfoFileEx(PCSTR ImageFileName,PCSTR SymbolPath,PSTR DebugFilePath,PIMAGE_NT_HEADERS32 NtHeaders,DWORD OldChecksum);
105
106#ifdef __cplusplus
107}
108#endif
109
110#include <psdk_inc/_dbg_common.h>
111
112#endif
Note: See TracBrowser for help on using the repository browser.