ReactOS 0.4.15-dev-7931-gfd331f1
imagehlp.h File Reference
#include <wintrust.h>
Include dependency graph for imagehlp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _LOADED_IMAGE
 
struct  _IMAGE_DEBUG_INFORMATION
 
struct  _tagADDRESS
 
struct  _KDHELP
 
struct  _tagSTACKFRAME
 
struct  API_VERSION
 
struct  _IMAGEHLP_SYMBOL
 
struct  _IMAGEHLP_MODULE
 
struct  _IMAGEHLP_LINE
 
struct  _IMAGEHLP_DEFERRED_SYMBOL_LOAD
 
struct  _IMAGEHLP_DUPLICATE_SYMBOL
 

Macros

#define API_VERSION_NUMBER   7
 
#define BIND_NO_BOUND_IMPORTS   0x00000001
 
#define BIND_NO_UPDATE   0x00000002
 
#define BIND_ALL_IMAGES   0x00000004
 
#define BIND_CACHE_IMPORT_DLLS   0x00000008
 
#define CBA_DEFERRED_SYMBOL_LOAD_START   1
 
#define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE   2
 
#define CBA_DEFERRED_SYMBOL_LOAD_FAILURE   3
 
#define CBA_SYMBOLS_UNLOADED   4
 
#define CBA_DUPLICATE_SYMBOL   5
 
#define CERT_PE_IMAGE_DIGEST_DEBUG_INFO   1
 
#define CERT_PE_IMAGE_DIGEST_RESOURCES   2
 
#define CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO   4
 
#define CERT_PE_IMAGE_DIGEST_NON_PE_INFO   8
 
#define CERT_SECTION_TYPE_ANY   255
 
#define CHECKSUM_SUCCESS   0
 
#define CHECKSUM_OPEN_FAILURE   1
 
#define CHECKSUM_MAP_FAILURE   2
 
#define CHECKSUM_MAPVIEW_FAILURE   3
 
#define CHECKSUM_UNICODE_FAILURE   4
 
#define IMAGE_SEPARATION   65536
 
#define SPLITSYM_REMOVE_PRIVATE   1
 
#define SPLITSYM_EXTRACT_ALL   2
 
#define SPLITSYM_SYMBOLPATH_IS_SRC   4
 
#define SYMF_OMAP_GENERATED   1
 
#define SYMF_OMAP_MODIFIED   2
 
#define SYMOPT_CASE_INSENSITIVE   1
 
#define SYMOPT_UNDNAME   2
 
#define SYMOPT_DEFERRED_LOADS   4
 
#define SYMOPT_NO_CPP   8
 
#define SYMOPT_LOAD_LINES   16
 
#define SYMOPT_OMAP_FIND_NEAREST   32
 
#define UNDNAME_COMPLETE   0
 
#define UNDNAME_NO_LEADING_UNDERSCORES   1
 
#define UNDNAME_NO_MS_KEYWORDS   2
 
#define UNDNAME_NO_FUNCTION_RETURNS   4
 
#define UNDNAME_NO_ALLOCATION_MODEL   8
 
#define UNDNAME_NO_ALLOCATION_LANGUAGE   16
 
#define UNDNAME_NO_MS_THISTYPE   32
 
#define UNDNAME_NO_CV_THISTYPE   64
 
#define UNDNAME_NO_THISTYPE   96
 
#define UNDNAME_NO_ACCESS_SPECIFIERS   128
 
#define UNDNAME_NO_THROW_SIGNATURES   256
 
#define UNDNAME_NO_MEMBER_TYPE   512
 
#define UNDNAME_NO_RETURN_UDT_MODEL   1024
 
#define UNDNAME_32_BIT_DECODE   2048
 
#define UNDNAME_NAME_ONLY   4096
 
#define UNDNAME_NO_ARGUMENTS   8192
 
#define UNDNAME_NO_SPECIAL_SYMS   16384
 
#define IMAGEAPI   DECLSPEC_IMPORT __stdcall
 
#define DBHLP_DEPRECIATED
 
#define DBHLPAPI   IMAGEAPI
 
#define MapFileAndCheckSum   MapFileAndCheckSumA
 

Typedefs

typedef enum _IMAGEHLP_STATUS_REASON IMAGEHLP_STATUS_REASON
 
typedef BOOL(WINAPIPIMAGEHLP_STATUS_ROUTINE) (IMAGEHLP_STATUS_REASON, PCSTR, PCSTR, ULONG_PTR, ULONG_PTR)
 
typedef struct _LOADED_IMAGE LOADED_IMAGE
 
typedef struct _LOADED_IMAGEPLOADED_IMAGE
 
typedef struct _IMAGE_DEBUG_INFORMATION IMAGE_DEBUG_INFORMATION
 
typedef struct _IMAGE_DEBUG_INFORMATIONPIMAGE_DEBUG_INFORMATION
 
typedef struct _tagADDRESS ADDRESS
 
typedef struct _tagADDRESSLPADDRESS
 
typedef struct _KDHELP KDHELP
 
typedef struct _KDHELPPKDHELP
 
typedef struct _tagSTACKFRAME STACKFRAME
 
typedef struct _tagSTACKFRAMELPSTACKFRAME
 
typedef BOOL(WINAPIPREAD_PROCESS_MEMORY_ROUTINE) (HANDLE, LPCVOID, LPVOID, DWORD, LPDWORD)
 
typedef LPVOID(WINAPIPFUNCTION_TABLE_ACCESS_ROUTINE) (HANDLE, DWORD)
 
typedef DWORD(WINAPIPGET_MODULE_BASE_ROUTINE) (HANDLE, DWORD)
 
typedef DWORD(WINAPIPTRANSLATE_ADDRESS_ROUTINE) (HANDLE, HANDLE, LPADDRESS)
 
typedef struct API_VERSION API_VERSION
 
typedef struct API_VERSIONLPAPI_VERSION
 
typedef BOOL(CALLBACKPSYM_ENUMMODULES_CALLBACK) (LPSTR, ULONG, PVOID)
 
typedef BOOL(CALLBACKPSYM_ENUMSYMBOLS_CALLBACK) (LPSTR, ULONG, ULONG, PVOID)
 
typedef BOOL(CALLBACKPENUMLOADED_MODULES_CALLBACK) (LPSTR, ULONG, ULONG, PVOID)
 
typedef BOOL(CALLBACKPSYMBOL_REGISTERED_CALLBACK) (HANDLE, ULONG, PVOID, PVOID)
 
typedef struct _IMAGEHLP_SYMBOL IMAGEHLP_SYMBOL
 
typedef struct _IMAGEHLP_SYMBOLPIMAGEHLP_SYMBOL
 
typedef struct _IMAGEHLP_MODULE IMAGEHLP_MODULE
 
typedef struct _IMAGEHLP_MODULEPIMAGEHLP_MODULE
 
typedef struct _IMAGEHLP_LINE IMAGEHLP_LINE
 
typedef struct _IMAGEHLP_LINEPIMAGEHLP_LINE
 
typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD IMAGEHLP_DEFERRED_SYMBOL_LOAD
 
typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOADPIMAGEHLP_DEFERRED_SYMBOL_LOAD
 
typedef struct _IMAGEHLP_DUPLICATE_SYMBOL IMAGEHLP_DUPLICATE_SYMBOL
 
typedef struct _IMAGEHLP_DUPLICATE_SYMBOLPIMAGEHLP_DUPLICATE_SYMBOL
 
typedef PVOID DIGEST_HANDLE
 
typedef BOOL(WINAPIDIGEST_FUNCTION) (DIGEST_HANDLE refdata, PBYTE pData, DWORD dwLength)
 

Enumerations

enum  _IMAGEHLP_STATUS_REASON {
  BindOutOfMemory , BindRvaToVaFailed , BindNoRoomInImage , BindImportModuleFailed ,
  BindImportProcedureFailed , BindImportModule , BindImportProcedure , BindForwarder ,
  BindForwarderNOT , BindImageModified , BindExpandFileHeaders , BindImageComplete ,
  BindMismatchedSymbols , BindSymbolsNotUpdated
}
 
enum  ADDRESS_MODE {
  AddrMode1616 , AddrMode1632 , AddrModeReal , AddrModeFlat ,
  AddrMode1616 , AddrMode1632 , AddrModeReal , AddrModeFlat ,
  AddrMode1616 , AddrMode1632 , AddrModeReal , AddrModeFlat
}
 
enum  SYM_TYPE {
  SymNone = 0 , SymCoff , SymCv , SymPdb ,
  SymExport , SymDeferred , SymSym , SymDia ,
  SymVirtual , NumSymTypes , SymNone = 0 , SymCoff ,
  SymCv , SymPdb , SymExport , SymDeferred ,
  SymSym , SymDia , SymVirtual , NumSymTypes ,
  SymNone , SymCoff , SymCv , SymPdb ,
  SymExport , SymDeferred , SymSym
}
 

