ReactOS  0.4.13-dev-1148-g9b75b67
modify.c
Go to the documentation of this file.
1 /*
2  * IMAGEHLP library
3  *
4  * Copyright 1998 Patrik Stridvall
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20 
21 #include <stdarg.h>
22 
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winternl.h"
26 #include "winerror.h"
27 #include "wine/debug.h"
28 #include "wine/exception.h"
29 #include "imagehlp.h"
30 
32 
33 static WORD CalcCheckSum(DWORD StartValue, LPVOID BaseAddress, DWORD WordCount);
34 
35 /***********************************************************************
36  * BindImage (IMAGEHLP.@)
37  *
38  * NOTES
39  * See BindImageEx
40  */
43 {
45 }
46 
47 /***********************************************************************
48  * BindImageEx (IMAGEHLP.@)
49  *
50  * Compute the virtual address of each function imported by a PE image
51  *
52  * PARAMS
53  *
54  * Flags [in] Bind options
55  * ImageName [in] File name of the image to be bound
56  * DllPath [in] Root of the fallback search path in case the ImageName file cannot be opened
57  * SymbolPath [in] Symbol file root search path
58  * StatusRoutine [in] Pointer to a status routine which will be called during the binding process
59  *
60  * RETURNS
61  * Success: TRUE
62  * Failure: FALSE
63  *
64  * NOTES
65  * Binding is not implemented yet, so far this function only enumerates
66  * all imported dlls/functions and returns TRUE.
67  */
71 {
72  LOADED_IMAGE loaded_image;
73  const IMAGE_IMPORT_DESCRIPTOR *import_desc;
74  ULONG size;
75 
76  FIXME("(%d, %s, %s, %s, %p): semi-stub\n",
79  );
80 
81  if (!(MapAndLoad(ImageName, DllPath, &loaded_image, TRUE, TRUE))) return FALSE;
82 
83  if (!(import_desc = RtlImageDirectoryEntryToData((HMODULE)loaded_image.MappedAddress, FALSE,
85  {
86  UnMapAndLoad(&loaded_image);
87  return TRUE; /* No imported modules means nothing to bind, so we're done. */
88  }
89 
90  /* FIXME: Does native imagehlp support both 32-bit and 64-bit PE executables? */
91 #ifdef _WIN64
93 #else
95 #endif
96  {
97  FIXME("Wrong architecture in PE header, unable to enumerate imports\n");
98  UnMapAndLoad(&loaded_image);
99  return TRUE;
100  }
101 
102  for (; import_desc->Name && import_desc->FirstThunk; ++import_desc)
103  {
105  char dll_fullname[MAX_PATH];
106  const char *dll_name;
107 
108  if (!(dll_name = ImageRvaToVa(loaded_image.FileHeader, loaded_image.MappedAddress,
109  import_desc->Name, 0)))
110  {
111  UnMapAndLoad(&loaded_image);
112  SetLastError(ERROR_INVALID_ACCESS); /* FIXME */
113  return FALSE;
114  }
115 
116  if (StatusRoutine)
117  StatusRoutine(BindImportModule, ImageName, dll_name, 0, 0);
118 
119  if (!SearchPathA(DllPath, dll_name, 0, sizeof(dll_fullname), dll_fullname, 0))
120  {
121  UnMapAndLoad(&loaded_image);
123  return FALSE;
124  }
125 
126  if (!(thunk = ImageRvaToVa(loaded_image.FileHeader, loaded_image.MappedAddress,
127  import_desc->OriginalFirstThunk ? import_desc->OriginalFirstThunk :
128  import_desc->FirstThunk, 0)))
129  {
130  ERR("Can't grab thunk data of %s, going to next imported DLL\n", dll_name);
131  continue;
132  }
133 
134  for (; thunk->u1.Ordinal; ++thunk)
135  {
136  /* Ignoring ordinal imports for now */
137  if(!IMAGE_SNAP_BY_ORDINAL(thunk->u1.Ordinal))
138  {
139  IMAGE_IMPORT_BY_NAME *iibn;
140 
141  if (!(iibn = ImageRvaToVa(loaded_image.FileHeader, loaded_image.MappedAddress,
142  thunk->u1.AddressOfData, 0)))
143  {
144  ERR("Can't grab import by name info, skipping to next ordinal\n");
145  continue;
146  }
147 
148  if (StatusRoutine)
149  StatusRoutine(BindImportProcedure, ImageName, dll_fullname, 0, (ULONG_PTR)iibn->Name);
150  }
151  }
152  }
153 
154  UnMapAndLoad(&loaded_image);
155  return TRUE;
156 }
157 
158 
159 /***********************************************************************
160  * CheckSum (internal)
161  */
163 {
164  LPWORD Ptr;
165  DWORD Sum, i;
166 
167  Sum = StartValue;
169  for (i = ByteCount; i > 1; i -= 2)
170  {
171  Sum += *Ptr;
172  if (HIWORD(Sum) != 0)
173  Sum = LOWORD(Sum) + HIWORD(Sum);
174  Ptr++;
175  }
176 
177  if (i == 1)
178  Sum += *(BYTE *)Ptr;
179 
180  return (WORD)(LOWORD(Sum) + HIWORD(Sum));
181 }
182 
183 
184 /***********************************************************************
185  * CheckSumMappedFile (IMAGEHLP.@)
186  */
189  LPDWORD HeaderSum, LPDWORD CheckSum)
190 {
192  PIMAGE_NT_HEADERS32 Header32;
193  PIMAGE_NT_HEADERS64 Header64;
195  DWORD *ChecksumFile;
196  DWORD CalcSum;
197  DWORD HdrSum = 0;
198 
199  TRACE("(%p, %d, %p, %p)\n",
200  BaseAddress, FileLength, HeaderSum, CheckSum
201  );
202 
203  CalcSum = (DWORD)CalcCheckSum(0, BaseAddress, FileLength);
204 
205  __TRY
206  {
208 #ifdef __REACTOS__
209  _SEH2_LEAVE;
210 #else
211  break;
212 #endif
213 
214  Header32 = (IMAGE_NT_HEADERS32 *)((char *)dos + dos->e_lfanew);
215  if (Header32->Signature != IMAGE_NT_SIGNATURE)
216 #ifdef __REACTOS__
217  _SEH2_LEAVE;
218 #else
219  break;
220 #endif
221 
222  ret = (PIMAGE_NT_HEADERS)Header32;
223 
225  ChecksumFile = &Header32->OptionalHeader.CheckSum;
226  else if (Header32->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC)
227  {
228  Header64 = (IMAGE_NT_HEADERS64 *)Header32;
229  ChecksumFile = &Header64->OptionalHeader.CheckSum;
230  }
231  else
232 #ifdef __REACTOS__
233  _SEH2_LEAVE;
234 #else
235  break;
236 #endif
237 
238  HdrSum = *ChecksumFile;
239  }
241  {
242  /* nothing */
243  }
244  __ENDTRY
245 
246  /* Subtract image checksum from calculated checksum. */
247  /* fix low word of checksum */
248  if (LOWORD(CalcSum) >= LOWORD(HdrSum))
249  {
250  CalcSum -= LOWORD(HdrSum);
251  }
252  else
253  {
254  CalcSum = ((LOWORD(CalcSum) - LOWORD(HdrSum)) & 0xFFFF) - 1;
255  }
256 
257  /* fix high word of checksum */
258  if (LOWORD(CalcSum) >= HIWORD(HdrSum))
259  {
260  CalcSum -= HIWORD(HdrSum);
261  }
262  else
263  {
264  CalcSum = ((LOWORD(CalcSum) - HIWORD(HdrSum)) & 0xFFFF) - 1;
265  }
266 
267  /* add file length */
268  CalcSum += FileLength;
269 
270  *CheckSum = CalcSum;
271  *HeaderSum = HdrSum;
272 
273  return ret;
274 }
275 
276 /***********************************************************************
277  * MapFileAndCheckSumA (IMAGEHLP.@)
278  */
280  PCSTR Filename, PDWORD HeaderSum, PDWORD CheckSum)
281 {
282  HANDLE hFile;
283  HANDLE hMapping;
286 
287  TRACE("(%s, %p, %p): stub\n",
288  debugstr_a(Filename), HeaderSum, CheckSum
289  );
290 
292  GENERIC_READ,
294  NULL,
297  0);
299  {
300  return CHECKSUM_OPEN_FAILURE;
301  }
302 
303  hMapping = CreateFileMappingW(hFile,
304  NULL,
306  0,
307  0,
308  NULL);
309  if (hMapping == 0)
310  {
312  return CHECKSUM_MAP_FAILURE;
313  }
314 
315  BaseAddress = MapViewOfFile(hMapping,
317  0,
318  0,
319  0);
320  if (BaseAddress == 0)
321  {
322  CloseHandle(hMapping);
325  }
326 
328  NULL);
329 
331  FileLength,
332  HeaderSum,
333  CheckSum);
334 
336  CloseHandle(hMapping);
338 
339  return 0;
340 }
341 
342 /***********************************************************************
343  * MapFileAndCheckSumW (IMAGEHLP.@)
344  */
346  PCWSTR Filename, PDWORD HeaderSum, PDWORD CheckSum)
347 {
348  HANDLE hFile;
349  HANDLE hMapping;
352 
353  TRACE("(%s, %p, %p): stub\n",
354  debugstr_w(Filename), HeaderSum, CheckSum
355  );
356 
358  GENERIC_READ,
360  NULL,
363  0);
365  {
366  return CHECKSUM_OPEN_FAILURE;
367  }
368 
369  hMapping = CreateFileMappingW(hFile,
370  NULL,
372  0,
373  0,
374  NULL);
375  if (hMapping == 0)
376  {
378  return CHECKSUM_MAP_FAILURE;
379  }
380 
381  BaseAddress = MapViewOfFile(hMapping,
383  0,
384  0,
385  0);
386  if (BaseAddress == 0)
387  {
388  CloseHandle(hMapping);
391  }
392 
394  NULL);
395 
397  FileLength,
398  HeaderSum,
399  CheckSum);
400 
402  CloseHandle(hMapping);
404 
405  return 0;
406 }
407 
408 /***********************************************************************
409  * ReBaseImage (IMAGEHLP.@)
410  */
412  PCSTR CurrentImageName, PCSTR SymbolPath, BOOL fReBase,
413  BOOL fRebaseSysfileOk, BOOL fGoingDown, ULONG CheckImageSize,
414  ULONG *OldImageSize, ULONG_PTR *OldImageBase, ULONG *NewImageSize,
415  ULONG_PTR *NewImageBase, ULONG TimeStamp)
416 {
417  FIXME(
418  "(%s, %s, %d, %d, %d, %d, %p, %p, %p, %p, %d): stub\n",
419  debugstr_a(CurrentImageName),debugstr_a(SymbolPath), fReBase,
420  fRebaseSysfileOk, fGoingDown, CheckImageSize, OldImageSize,
421  OldImageBase, NewImageSize, NewImageBase, TimeStamp
422  );
424  return FALSE;
425 }
426 
427 /***********************************************************************
428  * RemovePrivateCvSymbolic (IMAGEHLP.@)
429  */
431  PCHAR DebugData, PCHAR *NewDebugData, ULONG *NewDebugSize)
432 {
433  FIXME("(%p, %p, %p): stub\n",
434  DebugData, NewDebugData, NewDebugSize
435  );
437  return FALSE;
438 }
439 
440 /***********************************************************************
441  * RemoveRelocations (IMAGEHLP.@)
442  */
444 {
445  FIXME("(%p): stub\n", ImageName);
447 }
448 
449 /***********************************************************************
450  * SplitSymbols (IMAGEHLP.@)
451  */
453  PSTR ImageName, PCSTR SymbolsPath,
454  PSTR SymbolFilePath, ULONG Flags)
455 {
456  FIXME("(%s, %s, %s, %d): stub\n",
457  debugstr_a(ImageName), debugstr_a(SymbolsPath),
458  debugstr_a(SymbolFilePath), Flags
459  );
461  return FALSE;
462 }
463 
464 /***********************************************************************
465  * UpdateDebugInfoFile (IMAGEHLP.@)
466  */
468  PCSTR ImageFileName, PCSTR SymbolPath,
469  PSTR DebugFilePath, PIMAGE_NT_HEADERS32 NtHeaders)
470 {
471  FIXME("(%s, %s, %s, %p): stub\n",
472  debugstr_a(ImageFileName), debugstr_a(SymbolPath),
473  debugstr_a(DebugFilePath), NtHeaders
474  );
476  return FALSE;
477 }
478 
479 /***********************************************************************
480  * UpdateDebugInfoFileEx (IMAGEHLP.@)
481  */
483  PCSTR ImageFileName, PCSTR SymbolPath, PSTR DebugFilePath,
484  PIMAGE_NT_HEADERS32 NtHeaders, DWORD OldChecksum)
485 {
486  FIXME("(%s, %s, %s, %p, %d): stub\n",
487  debugstr_a(ImageFileName), debugstr_a(SymbolPath),
488  debugstr_a(DebugFilePath), NtHeaders, OldChecksum
489  );
491  return FALSE;
492 }
signed char * PCHAR
Definition: retypes.h:7
BOOL WINAPI UnMapAndLoad(PLOADED_IMAGE pLoadedImage)
Definition: access.c:236
BOOL WINAPI BindImageEx(DWORD Flags, PCSTR ImageName, PCSTR DllPath, PCSTR SymbolPath, PIMAGEHLP_STATUS_ROUTINE StatusRoutine)
Definition: modify.c:68
const uint16_t * PCWSTR
Definition: typedefs.h:55
static const char const char const char PIMAGEHLP_STATUS_ROUTINE StatusRoutine
Definition: image.c:34
_Out_ PNDIS_HANDLE _Out_ PUINT FileLength
Definition: ndis.h:3227
#define CHECKSUM_MAP_FAILURE
Definition: imagehlp.h:50
#define TRUE
Definition: types.h:120
DWORD WINAPI MapFileAndCheckSumA(PCSTR Filename, PDWORD HeaderSum, PDWORD CheckSum)
Definition: modify.c:279
#define CloseHandle
Definition: compat.h:398
VOID WINAPI RemoveRelocations(PCHAR ImageName)
Definition: modify.c:443
#define MapViewOfFile
Definition: compat.h:402
Definition: cproxy.c:203
DWORD WINAPI MapFileAndCheckSumW(PCWSTR Filename, PDWORD HeaderSum, PDWORD CheckSum)
Definition: modify.c:345
#define CHECKSUM_OPEN_FAILURE
Definition: imagehlp.h:49
static WORD CalcCheckSum(DWORD StartValue, LPVOID BaseAddress, DWORD WordCount)
Definition: modify.c:162
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
#define IMAGE_NT_OPTIONAL_HDR32_MAGIC
Definition: ntimage.h:376
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
BOOL WINAPI UpdateDebugInfoFile(PCSTR ImageFileName, PCSTR SymbolPath, PSTR DebugFilePath, PIMAGE_NT_HEADERS32 NtHeaders)
Definition: modify.c:467
PIMAGE_NT_HEADERS32 PIMAGE_NT_HEADERS
Definition: ntddk_ex.h:187
#define CHECKSUM_MAPVIEW_FAILURE
Definition: imagehlp.h:51
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define DWORD
Definition: nt_native.h:44
BOOL WINAPI MapAndLoad(PCSTR pszImageName, PCSTR pszDllPath, PLOADED_IMAGE pLoadedImage, BOOL bDotDll, BOOL bReadOnly)
Definition: access.c:139
IMAGE_OPTIONAL_HEADER32 OptionalHeader
Definition: ntddk_ex.h:184
IN PVCB IN PBCB OUT PDIRENT IN USHORT IN POEM_STRING Filename
Definition: fatprocs.h:925
#define FILE_SHARE_READ
Definition: compat.h:125
WINE_DEFAULT_DEBUG_CHANNEL(imagehlp)
uint32_t ULONG_PTR
Definition: typedefs.h:63
#define IMAGE_DOS_SIGNATURE
Definition: pedump.c:89
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
static const char const char const char * SymbolPath
Definition: image.c:34
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
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:1122
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define FILE_MAP_READ
Definition: compat.h:427
#define __TRY
Definition: compat.h:70
IMAGE_OPTIONAL_HEADER64 OptionalHeader
Definition: ntimage.h:396
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define OPEN_EXISTING
Definition: compat.h:426
BOOL WINAPI UpdateDebugInfoFileEx(PCSTR ImageFileName, PCSTR SymbolPath, PSTR DebugFilePath, PIMAGE_NT_HEADERS32 NtHeaders, DWORD OldChecksum)
Definition: modify.c:482
#define IMAGE_NT_SIGNATURE
Definition: pedump.c:93
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
#define TRACE(s)
Definition: solgame.cpp:4
BOOL(WINAPI * PIMAGEHLP_STATUS_ROUTINE)(IMAGEHLP_STATUS_REASON, PCSTR, PCSTR, ULONG_PTR, ULONG_PTR)
Definition: imagehlp.h:115
GLsizeiptr size
Definition: glext.h:5919
PUCHAR MappedAddress
Definition: dbghelp.h:101
#define debugstr_a
Definition: kernel32.h:31
#define CreateFileMappingW(a, b, c, d, e, f)
Definition: compat.h:401
#define MAX_PATH
Definition: compat.h:26
#define WINAPI
Definition: msvc.h:8
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
UCHAR CheckSum(LPSTR p, ULONG Len)
Definition: serial.c:197
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
Definition: fileinfo.c:481
#define SetLastError(x)
Definition: compat.h:409
#define IMAGE_NT_OPTIONAL_HDR64_MAGIC
Definition: ntimage.h:377
#define __ENDTRY
Definition: compat.h:72
int ret
static const char * ImageName
Definition: image.c:34
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
IMAGE_DOS_HEADER dos
Definition: module.c:49
#define RtlImageDirectoryEntryToData
Definition: compat.h:460
unsigned char BYTE
Definition: mem.h:68
#define ERROR_INVALID_ACCESS
Definition: winerror.h:115
#define GENERIC_READ
Definition: compat.h:124
_In_ HANDLE hFile
Definition: mswsock.h:90
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _In_ LARGE_INTEGER ByteCount
Definition: iotypes.h:1061
uint16_t * LPWORD
Definition: typedefs.h:54
#define ERR(fmt,...)
Definition: debug.h:109
#define IMAGE_SNAP_BY_ORDINAL(Ordinal)
Definition: ntimage.h:567
BOOL WINAPI RemovePrivateCvSymbolic(PCHAR DebugData, PCHAR *NewDebugData, ULONG *NewDebugSize)
Definition: modify.c:430
static const char const char * DllPath
Definition: image.c:34
signed char * PSTR
Definition: retypes.h:7
PVOID WINAPI ImageRvaToVa(_In_ PIMAGE_NT_HEADERS, _In_ PVOID, _In_ ULONG, _In_opt_ PIMAGE_SECTION_HEADER *)
#define PAGE_READONLY
Definition: compat.h:127
DWORD * PDWORD
Definition: pedump.c:68
PIMAGE_NT_HEADERS32 FileHeader
Definition: dbghelp.h:105
#define CreateFileW
Definition: compat.h:400
#define IMAGE_DIRECTORY_ENTRY_IMPORT
Definition: pedump.c:260
uint32_t * LPDWORD
Definition: typedefs.h:57
#define HIWORD(l)
Definition: typedefs.h:246
unsigned int ULONG
Definition: retypes.h:1
PIMAGE_NT_HEADERS WINAPI CheckSumMappedFile(LPVOID BaseAddress, DWORD FileLength, LPDWORD HeaderSum, LPDWORD CheckSum)
Definition: modify.c:187
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
BOOL WINAPI ReBaseImage(PCSTR CurrentImageName, PCSTR SymbolPath, BOOL fReBase, BOOL fRebaseSysfileOk, BOOL fGoingDown, ULONG CheckImageSize, ULONG *OldImageSize, ULONG_PTR *OldImageBase, ULONG *NewImageSize, ULONG_PTR *NewImageBase, ULONG TimeStamp)
Definition: modify.c:411
const char * PCSTR
Definition: typedefs.h:51
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:399
#define _SEH2_LEAVE
Definition: filesup.c:20
#define UnmapViewOfFile
Definition: compat.h:403
BOOL WINAPI BindImage(PCSTR ImageName, PCSTR DllPath, PCSTR SymbolPath)
Definition: modify.c:41
#define LOWORD(l)
Definition: pedump.c:82
BOOL WINAPI SplitSymbols(PSTR ImageName, PCSTR SymbolsPath, PSTR SymbolFilePath, ULONG Flags)
Definition: modify.c:452
#define __EXCEPT_PAGE_FAULT
Definition: compat.h:71