dbghelp: Implemented FindExecutableImage[W].
This commit is contained in:
parent
43dffcd05d
commit
bcc1913354
|
@ -10,8 +10,8 @@
|
|||
@ stdcall FindDebugInfoFileEx(str str ptr ptr ptr)
|
||||
@ stub FindDebugInfoFileExW
|
||||
@ stdcall FindExecutableImage(str str str)
|
||||
@ stub FindExecutableImageEx
|
||||
@ stub FindExecutableImageExW
|
||||
@ stdcall FindExecutableImageEx(str str ptr ptr ptr)
|
||||
@ stdcall FindExecutableImageExW(wstr wstr ptr ptr ptr)
|
||||
@ stub FindFileInPath
|
||||
@ stub FindFileInSearchPath
|
||||
@ stdcall GetTimestampForLoadedLibrary(long)
|
||||
|
|
|
@ -75,18 +75,47 @@ HANDLE WINAPI FindDebugInfoFileEx(PCSTR FileName, PCSTR SymbolPath,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* FindExecutableImageExW (DBGHELP.@)
|
||||
*
|
||||
*/
|
||||
HANDLE WINAPI FindExecutableImageExW(PCWSTR FileName, PCWSTR SymbolPath, PWSTR ImageFilePath,
|
||||
PFIND_EXE_FILE_CALLBACKW Callback, void* user)
|
||||
{
|
||||
HANDLE h;
|
||||
|
||||
if (Callback) FIXME("Unsupported callback yet\n");
|
||||
if (!SearchPathW(SymbolPath, FileName, NULL, MAX_PATH, ImageFilePath, NULL))
|
||||
return NULL;
|
||||
h = CreateFileW(ImageFilePath, GENERIC_READ, FILE_SHARE_READ, NULL,
|
||||
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
return (h == INVALID_HANDLE_VALUE) ? NULL : h;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* FindExecutableImageEx (DBGHELP.@)
|
||||
*
|
||||
*/
|
||||
HANDLE WINAPI FindExecutableImageEx(PCSTR FileName, PCSTR SymbolPath, PSTR ImageFilePath,
|
||||
PFIND_EXE_FILE_CALLBACK Callback, void* user)
|
||||
{
|
||||
HANDLE h;
|
||||
|
||||
if (Callback) FIXME("Unsupported callback yet\n");
|
||||
if (!SearchPathA(SymbolPath, FileName, NULL, MAX_PATH, ImageFilePath, NULL))
|
||||
return NULL;
|
||||
h = CreateFileA(ImageFilePath, GENERIC_READ, FILE_SHARE_READ, NULL,
|
||||
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
return (h == INVALID_HANDLE_VALUE) ? NULL : h;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* FindExecutableImage (DBGHELP.@)
|
||||
*
|
||||
*/
|
||||
HANDLE WINAPI FindExecutableImage(PCSTR FileName, PCSTR SymbolPath, PSTR ImageFilePath)
|
||||
{
|
||||
HANDLE h;
|
||||
if (!SearchPathA(SymbolPath, FileName, NULL, MAX_PATH, ImageFilePath, NULL))
|
||||
return NULL;
|
||||
h = CreateFileA(ImageFilePath, GENERIC_READ, FILE_SHARE_READ, NULL,
|
||||
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
return (h == INVALID_HANDLE_VALUE) ? NULL : h;
|
||||
return FindExecutableImageEx(FileName, SymbolPath, ImageFilePath, NULL, NULL);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
@ stdcall FindDebugInfoFile(str str str) dbghelp.FindDebugInfoFile
|
||||
@ stdcall FindDebugInfoFileEx(str str ptr ptr ptr) dbghelp.FindDebugInfoFileEx
|
||||
@ stdcall FindExecutableImage(str str str) dbghelp.FindExecutableImage
|
||||
@ stub FindExecutableImageEx
|
||||
@ stdcall FindExecutableImageEx(str str ptr ptr ptr) dbghelp.FindExecutableImageEx
|
||||
@ stub FindFileInPath
|
||||
@ stub FindFileInSearchPath
|
||||
@ stdcall GetImageConfigInformation(ptr ptr)
|
||||
|
|
|
@ -1005,6 +1005,8 @@ BOOL WINAPI SymFindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD,
|
|||
HANDLE WINAPI FindExecutableImage(PCSTR, PCSTR, PSTR);
|
||||
typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACK)(HANDLE, PSTR, PVOID);
|
||||
HANDLE WINAPI FindExecutableImageEx(PCSTR, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID);
|
||||
typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACKW)(HANDLE, PWSTR, PVOID);
|
||||
HANDLE WINAPI FindExecutableImageExW(PCWSTR, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW, PVOID);
|
||||
PIMAGE_NT_HEADERS WINAPI ImageNtHeader(PVOID);
|
||||
PVOID WINAPI ImageDirectoryEntryToDataEx(PVOID, BOOLEAN, USHORT, PULONG,
|
||||
PIMAGE_SECTION_HEADER *);
|
||||
|
|
Loading…
Reference in New Issue