Functions

PIMAGE_NT_HEADERS IMAGEAPI CheckSumMappedFile (LPVOID, DWORD, LPDWORD, LPDWORD)
 
DWORD IMAGEAPI MapFileAndCheckSumA (PCSTR, LPDWORD, LPDWORD)
 
DWORD IMAGEAPI MapFileAndCheckSumW (PCWSTR, LPDWORD, LPDWORD)
 
BOOL IMAGEAPI TouchFileTimes (HANDLE, LPSYSTEMTIME)
 
BOOL IMAGEAPI SplitSymbols (PSTR, PCSTR, PSTR, DWORD)
 
HANDLE IMAGEAPI FindDebugInfoFile (PCSTR, PCSTR, PSTR)
 
HANDLE IMAGEAPI FindExecutableImage (PCSTR, PCSTR, PSTR)
 
BOOL IMAGEAPI UpdateDebugInfoFile (PCSTR, PCSTR, PSTR, PIMAGE_NT_HEADERS32)
 
BOOL IMAGEAPI UpdateDebugInfoFileEx (PCSTR, PCSTR, PSTR, PIMAGE_NT_HEADERS32, DWORD)
 
BOOL IMAGEAPI BindImage (IN PCSTR, IN PCSTR, IN PCSTR)
 
BOOL IMAGEAPI BindImageEx (IN DWORD, IN LPCSTR, IN LPCSTR, IN LPCSTR, IN PIMAGEHLP_STATUS_ROUTINE)
 
BOOL IMAGEAPI ReBaseImage (IN PCSTR, IN PCSTR, IN BOOL, IN BOOL, IN BOOL, IN ULONG, OUT ULONG *, OUT ULONG_PTR *, OUT ULONG *, IN OUT ULONG_PTR *, IN ULONG)
 
PLOADED_IMAGE IMAGEAPI ImageLoad (PCSTR, PCSTR)
 
BOOL IMAGEAPI ImageUnload (PLOADED_IMAGE)
 
PIMAGE_NT_HEADERS IMAGEAPI ImageNtHeader (IN PVOID)
 
PVOID IMAGEAPI ImageDirectoryEntryToData (IN PVOID, IN BOOLEAN, IN USHORT, OUT PULONG)
 
PVOID IMAGEAPI ImageDirectoryEntryToDataEx (IN PVOID Base, IN BOOLEAN MappedAsImage, IN USHORT DirectoryEntry, OUT PULONG Size, OUT PIMAGE_SECTION_HEADER *FoundSection OPTIONAL)
 
PVOID IMAGEAPI ImageDirectoryEntryToData32 (PVOID Base, BOOLEAN MappedAsImage, USHORT DirectoryEntry, PULONG Size, PIMAGE_SECTION_HEADER *FoundHeader OPTIONAL, PIMAGE_FILE_HEADER FileHeader, PIMAGE_OPTIONAL_HEADER OptionalHeader)
 
PIMAGE_SECTION_HEADER IMAGEAPI ImageRvaToSection (IN PIMAGE_NT_HEADERS, IN PVOID, IN ULONG)
 
PVOID IMAGEAPI ImageRvaToVa (IN PIMAGE_NT_HEADERS, IN PVOID, IN ULONG, IN OUT PIMAGE_SECTION_HEADER *)
 
BOOL IMAGEAPI MapAndLoad (PCSTR, PCSTR, PLOADED_IMAGE, BOOL, BOOL)
 
BOOL IMAGEAPI GetImageConfigInformation (PLOADED_IMAGE, PIMAGE_LOAD_CONFIG_DIRECTORY)
 
DWORD IMAGEAPI GetImageUnusedHeaderBytes (PLOADED_IMAGE, LPDWORD)
 
BOOL IMAGEAPI SetImageConfigInformation (PLOADED_IMAGE, PIMAGE_LOAD_CONFIG_DIRECTORY)
 
BOOL IMAGEAPI UnMapAndLoad (PLOADED_IMAGE)
 
PIMAGE_DEBUG_INFORMATION IMAGEAPI MapDebugInformation (HANDLE, PCSTR, PCSTR, DWORD)
 
BOOL IMAGEAPI UnmapDebugInformation (PIMAGE_DEBUG_INFORMATION)
 
BOOL IMAGEAPI SearchTreeForFile (PCSTR, PCSTR, PSTR)
 
BOOL IMAGEAPI MakeSureDirectoryPathExists (LPCSTR)
 
DWORD IMAGEAPI WINAPI UnDecorateSymbolName (LPCSTR, LPSTR, DWORD, DWORD)
 
BOOL IMAGEAPI StackWalk (DWORD, HANDLE, HANDLE, LPSTACKFRAME, LPVOID, PREAD_PROCESS_MEMORY_ROUTINE, PFUNCTION_TABLE_ACCESS_ROUTINE, PGET_MODULE_BASE_ROUTINE, PTRANSLATE_ADDRESS_ROUTINE)
 
LPAPI_VERSION IMAGEAPI ImagehlpApiVersion (VOID)
 
LPAPI_VERSION IMAGEAPI ImagehlpApiVersionEx (LPAPI_VERSION)
 
DWORD IMAGEAPI GetTimestampForLoadedLibrary (HMODULE)
 
BOOL IMAGEAPI RemovePrivateCvSymbolic (PCHAR, PCHAR *, ULONG *)
 
VOID IMAGEAPI RemoveRelocations (PCHAR)
 
DWORD IMAGEAPI SymSetOptions (IN DWORD)
 
DWORD IMAGEAPI SymGetOptions (VOID)
 
BOOL IMAGEAPI SymCleanup (IN HANDLE)
 
BOOL IMAGEAPI SymEnumerateModules (IN HANDLE, IN PSYM_ENUMMODULES_CALLBACK, IN PVOID)
 
BOOL IMAGEAPI SymEnumerateSymbols (IN HANDLE, IN DWORD, IN PSYM_ENUMSYMBOLS_CALLBACK, IN PVOID)
 
BOOL IMAGEAPI EnumerateLoadedModules (IN HANDLE, IN PENUMLOADED_MODULES_CALLBACK, IN PVOID)
 
LPVOID IMAGEAPI SymFunctionTableAccess (HANDLE, DWORD)
 
BOOL IMAGEAPI SymGetModuleInfo (IN HANDLE, IN DWORD, OUT PIMAGEHLP_MODULE)
 
DWORD IMAGEAPI SymGetModuleBase (IN HANDLE, IN DWORD)
 
BOOL IMAGEAPI SymGetSymFromAddr (IN HANDLE, IN DWORD, OUT PDWORD, OUT PIMAGEHLP_SYMBOL)
 
BOOL IMAGEAPI SymGetSymFromName (IN HANDLE, IN LPSTR, OUT PIMAGEHLP_SYMBOL)
 
BOOL IMAGEAPI SymGetSymNext (IN HANDLE, IN OUT PIMAGEHLP_SYMBOL)
 
BOOL IMAGEAPI SymGetSymPrev (IN HANDLE, IN OUT PIMAGEHLP_SYMBOL)
 
BOOL IMAGEAPI SymGetLineFromAddr (IN HANDLE, IN DWORD, OUT PDWORD, OUT PIMAGEHLP_LINE)
 
BOOL IMAGEAPI SymGetLineFromName (IN HANDLE, IN LPSTR, IN LPSTR, IN DWORD, OUT PLONG, IN OUT PIMAGEHLP_LINE)
 
BOOL IMAGEAPI SymGetLineNext (IN HANDLE, IN OUT PIMAGEHLP_LINE)
 
BOOL IMAGEAPI SymGetLinePrev (IN HANDLE, IN OUT PIMAGEHLP_LINE)
 
BOOL IMAGEAPI SymMatchFileName (IN LPSTR, IN LPSTR, OUT LPSTR *, OUT LPSTR *)
 
BOOL IMAGEAPI SymInitialize (IN HANDLE, IN LPSTR, IN BOOL)
 
BOOL IMAGEAPI SymGetSearchPath (IN HANDLE, OUT LPSTR, IN DWORD)
 
BOOL IMAGEAPI SymSetSearchPath (IN HANDLE, IN LPSTR)
 
DWORD IMAGEAPI SymLoadModule (IN HANDLE, IN HANDLE, IN PSTR, IN PSTR, IN DWORD, IN DWORD)
 
BOOL IMAGEAPI SymUnloadModule (IN HANDLE, IN DWORD)
 
BOOL IMAGEAPI SymUnDName (IN PIMAGEHLP_SYMBOL, OUT LPSTR, IN DWORD)
 
BOOL IMAGEAPI SymRegisterCallback (IN HANDLE, IN PSYMBOL_REGISTERED_CALLBACK, IN PVOID)
 
