1998-10-11 19:04:17 +02:00
|
|
|
/*
|
|
|
|
* IMAGEHLP library
|
|
|
|
*
|
|
|
|
* Copyright 1998 Patrik Stridvall
|
|
|
|
*/
|
|
|
|
|
1999-02-17 14:51:06 +01:00
|
|
|
#include "imagehlp.h"
|
1998-10-11 19:04:17 +02:00
|
|
|
#include "winerror.h"
|
1999-02-17 14:51:06 +01:00
|
|
|
#include "winbase.h"
|
1999-03-14 17:35:05 +01:00
|
|
|
#include "windef.h"
|
1999-05-14 10:17:14 +02:00
|
|
|
#include "debugtools.h"
|
1998-10-11 19:04:17 +02:00
|
|
|
|
2000-03-28 22:22:59 +02:00
|
|
|
DEFAULT_DEBUG_CHANNEL(imagehlp);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
1998-10-11 19:04:17 +02:00
|
|
|
/**********************************************************************/
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
HANDLE IMAGEHLP_hHeap = (HANDLE) NULL;
|
1998-10-11 19:04:17 +02:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
static API_VERSION IMAGEHLP_ApiVersion = { 4, 0, 0, 5 };
|
1998-10-11 19:04:17 +02:00
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* IMAGEHLP_LibMain (IMAGEHLP.init)
|
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI IMAGEHLP_LibMain(
|
|
|
|
HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
1998-10-11 19:04:17 +02:00
|
|
|
{
|
|
|
|
switch(fdwReason)
|
|
|
|
{
|
|
|
|
case DLL_PROCESS_ATTACH:
|
1999-02-26 12:11:13 +01:00
|
|
|
IMAGEHLP_hHeap = HeapCreate(0, 0x10000, 0);
|
1998-10-11 19:04:17 +02:00
|
|
|
break;
|
|
|
|
case DLL_PROCESS_DETACH:
|
1999-02-26 12:11:13 +01:00
|
|
|
HeapDestroy(IMAGEHLP_hHeap);
|
|
|
|
IMAGEHLP_hHeap = (HANDLE) NULL;
|
1998-10-11 19:04:17 +02:00
|
|
|
break;
|
|
|
|
case DLL_THREAD_ATTACH:
|
|
|
|
break;
|
|
|
|
case DLL_THREAD_DETACH:
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* ImagehlpApiVersion (IMAGEHLP.@)
|
1998-10-11 19:04:17 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
PAPI_VERSION WINAPI ImagehlpApiVersion()
|
1998-10-11 19:04:17 +02:00
|
|
|
{
|
|
|
|
return &IMAGEHLP_ApiVersion;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* ImagehlpApiVersionEx (IMAGEHLP.@)
|
1998-10-11 19:04:17 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
PAPI_VERSION WINAPI ImagehlpApiVersionEx(PAPI_VERSION AppVersion)
|
1998-10-11 19:04:17 +02:00
|
|
|
{
|
|
|
|
if(!AppVersion)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
AppVersion->MajorVersion = IMAGEHLP_ApiVersion.MajorVersion;
|
|
|
|
AppVersion->MinorVersion = IMAGEHLP_ApiVersion.MinorVersion;
|
|
|
|
AppVersion->Revision = IMAGEHLP_ApiVersion.Revision;
|
|
|
|
AppVersion->Reserved = IMAGEHLP_ApiVersion.Reserved;
|
|
|
|
|
|
|
|
return AppVersion;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* MakeSureDirectoryPathExists (IMAGEHLP.@)
|
1998-10-11 19:04:17 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI MakeSureDirectoryPathExists(LPCSTR DirPath)
|
1998-10-11 19:04:17 +02:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("(%s): stub\n", debugstr_a(DirPath));
|
1998-10-11 19:04:17 +02:00
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* MarkImageAsRunFromSwap (IMAGEHLP.@)
|
1998-10-11 19:04:17 +02:00
|
|
|
* FIXME
|
|
|
|
* No documentation available.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/***********************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* SearchTreeForFile (IMAGEHLP.@)
|
1998-10-11 19:04:17 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI SearchTreeForFile(
|
1998-10-11 19:04:17 +02:00
|
|
|
LPSTR RootPath, LPSTR InputPathName, LPSTR OutputPathBuffer)
|
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("(%s, %s, %s): stub\n",
|
1998-10-11 19:04:17 +02:00
|
|
|
debugstr_a(RootPath), debugstr_a(InputPathName),
|
|
|
|
debugstr_a(OutputPathBuffer)
|
|
|
|
);
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* TouchFileTimes (IMAGEHLP.@)
|
1998-10-11 19:04:17 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI TouchFileTimes(
|
|
|
|
HANDLE FileHandle, LPSYSTEMTIME lpSystemTime)
|
1998-10-11 19:04:17 +02:00
|
|
|
{
|
1999-05-14 10:17:14 +02:00
|
|
|
FIXME("(0x%08x, %p): stub\n",
|
1998-10-11 19:04:17 +02:00
|
|
|
FileHandle, lpSystemTime
|
|
|
|
);
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|