BOOL IMAGEAPI ImageGetDigestStream (IN HANDLE, IN DWORD, IN DIGEST_FUNCTION, IN DIGEST_HANDLE)
 
BOOL IMAGEAPI ImageAddCertificate (IN HANDLE, IN LPWIN_CERTIFICATE, OUT PDWORD)
 
BOOL IMAGEAPI ImageRemoveCertificate (IN HANDLE, IN DWORD)
 
BOOL IMAGEAPI ImageEnumerateCertificates (IN HANDLE, IN WORD, OUT PDWORD, IN OUT PDWORD OPTIONAL, IN OUT DWORD OPTIONAL)
 
BOOL IMAGEAPI ImageGetCertificateData (IN HANDLE, IN DWORD, OUT LPWIN_CERTIFICATE, IN OUT PDWORD)
 
BOOL IMAGEAPI ImageGetCertificateHeader (IN HANDLE, IN DWORD, IN OUT LPWIN_CERTIFICATE)
 
BOOL IMAGEAPI CopyPdb (CHAR const *, CHAR const *, BOOL)
 
BOOL IMAGEAPI RemovePrivateCvSymbolicEx (PCHAR, ULONG, PCHAR *, ULONG *)
 

Macro Definition Documentation

◆ API_VERSION_NUMBER

#define API_VERSION_NUMBER   7

Definition at line 33 of file imagehlp.h.

◆ BIND_ALL_IMAGES

#define BIND_ALL_IMAGES   0x00000004

Definition at line 36 of file imagehlp.h.

◆ BIND_CACHE_IMPORT_DLLS

#define BIND_CACHE_IMPORT_DLLS   0x00000008

Definition at line 37 of file imagehlp.h.

◆ BIND_NO_BOUND_IMPORTS

#define BIND_NO_BOUND_IMPORTS   0x00000001

Definition at line 34 of file imagehlp.h.

◆ BIND_NO_UPDATE

#define BIND_NO_UPDATE   0x00000002

Definition at line 35 of file imagehlp.h.

◆ CBA_DEFERRED_SYMBOL_LOAD_COMPLETE

#define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE   2

Definition at line 39 of file imagehlp.h.

◆ CBA_DEFERRED_SYMBOL_LOAD_FAILURE

#define CBA_DEFERRED_SYMBOL_LOAD_FAILURE   3

Definition at line 40 of file imagehlp.h.

◆ CBA_DEFERRED_SYMBOL_LOAD_START

#define CBA_DEFERRED_SYMBOL_LOAD_START   1

Definition at line 38 of file imagehlp.h.

◆ CBA_DUPLICATE_SYMBOL

#define CBA_DUPLICATE_SYMBOL   5

Definition at line 42 of file imagehlp.h.

◆ CBA_SYMBOLS_UNLOADED

#define CBA_SYMBOLS_UNLOADED   4

Definition at line 41 of file imagehlp.h.

◆ CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO

#define CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO   4

Definition at line 45 of file imagehlp.h.

◆ CERT_PE_IMAGE_DIGEST_DEBUG_INFO

#define CERT_PE_IMAGE_DIGEST_DEBUG_INFO   1

Definition at line 43 of file imagehlp.h.

◆ CERT_PE_IMAGE_DIGEST_NON_PE_INFO

#define CERT_PE_IMAGE_DIGEST_NON_PE_INFO   8

Definition at line 46 of file imagehlp.h.

◆ CERT_PE_IMAGE_DIGEST_RESOURCES

#define CERT_PE_IMAGE_DIGEST_RESOURCES   2

Definition at line 44 of file imagehlp.h.

◆ CERT_SECTION_TYPE_ANY

#define CERT_SECTION_TYPE_ANY   255

Definition at line 47 of file imagehlp.h.

◆ CHECKSUM_MAP_FAILURE

#define CHECKSUM_MAP_FAILURE   2

Definition at line 50 of file imagehlp.h.

◆ CHECKSUM_MAPVIEW_FAILURE

#define CHECKSUM_MAPVIEW_FAILURE   3

Definition at line 51 of file imagehlp.h.

◆ CHECKSUM_OPEN_FAILURE

#define CHECKSUM_OPEN_FAILURE   1

Definition at line 49 of file imagehlp.h.

◆ CHECKSUM_SUCCESS

#define CHECKSUM_SUCCESS   0

Definition at line 48 of file imagehlp.h.

◆ CHECKSUM_UNICODE_FAILURE

#define CHECKSUM_UNICODE_FAILURE   4

Definition at line 52 of file imagehlp.h.

◆ DBHLP_DEPRECIATED

#define DBHLP_DEPRECIATED

Definition at line 91 of file imagehlp.h.

◆ DBHLPAPI

#define DBHLPAPI   IMAGEAPI

Definition at line 95 of file imagehlp.h.

◆ IMAGE_SEPARATION

#define IMAGE_SEPARATION   65536

Definition at line 53 of file imagehlp.h.

◆ IMAGEAPI

Definition at line 87 of file imagehlp.h.

◆ MapFileAndCheckSum

#define MapFileAndCheckSum   MapFileAndCheckSumA

Definition at line 394 of file imagehlp.h.

◆ SPLITSYM_EXTRACT_ALL

#define SPLITSYM_EXTRACT_ALL   2

Definition at line 55 of file imagehlp.h.

◆ SPLITSYM_REMOVE_PRIVATE

#define SPLITSYM_REMOVE_PRIVATE   1

Definition at line 54 of file imagehlp.h.

◆ SPLITSYM_SYMBOLPATH_IS_SRC

#define SPLITSYM_SYMBOLPATH_IS_SRC   4

Definition at line 56 of file imagehlp.h.

◆ SYMF_OMAP_GENERATED

#define SYMF_OMAP_GENERATED   1

Definition at line 57 of file imagehlp.h.

◆ SYMF_OMAP_MODIFIED

#define SYMF_OMAP_MODIFIED   2

Definition at line 58 of file imagehlp.h.

◆ SYMOPT_CASE_INSENSITIVE

#define SYMOPT_CASE_INSENSITIVE   1

Definition at line 59 of file imagehlp.h.

◆ SYMOPT_DEFERRED_LOADS

#define SYMOPT_DEFERRED_LOADS   4

Definition at line 61 of file imagehlp.h.

◆ SYMOPT_LOAD_LINES

#define SYMOPT_LOAD_LINES   16

Definition at line 63 of file imagehlp.h.

◆ SYMOPT_NO_CPP

#define SYMOPT_NO_CPP   8

Definition at line 62 of file imagehlp.h.

◆ SYMOPT_OMAP_FIND_NEAREST

#define SYMOPT_OMAP_FIND_NEAREST   32

Definition at line 64 of file imagehlp.h.

◆ SYMOPT_UNDNAME

#define SYMOPT_UNDNAME   2

Definition at line 60 of file imagehlp.h.

◆ UNDNAME_32_BIT_DECODE

#define UNDNAME_32_BIT_DECODE   2048

Definition at line 78 of file imagehlp.h.

◆ UNDNAME_COMPLETE

#define UNDNAME_COMPLETE   0

Definition at line 65 of file imagehlp.h.

◆ UNDNAME_NAME_ONLY

#define UNDNAME_NAME_ONLY   4096

Definition at line 79 of file imagehlp.h.

◆ UNDNAME_NO_ACCESS_SPECIFIERS

#define UNDNAME_NO_ACCESS_SPECIFIERS   128

Definition at line 74 of file imagehlp.h.

◆ UNDNAME_NO_ALLOCATION_LANGUAGE

#define UNDNAME_NO_ALLOCATION_LANGUAGE   16

Definition at line 70 of file imagehlp.h.

◆ UNDNAME_NO_ALLOCATION_MODEL

#define UNDNAME_NO_ALLOCATION_MODEL   8

Definition at line 69 of file imagehlp.h.

◆ UNDNAME_NO_ARGUMENTS

#define UNDNAME_NO_ARGUMENTS   8192

Definition at line 80 of file imagehlp.h.

◆ UNDNAME_NO_CV_THISTYPE

#define UNDNAME_NO_CV_THISTYPE   64

Definition at line 72 of file imagehlp.h.

◆ UNDNAME_NO_FUNCTION_RETURNS

#define UNDNAME_NO_FUNCTION_RETURNS   4

Definition at line 68 of file imagehlp.h.

◆ UNDNAME_NO_LEADING_UNDERSCORES

#define UNDNAME_NO_LEADING_UNDERSCORES   1

Definition at line 66 of file imagehlp.h.

◆ UNDNAME_NO_MEMBER_TYPE

#define UNDNAME_NO_MEMBER_TYPE   512

Definition at line 76 of file imagehlp.h.

◆ UNDNAME_NO_MS_KEYWORDS

#define UNDNAME_NO_MS_KEYWORDS   2

Definition at line 67 of file imagehlp.h.

◆ UNDNAME_NO_MS_THISTYPE

#define UNDNAME_NO_MS_THISTYPE   32

Definition at line 71 of file imagehlp.h.

◆ UNDNAME_NO_RETURN_UDT_MODEL

#define UNDNAME_NO_RETURN_UDT_MODEL   1024

Definition at line 77 of file imagehlp.h.

◆ UNDNAME_NO_SPECIAL_SYMS

#define UNDNAME_NO_SPECIAL_SYMS   16384

Definition at line 81 of file imagehlp.h.

◆ UNDNAME_NO_THISTYPE

#define UNDNAME_NO_THISTYPE   96

Definition at line 73 of file imagehlp.h.

◆ UNDNAME_NO_THROW_SIGNATURES

#define UNDNAME_NO_THROW_SIGNATURES   256

Definition at line 75 of file imagehlp.h.

Typedef Documentation

◆ ADDRESS

◆ API_VERSION

◆ DIGEST_FUNCTION

typedef BOOL(WINAPI * DIGEST_FUNCTION) (DIGEST_HANDLE refdata, PBYTE pData, DWORD dwLength)

Definition at line 314 of file imagehlp.h.

◆ DIGEST_HANDLE

Definition at line 313 of file imagehlp.h.

◆ IMAGE_DEBUG_INFORMATION

◆ IMAGEHLP_DEFERRED_SYMBOL_LOAD

◆ IMAGEHLP_DUPLICATE_SYMBOL

◆ IMAGEHLP_LINE

◆ IMAGEHLP_MODULE

◆ IMAGEHLP_STATUS_REASON

◆ IMAGEHLP_SYMBOL

◆ KDHELP

◆ LOADED_IMAGE

◆ LPADDRESS

◆ LPAPI_VERSION

◆ LPSTACKFRAME

◆ PENUMLOADED_MODULES_CALLBACK

typedef BOOL(CALLBACK * PENUMLOADED_MODULES_CALLBACK) (LPSTR, ULONG, ULONG, PVOID)

Definition at line 212 of file imagehlp.h.

◆ PFUNCTION_TABLE_ACCESS_ROUTINE

typedef LPVOID(WINAPI * PFUNCTION_TABLE_ACCESS_ROUTINE) (HANDLE, DWORD)

Definition at line 201 of file imagehlp.h.

◆ PGET_MODULE_BASE_ROUTINE

typedef DWORD(WINAPI * PGET_MODULE_BASE_ROUTINE) (HANDLE, DWORD)

Definition at line 202 of file imagehlp.h.

◆ PIMAGE_DEBUG_INFORMATION

◆ PIMAGEHLP_DEFERRED_SYMBOL_LOAD

◆ PIMAGEHLP_DUPLICATE_SYMBOL

◆ PIMAGEHLP_LINE

◆ PIMAGEHLP_MODULE

◆ PIMAGEHLP_STATUS_ROUTINE

typedef BOOL(WINAPI * PIMAGEHLP_STATUS_ROUTINE) (IMAGEHLP_STATUS_REASON, PCSTR, PCSTR, ULONG_PTR, ULONG_PTR)

Definition at line 115 of file imagehlp.h.

◆ PIMAGEHLP_SYMBOL

◆ PKDHELP

◆ PLOADED_IMAGE

◆ PREAD_PROCESS_MEMORY_ROUTINE

typedef BOOL(WINAPI * PREAD_PROCESS_MEMORY_ROUTINE) (HANDLE,LPCVOID, LPVOID, DWORD, LPDWORD)

Definition at line 200 of file imagehlp.h.

◆ PSYM_ENUMMODULES_CALLBACK

typedef BOOL(CALLBACK * PSYM_ENUMMODULES_CALLBACK) (LPSTR, ULONG, PVOID)

Definition at line 210 of file imagehlp.h.

◆ PSYM_ENUMSYMBOLS_CALLBACK

typedef BOOL(CALLBACK * PSYM_ENUMSYMBOLS_CALLBACK) (LPSTR, ULONG, ULONG, PVOID)

Definition at line 211 of file imagehlp.h.

◆ PSYMBOL_REGISTERED_CALLBACK

typedef BOOL(CALLBACK * PSYMBOL_REGISTERED_CALLBACK) (HANDLE, ULONG, PVOID, PVOID)

Definition at line 213 of file imagehlp.h.

◆ PTRANSLATE_ADDRESS_ROUTINE

typedef DWORD(WINAPI * PTRANSLATE_ADDRESS_ROUTINE) (HANDLE, HANDLE, LPADDRESS)

Definition at line 203 of file imagehlp.h.

◆ STACKFRAME

Enumeration Type Documentation

◆ _IMAGEHLP_STATUS_REASON

Enumerator
BindOutOfMemory 
BindRvaToVaFailed 
BindNoRoomInImage 
BindImportModuleFailed 
BindImportProcedureFailed 
BindImportModule 
BindImportProcedure 
BindForwarder 
BindForwarderNOT 
BindImageModified 
BindExpandFileHeaders 
BindImageComplete 
BindMismatchedSymbols 
BindSymbolsNotUpdated 

Definition at line 99 of file imagehlp.h.

99 {
enum _IMAGEHLP_STATUS_REASON IMAGEHLP_STATUS_REASON
@ BindImportModule
Definition: imagehlp.h:105
@ BindNoRoomInImage
Definition: imagehlp.h:102
@ BindImageModified
Definition: imagehlp.h:109
@ BindMismatchedSymbols
Definition: imagehlp.h:112
@ BindSymbolsNotUpdated
Definition: imagehlp.h:113
@ BindForwarderNOT
Definition: imagehlp.h:108
@ BindImportModuleFailed
Definition: imagehlp.h:103
@ BindForwarder
Definition: imagehlp.h:107
@ BindImportProcedureFailed
Definition: imagehlp.h:104
@ BindExpandFileHeaders
Definition: imagehlp.h:110
@ BindRvaToVaFailed
Definition: imagehlp.h:101
@ BindImportProcedure
Definition: imagehlp.h:106
@ BindImageComplete
Definition: imagehlp.h:111
@ BindOutOfMemory
Definition: imagehlp.h:100

◆ ADDRESS_MODE

Enumerator
AddrMode1616 
AddrMode1632 
AddrModeReal 
AddrModeFlat 
AddrMode1616 
AddrMode1632 
AddrModeReal 
AddrModeFlat 
AddrMode1616 
AddrMode1632 
AddrModeReal 
AddrModeFlat 

Definition at line 168 of file imagehlp.h.

168 {
ADDRESS_MODE
Definition: imagehlp.h:168
@ AddrModeReal
Definition: imagehlp.h:171
@ AddrModeFlat
Definition: imagehlp.h:172
@ AddrMode1616
Definition: imagehlp.h:169
@ AddrMode1632
Definition: imagehlp.h:170

◆ SYM_TYPE

Enumerator
SymNone 
SymCoff 
SymCv 
SymPdb 
SymExport 
SymDeferred 
SymSym 
SymDia 
SymVirtual 
NumSymTypes 
SymNone 
SymCoff 
SymCv 
SymPdb 
SymExport 
SymDeferred 
SymSym 
SymDia 
SymVirtual 
NumSymTypes 
SymNone 
SymCoff 
SymCv 
SymPdb 
SymExport 
SymDeferred 
SymSym 

Definition at line 214 of file imagehlp.h.

214 {
215 SymNone,
216 SymCoff,
217 SymCv,
218 SymPdb,
219 SymExport,
221 SymSym
222} SYM_TYPE;
SYM_TYPE
Definition: imagehlp.h:214
@ SymNone
Definition: imagehlp.h:215
@ SymCv
Definition: imagehlp.h:217
@ SymDeferred
Definition: imagehlp.h:220
@ SymExport
Definition: imagehlp.h:219
@ SymCoff
Definition: imagehlp.h:216
@ SymSym
Definition: imagehlp.h:221
@ SymPdb
Definition: imagehlp.h:218

Function Documentation

◆ BindImage()

BOOL IMAGEAPI BindImage ( IN  PCSTR,
IN  PCSTR,
IN  PCSTR 
)

◆ BindImageEx()

BOOL IMAGEAPI BindImageEx ( IN  DWORD,
IN  LPCSTR,
IN  LPCSTR,
IN  LPCSTR,
IN  PIMAGEHLP_STATUS_ROUTINE 
)

◆ CheckSumMappedFile()

PIMAGE_NT_HEADERS IMAGEAPI CheckSumMappedFile ( LPVOID  BaseAddress,
DWORD  FileLength,
LPDWORD  HeaderSum,
LPDWORD  CheckSum 
)

Definition at line 187 of file modify.c.

190{
192 DWORD CalcSum;
193 DWORD HdrSum;
194
195 TRACE("(%p, %d, %p, %p)\n", BaseAddress, FileLength, HeaderSum, CheckSum);
196
197 CalcSum = CalcCheckSum(0, BaseAddress, (FileLength + 1) / sizeof(WORD));
199
200 if (!header)
201 return NULL;
202
203 *HeaderSum = HdrSum = header->OptionalHeader.CheckSum;
204
205 /* Subtract image checksum from calculated checksum. */
206 /* fix low word of checksum */
207 if (LOWORD(CalcSum) >= LOWORD(HdrSum))
208 {
209 CalcSum -= LOWORD(HdrSum);
210 }
211 else
212 {
213 CalcSum = ((LOWORD(CalcSum) - LOWORD(HdrSum)) & 0xFFFF) - 1;
214 }
215
216 /* fix high word of checksum */
217 if (LOWORD(CalcSum) >= HIWORD(HdrSum))
218 {
219 CalcSum -= HIWORD(HdrSum);
220 }
221 else
222 {
223 CalcSum = ((LOWORD(CalcSum) - HIWORD(HdrSum)) & 0xFFFF) - 1;
224 }
225
226 /* add file length */
227 CalcSum += FileLength;
228
229 *CheckSum = CalcSum;
230
231 return header;
232}
#define NULL
Definition: types.h:112
#define RtlImageNtHeader
Definition: compat.h:806
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
static WORD CalcCheckSum(DWORD StartValue, LPVOID BaseAddress, DWORD WordCount)
Definition: modify.c:161
_Out_ PNDIS_HANDLE _Out_ PUINT FileLength
Definition: ndis.h:3228
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
#define LOWORD(l)
Definition: pedump.c:82
#define TRACE(s)
Definition: solgame.cpp:4
#define HIWORD(l)
Definition: typedefs.h:247

Referenced by IMAGEHLP_RecalculateChecksum(), MapFileAndCheckSumA(), and MapFileAndCheckSumW().

◆ CopyPdb()

BOOL IMAGEAPI CopyPdb ( CHAR const ,
CHAR const ,
BOOL   
)

◆ EnumerateLoadedModules()

BOOL IMAGEAPI EnumerateLoadedModules ( IN  HANDLE,
IN  PENUMLOADED_MODULES_CALLBACK,
IN  PVOID 
)

◆ FindDebugInfoFile()

HANDLE IMAGEAPI FindDebugInfoFile ( PCSTR  FileName,
PCSTR  SymbolPath,
PSTR  DebugFilePath 
)

Definition at line 66 of file path.c.

67{
68 HANDLE h;
69
73 {
74 if (!SearchPathA(SymbolPath, file_nameA(FileName), NULL, MAX_PATH, DebugFilePath, NULL))
75 return NULL;
78 }
79 return (h == INVALID_HANDLE_VALUE) ? NULL : h;
80}
#define OPEN_EXISTING
Definition: compat.h:775
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:740
#define GENERIC_READ
Definition: compat.h:135
#define MAX_PATH
Definition: compat.h:34
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define FILE_SHARE_READ
Definition: compat.h:136
const char * file_nameA(const char *str)
Definition: path.c:37
DWORD WINAPI SearchPathA(IN LPCSTR lpPath OPTIONAL, IN LPCSTR lpFileName, IN LPCSTR lpExtension OPTIONAL, IN DWORD nBufferLength, OUT LPSTR lpBuffer, OUT LPSTR *lpFilePart OPTIONAL)
Definition: path.c:1123
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
static const char const char const char * SymbolPath
Definition: image.c:35

◆ FindExecutableImage()

HANDLE IMAGEAPI FindExecutableImage ( PCSTR  FileName,
PCSTR  SymbolPath,
PSTR  ImageFilePath 
)

Definition at line 134 of file path.c.

135{
136 return FindExecutableImageEx(FileName, SymbolPath, ImageFilePath, NULL, NULL);
137}
HANDLE WINAPI FindExecutableImageEx(PCSTR FileName, PCSTR SymbolPath, PSTR ImageFilePath, PFIND_EXE_FILE_CALLBACK Callback, PVOID user)
Definition: path.c:117

◆ GetImageConfigInformation()

BOOL IMAGEAPI GetImageConfigInformation ( PLOADED_IMAGE  LoadedImage,
PIMAGE_LOAD_CONFIG_DIRECTORY  ImageConfigInformation 
)

Definition at line 42 of file access.c.

45{
46 FIXME("(%p, %p): stub\n",
47 LoadedImage, ImageConfigInformation
48 );
50 return FALSE;
51}
#define FIXME(fmt,...)
Definition: debug.h:111
#define FALSE
Definition: types.h:117
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define SetLastError(x)
Definition: compat.h:752

◆ GetImageUnusedHeaderBytes()

DWORD IMAGEAPI GetImageUnusedHeaderBytes ( PLOADED_IMAGE  LoadedImage,
LPDWORD  SizeUnusedHeaderBytes 
)

Definition at line 56 of file access.c.

59{
60 FIXME("(%p, %p): stub\n",
61 LoadedImage, SizeUnusedHeaderBytes
62 );
64 return 0;
65}

◆ GetTimestampForLoadedLibrary()

DWORD IMAGEAPI GetTimestampForLoadedLibrary ( HMODULE  Module)

Definition at line 34 of file image.c.

35{
37 return (nth) ? nth->FileHeader.TimeDateStamp : 0;
38}
IMAGE_FILE_HEADER FileHeader
Definition: ntddk_ex.h:183

◆ ImageAddCertificate()

BOOL IMAGEAPI ImageAddCertificate ( IN  HANDLE,
IN  LPWIN_CERTIFICATE,
OUT  PDWORD 
)

◆ ImageDirectoryEntryToData()

PVOID IMAGEAPI ImageDirectoryEntryToData ( IN  PVOID,
IN  BOOLEAN,
IN  USHORT,
OUT  PULONG 
)

◆ ImageDirectoryEntryToData32()

PVOID IMAGEAPI ImageDirectoryEntryToData32 ( PVOID  Base,
BOOLEAN  MappedAsImage,
USHORT  DirectoryEntry,
PULONG  Size,
PIMAGE_SECTION_HEADER *FoundHeader  OPTIONAL,
PIMAGE_FILE_HEADER  FileHeader,
PIMAGE_OPTIONAL_HEADER  OptionalHeader 
)

◆ ImageDirectoryEntryToDataEx()

PVOID IMAGEAPI ImageDirectoryEntryToDataEx ( IN PVOID  Base,
IN BOOLEAN  MappedAsImage,
IN USHORT  DirectoryEntry,
OUT PULONG  Size,
OUT PIMAGE_SECTION_HEADER *FoundSection  OPTIONAL 
)

◆ ImageEnumerateCertificates()

BOOL IMAGEAPI ImageEnumerateCertificates ( IN  HANDLE,
IN  WORD,
OUT  PDWORD,
IN OUT PDWORD  OPTIONAL,
IN OUT DWORD  OPTIONAL 
)

◆ ImageGetCertificateData()

BOOL IMAGEAPI ImageGetCertificateData ( IN  HANDLE,
IN  DWORD,
OUT  LPWIN_CERTIFICATE,
IN OUT  PDWORD 
)

◆ ImageGetCertificateHeader()

BOOL IMAGEAPI ImageGetCertificateHeader ( IN  HANDLE,
IN  DWORD,
IN OUT  LPWIN_CERTIFICATE 
)

◆ ImageGetDigestStream()

BOOL IMAGEAPI ImageGetDigestStream ( IN  HANDLE,
IN  DWORD,
IN  DIGEST_FUNCTION,
IN  DIGEST_HANDLE 
)

◆ ImagehlpApiVersion()

LPAPI_VERSION IMAGEAPI ImagehlpApiVersion ( VOID  )

Definition at line 837 of file dbghelp.c.

838{
839 return &api_version;
840}
static API_VERSION api_version
Definition: dbghelp.c:832

◆ ImagehlpApiVersionEx()

LPAPI_VERSION IMAGEAPI ImagehlpApiVersionEx ( LPAPI_VERSION  AppVersion)

Definition at line 845 of file dbghelp.c.

846{
847 if (!AppVersion) return NULL;
848
851 AppVersion->Revision = api_version.Revision;
852 AppVersion->Reserved = api_version.Reserved;
853
854 return AppVersion;
855}
USHORT MajorVersion
Definition: compat.h:1571
USHORT Revision
Definition: compat.h:1573
USHORT Reserved
Definition: compat.h:1574
USHORT MinorVersion
Definition: compat.h:1572

◆ ImageLoad()

PLOADED_IMAGE IMAGEAPI ImageLoad ( PCSTR  dll_name,
PCSTR  dll_path 
)

Definition at line 70 of file access.c.

71{
73
74 TRACE("(%s, %s)\n", dll_name, dll_path);
75
76 image = HeapAlloc(GetProcessHeap(), 0, sizeof(*image));
77 if (!image) return NULL;
78
79 if (!MapAndLoad(dll_name, dll_path, image, TRUE, TRUE))
80 {
82 return NULL;
83 }
84
85 image->Links.Flink = image_list.Flink;
86 image->Links.Blink = &image_list;
87 image_list.Flink->Blink = &image->Links;
88 image_list.Flink = &image->Links;
89
90 return image;
91}
#define TRUE
Definition: types.h:120
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
BOOL WINAPI MapAndLoad(PCSTR pszImageName, PCSTR pszDllPath, PLOADED_IMAGE pLoadedImage, BOOL bDotDll, BOOL bReadOnly)
Definition: access.c:131
static LIST_ENTRY image_list
Definition: access.c:36
GLeglImageOES image
Definition: gl.h:2204
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121

◆ ImageNtHeader()

PIMAGE_NT_HEADERS IMAGEAPI ImageNtHeader ( IN  PVOID)

◆ ImageRemoveCertificate()

BOOL IMAGEAPI ImageRemoveCertificate ( IN  HANDLE,
IN  DWORD 
)

◆ ImageRvaToSection()

PIMAGE_SECTION_HEADER IMAGEAPI ImageRvaToSection ( IN  PIMAGE_NT_HEADERS,
IN  PVOID,
IN  ULONG 
)

◆ ImageRvaToVa()

PVOID IMAGEAPI ImageRvaToVa ( IN  PIMAGE_NT_HEADERS,
IN  PVOID,
IN  ULONG,
IN OUT PIMAGE_SECTION_HEADER  
)

◆ ImageUnload()

BOOL IMAGEAPI ImageUnload ( PLOADED_IMAGE  loaded_image)

Definition at line 96 of file access.c.

97{
98 LIST_ENTRY *entry, *mark;
100
101 TRACE("(%p)\n", loaded_image);
102
103 /* FIXME: do we really need to check this? */
104 mark = &image_list;
105 for (entry = mark->Flink; entry != mark; entry = entry->Flink)
106 {
108 if (image == loaded_image)
109 break;
110 }
111
112 if (entry == mark)
113 {
114 /* Not found */
116 return FALSE;
117 }
118
119 entry->Blink->Flink = entry->Flink;
120 entry->Flink->Blink = entry->Blink;
121
122 UnMapAndLoad(loaded_image);
123 HeapFree(GetProcessHeap(), 0, loaded_image);
124
125 return TRUE;
126}
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
BOOL WINAPI UnMapAndLoad(PLOADED_IMAGE pLoadedImage)
Definition: access.c:228
uint32_t entry
Definition: isohybrid.c:63
Definition: typedefs.h:120
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

◆ MakeSureDirectoryPathExists()

BOOL IMAGEAPI MakeSureDirectoryPathExists ( LPCSTR  DirPath)

Definition at line 142 of file path.c.

143{
144 char path[MAX_PATH];
145 const char *p = DirPath;
146 int n;
147
148 if (p[0] && p[1] == ':') p += 2;
149 while (*p == '\\') p++; /* skip drive root */
150 while ((p = strchr(p, '\\')) != NULL)
151 {
152 n = p - DirPath + 1;
153 memcpy(path, DirPath, n);
154 path[n] = '\0';
155 if( !CreateDirectoryA(path, NULL) &&
157 return FALSE;
158 p++;
159 }
162
163 return TRUE;
164}
char * strchr(const char *String, int ch)
Definition: utclib.c:501
#define ERROR_SUCCESS
Definition: deptool.c:10
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:37
GLdouble n
Definition: glext.h:7729
GLfloat GLfloat p
Definition: glext.h:8902
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ERROR_ALREADY_EXISTS
Definition: disk.h:80
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

◆ MapAndLoad()

BOOL IMAGEAPI MapAndLoad ( PCSTR  pszImageName,
PCSTR  pszDllPath,
PLOADED_IMAGE  pLoadedImage,
BOOL  bDotDll,
BOOL  bReadOnly 
)

Definition at line 131 of file access.c.

133{
134 CHAR szFileName[MAX_PATH];
136 HANDLE hFileMapping = NULL;
138 PIMAGE_NT_HEADERS pNtHeader = NULL;
139
140 TRACE("(%s, %s, %p, %d, %d)\n",
141 pszImageName, pszDllPath, pLoadedImage, bDotDll, bReadOnly);
142
143 if (!SearchPathA(pszDllPath, pszImageName, bDotDll ? ".DLL" : ".EXE",
144 sizeof(szFileName), szFileName, NULL))
145 {
147 goto Error;
148 }
149
150 hFile = CreateFileA(szFileName,
151 GENERIC_READ | (bReadOnly ? 0 : GENERIC_WRITE),
153 NULL, OPEN_EXISTING, 0, NULL);
155 {
156 WARN("CreateFile: Error = %d\n", GetLastError());
157 goto Error;
158 }
159
160 hFileMapping = CreateFileMappingA(hFile, NULL,
161 (bReadOnly ? PAGE_READONLY : PAGE_READWRITE) | SEC_COMMIT,
162 0, 0, NULL);
163 if (!hFileMapping)
164 {
165 WARN("CreateFileMapping: Error = %d\n", GetLastError());
166 goto Error;
167 }
168
169 mapping = MapViewOfFile(hFileMapping, bReadOnly ? FILE_MAP_READ : FILE_MAP_WRITE, 0, 0, 0);
170 CloseHandle(hFileMapping);
171 if (!mapping)
172 {
173 WARN("MapViewOfFile: Error = %d\n", GetLastError());
174 goto Error;
175 }
176
177 if (!(pNtHeader = RtlImageNtHeader(mapping)))
178 {
179 WARN("Not an NT header\n");
181 goto Error;
182 }
183
184 pLoadedImage->ModuleName = HeapAlloc(GetProcessHeap(), 0,
185 strlen(szFileName) + 1);
186 if (pLoadedImage->ModuleName) strcpy(pLoadedImage->ModuleName, szFileName);
187 pLoadedImage->hFile = hFile;
188 pLoadedImage->MappedAddress = mapping;
189 pLoadedImage->FileHeader = pNtHeader;
190 pLoadedImage->Sections = (PIMAGE_SECTION_HEADER)
191 ((LPBYTE) &pNtHeader->OptionalHeader +
193 pLoadedImage->NumberOfSections = pNtHeader->FileHeader.NumberOfSections;
194 pLoadedImage->SizeOfImage = GetFileSize(hFile, NULL);
195 pLoadedImage->Characteristics = pNtHeader->FileHeader.Characteristics;
196 pLoadedImage->LastRvaSection = pLoadedImage->Sections;
197
198 pLoadedImage->fSystemImage = FALSE; /* FIXME */
199 pLoadedImage->fDOSImage = FALSE; /* FIXME */
200
201 pLoadedImage->Links.Flink = &pLoadedImage->Links;
202 pLoadedImage->Links.Blink = &pLoadedImage->Links;
203
204 return TRUE;
205
206Error:
208 return FALSE;
209}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
BOOL Error
Definition: chkdsk.c:66
#define WARN(fmt,...)
Definition: debug.h:112
#define CloseHandle
Definition: compat.h:739
#define PAGE_READONLY
Definition: compat.h:138
#define UnmapViewOfFile
Definition: compat.h:746
#define FILE_MAP_READ
Definition: compat.h:776
#define MapViewOfFile
Definition: compat.h:745
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
Definition: fileinfo.c:331
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
Definition: filemap.c:23
GLenum GLenum GLenum GLenum mapping
Definition: glext.h:9031
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
LPCWSTR pszImageName
Definition: env.c:57
_In_ HANDLE hFile
Definition: mswsock.h:90
#define SEC_COMMIT
Definition: mmtypes.h:100
#define PAGE_READWRITE
Definition: nt_native.h:1304
#define GENERIC_WRITE
Definition: nt_native.h:90
struct _IMAGE_SECTION_HEADER * PIMAGE_SECTION_HEADER
WORD SizeOfOptionalHeader
Definition: ntddk_ex.h:127
IMAGE_OPTIONAL_HEADER32 OptionalHeader
Definition: ntddk_ex.h:184
struct _LIST_ENTRY * Blink
Definition: typedefs.h:122
PIMAGE_SECTION_HEADER Sections
Definition: dbghelp.h:109
BOOLEAN fSystemImage
Definition: dbghelp.h:111
LIST_ENTRY Links
Definition: dbghelp.h:115
ULONG Characteristics
Definition: dbghelp.h:110
ULONG SizeOfImage
Definition: dbghelp.h:116
PUCHAR MappedAddress
Definition: dbghelp.h:101
HANDLE hFile
Definition: dbghelp.h:100
PIMAGE_SECTION_HEADER LastRvaSection
Definition: dbghelp.h:107
PIMAGE_NT_HEADERS32 FileHeader
Definition: dbghelp.h:105
ULONG NumberOfSections
Definition: dbghelp.h:108
PSTR ModuleName
Definition: dbghelp.h:99
BOOLEAN fDOSImage
Definition: dbghelp.h:112
unsigned char * LPBYTE
Definition: typedefs.h:53
#define FILE_MAP_WRITE
Definition: winbase.h:154
char CHAR
Definition: xmlstorage.h:175

Referenced by BindImageEx(), ImageLoad(), and START_TEST().

◆ MapDebugInformation()

PIMAGE_DEBUG_INFORMATION IMAGEAPI MapDebugInformation ( HANDLE  ,
PCSTR  ,
PCSTR  ,
DWORD   
)

◆ MapFileAndCheckSumA()

DWORD IMAGEAPI MapFileAndCheckSumA ( PCSTR  ,
LPDWORD  ,
LPDWORD   
)

◆ MapFileAndCheckSumW()

DWORD IMAGEAPI MapFileAndCheckSumW ( PCWSTR  ,
LPDWORD  ,
LPDWORD   
)

◆ ReBaseImage()

BOOL IMAGEAPI ReBaseImage ( IN  PCSTR,
IN  PCSTR,
IN  BOOL,
IN  BOOL,
IN  BOOL,
IN  ULONG,
OUT ULONG ,
OUT ULONG_PTR ,
OUT ULONG ,
IN OUT ULONG_PTR ,
IN  ULONG 
)

◆ RemovePrivateCvSymbolic()

BOOL IMAGEAPI RemovePrivateCvSymbolic ( PCHAR  DebugData,
PCHAR NewDebugData,
ULONG NewDebugSize 
)

Definition at line 388 of file modify.c.

390{
391 FIXME("(%p, %p, %p): stub\n",
392 DebugData, NewDebugData, NewDebugSize
393 );
395 return FALSE;
396}

◆ RemovePrivateCvSymbolicEx()

BOOL IMAGEAPI RemovePrivateCvSymbolicEx ( PCHAR  ,
ULONG  ,
PCHAR ,
ULONG  
)

◆ RemoveRelocations()

VOID IMAGEAPI RemoveRelocations ( PCHAR  ImageName)

Definition at line 401 of file modify.c.

402{
403 FIXME("(%p): stub\n", ImageName);
405}
static const char * ImageName
Definition: image.c:34

◆ SearchTreeForFile()

BOOL IMAGEAPI SearchTreeForFile ( PCSTR  root,
PCSTR  file,
PSTR  buffer 
)

Definition at line 273 of file path.c.

274{
277 WCHAR bufferW[MAX_PATH];
278 BOOL ret;
279
282 ret = SearchTreeForFileW(rootW, fileW, bufferW);
283 if (ret)
284 WideCharToMultiByte(CP_ACP, 0, bufferW, -1, buffer, MAX_PATH, NULL, NULL);
285 return ret;
286}
static const WCHAR rootW[]
Definition: chain.c:69
#define CP_ACP
Definition: compat.h:109
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
BOOL WINAPI SearchTreeForFileW(PCWSTR root, PCWSTR file, PWSTR buffer)
Definition: path.c:262
static const WCHAR fileW[]
Definition: url.c:111
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint buffer
Definition: glext.h:5915
Definition: fci.c:127
int ret
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ SetImageConfigInformation()

BOOL IMAGEAPI SetImageConfigInformation ( PLOADED_IMAGE  LoadedImage,
PIMAGE_LOAD_CONFIG_DIRECTORY  ImageConfigInformation 
)

Definition at line 214 of file access.c.

217{
218 FIXME("(%p, %p): stub\n",
219 LoadedImage, ImageConfigInformation
220 );
222 return FALSE;
223}

◆ SplitSymbols()

BOOL IMAGEAPI SplitSymbols ( PSTR  ,
PCSTR  ,
PSTR  ,
DWORD   
)

◆ StackWalk()

BOOL IMAGEAPI StackWalk ( DWORD  MachineType,
HANDLE  hProcess,
HANDLE  hThread,
LPSTACKFRAME  frame32,
LPVOID  ctx,
PREAD_PROCESS_MEMORY_ROUTINE  f_read_mem,
PFUNCTION_TABLE_ACCESS_ROUTINE  FunctionTableAccessRoutine,
PGET_MODULE_BASE_ROUTINE  GetModuleBaseRoutine,
PTRANSLATE_ADDRESS_ROUTINE  f_xlat_adr 
)

Definition at line 138 of file stack.c.

144{
145 struct cpu_stack_walk csw;
146 STACKFRAME64 frame64;
147 BOOL ret;
148 struct cpu* cpu;
149
150 TRACE("(%d, %p, %p, %p, %p, %p, %p, %p, %p)\n",
151 MachineType, hProcess, hThread, frame32, ctx,
152 f_read_mem, FunctionTableAccessRoutine,
153 GetModuleBaseRoutine, f_xlat_adr);
154
155 if (!(cpu = cpu_find(MachineType)))
156 {
158 return FALSE;
159 }
160
161 addr_32to64(&frame32->AddrPC, &frame64.AddrPC);
162 addr_32to64(&frame32->AddrReturn, &frame64.AddrReturn);
163 addr_32to64(&frame32->AddrFrame, &frame64.AddrFrame);
164 addr_32to64(&frame32->AddrStack, &frame64.AddrStack);
165 addr_32to64(&frame32->AddrBStore, &frame64.AddrBStore);
166 frame64.FuncTableEntry = frame32->FuncTableEntry; /* FIXME */
167 frame64.Far = frame32->Far;
168 frame64.Virtual = frame32->Virtual;
169 frame64.Reserved[0] = frame32->Reserved[0];
170 frame64.Reserved[1] = frame32->Reserved[1];
171 frame64.Reserved[2] = frame32->Reserved[2];
172 /* we don't handle KdHelp */
173
174 csw.hProcess = hProcess;
175 csw.hThread = hThread;
176 csw.is32 = TRUE;
177 csw.cpu = cpu;
178 /* sigh... MS isn't even consistent in the func prototypes */
179 csw.u.s32.f_read_mem = (f_read_mem) ? f_read_mem : read_mem;
180 csw.u.s32.f_xlat_adr = f_xlat_adr;
181 csw.u.s32.f_tabl_acs = (FunctionTableAccessRoutine) ? FunctionTableAccessRoutine : SymFunctionTableAccess;
182 csw.u.s32.f_modl_bas = (GetModuleBaseRoutine) ? GetModuleBaseRoutine : SymGetModuleBase;
183
184 if ((ret = cpu->stack_walk(&csw, &frame64, ctx)))
185 {
186 addr_64to32(&frame64.AddrPC, &frame32->AddrPC);
187 addr_64to32(&frame64.AddrReturn, &frame32->AddrReturn);
188 addr_64to32(&frame64.AddrFrame, &frame32->AddrFrame);
189 addr_64to32(&frame64.AddrStack, &frame32->AddrStack);
190 addr_64to32(&frame64.AddrBStore, &frame32->AddrBStore);
191 frame32->FuncTableEntry = frame64.FuncTableEntry; /* FIXME */
192 frame32->Params[0] = frame64.Params[0];
193 frame32->Params[1] = frame64.Params[1];
194 frame32->Params[2] = frame64.Params[2];
195 frame32->Params[3] = frame64.Params[3];
196 frame32->Far = frame64.Far;
197 frame32->Virtual = frame64.Virtual;
198 frame32->Reserved[0] = frame64.Reserved[0];
199 frame32->Reserved[1] = frame64.Reserved[1];
200 frame32->Reserved[2] = frame64.Reserved[2];
201 }
202
203 return ret;
204}
PVOID WINAPI SymFunctionTableAccess(HANDLE, DWORD)
Definition: module.c:1363
struct cpu * cpu_find(DWORD machine)
Definition: dbghelp.c:183
DWORD WINAPI SymGetModuleBase(HANDLE hProcess, DWORD dwAddr)
Definition: module.c:1302
static void addr_32to64(const ADDRESS *addr32, ADDRESS64 *addr64)
Definition: stack.c:81
static BOOL CALLBACK read_mem(HANDLE hProcess, DWORD addr, void *buffer, DWORD size, LPDWORD nread)
Definition: stack.c:63
static void addr_64to32(const ADDRESS64 *addr64, ADDRESS *addr32)
Definition: stack.c:88
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:71
HANDLE hThread
Definition: wizard.c:28
ADDRESS AddrReturn
Definition: dbghelp.h:2184
DWORD Reserved[3]
Definition: dbghelp.h:2191
PVOID FuncTableEntry
Definition: dbghelp.h:2187
BOOL Far
Definition: dbghelp.h:2189
BOOL Virtual
Definition: dbghelp.h:2190
ADDRESS AddrPC
Definition: dbghelp.h:2183
DWORD Params[4]
Definition: dbghelp.h:2188
ADDRESS AddrBStore
Definition: dbghelp.h:2193
ADDRESS AddrFrame
Definition: dbghelp.h:2185
ADDRESS AddrStack
Definition: dbghelp.h:2186
BOOL(* stack_walk)(struct cpu_stack_walk *csw, STACKFRAME64 *frame, union ctx *ctx)

◆ SymCleanup()

BOOL IMAGEAPI SymCleanup ( IN  HANDLE)

◆ SymEnumerateModules()

BOOL IMAGEAPI SymEnumerateModules ( IN  HANDLE,
IN  PSYM_ENUMMODULES_CALLBACK,
IN  PVOID 
)

◆ SymEnumerateSymbols()

BOOL IMAGEAPI SymEnumerateSymbols ( IN  HANDLE,
IN  DWORD,
IN  PSYM_ENUMSYMBOLS_CALLBACK,
IN  PVOID 
)

◆ SymFunctionTableAccess()

LPVOID IMAGEAPI SymFunctionTableAccess ( HANDLE  hProcess,
DWORD  AddrBase 
)

Definition at line 1363 of file module.c.

1364{
1365 return SymFunctionTableAccess64(hProcess, AddrBase);
1366}
PVOID WINAPI SymFunctionTableAccess64(HANDLE hProcess, DWORD64 AddrBase)
Definition: module.c:1371

◆ SymGetLineFromAddr()

BOOL IMAGEAPI SymGetLineFromAddr ( IN  HANDLE,
IN  DWORD,
OUT  PDWORD,
OUT  PIMAGEHLP_LINE 
)

◆ SymGetLineFromName()

BOOL IMAGEAPI SymGetLineFromName ( IN  HANDLE,
IN  LPSTR,
IN  LPSTR,
IN  DWORD,
OUT  PLONG,
IN OUT  PIMAGEHLP_LINE 
)

◆ SymGetLineNext()

BOOL IMAGEAPI SymGetLineNext ( IN  HANDLE,
IN OUT  PIMAGEHLP_LINE 
)

◆ SymGetLinePrev()

BOOL IMAGEAPI SymGetLinePrev ( IN  HANDLE,
IN OUT  PIMAGEHLP_LINE 
)

◆ SymGetModuleBase()

DWORD IMAGEAPI SymGetModuleBase ( IN  HANDLE,
IN  DWORD 
)

◆ SymGetModuleInfo()

BOOL IMAGEAPI SymGetModuleInfo ( IN  HANDLE,
IN  DWORD,
OUT  PIMAGEHLP_MODULE 
)

◆ SymGetOptions()

DWORD IMAGEAPI SymGetOptions ( VOID  )

Definition at line 600 of file dbghelp.c.

601{
602 return dbghelp_options;
603}
unsigned dbghelp_options
Definition: dbghelp.c:73

Referenced by BeginStackBacktrace(), InitDbgHelp(), and START_TEST().

◆ SymGetSearchPath()

BOOL IMAGEAPI SymGetSearchPath ( IN  HANDLE,
OUT  LPSTR,
IN  DWORD 
)

◆ SymGetSymFromAddr()

BOOL IMAGEAPI SymGetSymFromAddr ( IN  HANDLE,
IN  DWORD,
OUT  PDWORD,
OUT  PIMAGEHLP_SYMBOL 
)

◆ SymGetSymFromName()

BOOL IMAGEAPI SymGetSymFromName ( IN  HANDLE,
IN  LPSTR,
OUT  PIMAGEHLP_SYMBOL 
)

◆ SymGetSymNext()

BOOL IMAGEAPI SymGetSymNext ( IN  HANDLE,
IN OUT  PIMAGEHLP_SYMBOL 
)

◆ SymGetSymPrev()

BOOL IMAGEAPI SymGetSymPrev ( IN  HANDLE,
IN OUT  PIMAGEHLP_SYMBOL 
)

◆ SymInitialize()

BOOL IMAGEAPI SymInitialize ( IN  HANDLE,
IN  LPSTR,
IN  BOOL 
)

◆ SymLoadModule()

DWORD IMAGEAPI SymLoadModule ( IN  HANDLE,
IN  HANDLE,
IN  PSTR,
IN  PSTR,
IN  DWORD,
IN  DWORD 
)

◆ SymMatchFileName()

BOOL IMAGEAPI SymMatchFileName ( IN  LPSTR,
IN  LPSTR,
OUT LPSTR ,
OUT LPSTR  
)

◆ SymRegisterCallback()

BOOL IMAGEAPI SymRegisterCallback ( IN  HANDLE,
IN  PSYMBOL_REGISTERED_CALLBACK,
IN  PVOID 
)

◆ SymSetOptions()

DWORD IMAGEAPI SymSetOptions ( IN  DWORD)

◆ SymSetSearchPath()

BOOL IMAGEAPI SymSetSearchPath ( IN  HANDLE,
IN  LPSTR 
)

◆ SymUnDName()

BOOL IMAGEAPI SymUnDName ( IN  PIMAGEHLP_SYMBOL,
OUT  LPSTR,
IN  DWORD 
)

◆ SymUnloadModule()

BOOL IMAGEAPI SymUnloadModule ( IN  HANDLE,
IN  DWORD 
)

◆ TouchFileTimes()

BOOL IMAGEAPI TouchFileTimes ( HANDLE  FileHandle,
LPSYSTEMTIME  lpSystemTime 
)

Definition at line 38 of file imagehlp_main.c.

39{
40 FILETIME FileTime;
41 SYSTEMTIME SystemTime;
42
43 if(lpSystemTime == NULL)
44 {
45 GetSystemTime(&SystemTime);
46 lpSystemTime = &SystemTime;
47 }
48
49 return (SystemTimeToFileTime(lpSystemTime, &FileTime) &&
50 SetFileTime(FileHandle, NULL, NULL, &FileTime));
51}
BOOL WINAPI SetFileTime(IN HANDLE hFile, CONST FILETIME *lpCreationTime OPTIONAL, CONST FILETIME *lpLastAccessTime OPTIONAL, CONST FILETIME *lpLastWriteTime OPTIONAL)
Definition: fileinfo.c:948
BOOL WINAPI SystemTimeToFileTime(IN CONST SYSTEMTIME *lpSystemTime, OUT LPFILETIME lpFileTime)
Definition: time.c:158
VOID WINAPI GetSystemTime(OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:327
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
Definition: fltkernel.h:1231

◆ UnDecorateSymbolName()

DWORD IMAGEAPI WINAPI UnDecorateSymbolName ( LPCSTR  ,
LPSTR  ,
DWORD  ,
DWORD   
)

◆ UnMapAndLoad()

BOOL IMAGEAPI UnMapAndLoad ( PLOADED_IMAGE  pLoadedImage)

Definition at line 228 of file access.c.

229{
230 HeapFree(GetProcessHeap(), 0, pLoadedImage->ModuleName);
231 /* FIXME: MSDN states that a new checksum is computed and stored into the file */
232 if (pLoadedImage->MappedAddress) UnmapViewOfFile(pLoadedImage->MappedAddress);
233 if (pLoadedImage->hFile != INVALID_HANDLE_VALUE) CloseHandle(pLoadedImage->hFile);
234 return TRUE;
235}

Referenced by BindImageEx(), and ImageUnload().

◆ UnmapDebugInformation()

BOOL IMAGEAPI UnmapDebugInformation ( PIMAGE_DEBUG_INFORMATION  DebugInfo)

Definition at line 54 of file image.c.

55{
56 FIXME("(%p): stub\n", DebugInfo);
58 return FALSE;
59}

◆ UpdateDebugInfoFile()

BOOL IMAGEAPI UpdateDebugInfoFile ( PCSTR  ImageFileName,
PCSTR  SymbolPath,
PSTR  DebugFilePath,
PIMAGE_NT_HEADERS32  NtHeaders 
)

Definition at line 425 of file modify.c.

428{
429 FIXME("(%s, %s, %s, %p): stub\n",
430 debugstr_a(ImageFileName), debugstr_a(SymbolPath),
431 debugstr_a(DebugFilePath), NtHeaders
432 );
434 return FALSE;
435}
#define debugstr_a
Definition: kernel32.h:31

◆ UpdateDebugInfoFileEx()

BOOL IMAGEAPI UpdateDebugInfoFileEx ( PCSTR  ImageFileName,
PCSTR  SymbolPath,
PSTR  DebugFilePath,
PIMAGE_NT_HEADERS32  NtHeaders,
DWORD  OldChecksum 
)

Definition at line 440 of file modify.c.

443{
444 FIXME("(%s, %s, %s, %p, %d): stub\n",
445 debugstr_a(ImageFileName), debugstr_a(SymbolPath),
446 debugstr_a(DebugFilePath), NtHeaders, OldChecksum
447 );
449 return FALSE;
450}