1998-10-11 19:04:17 +02:00
|
|
|
/*
|
|
|
|
* IMAGEHLP library
|
|
|
|
*
|
|
|
|
* Copyright 1998 Patrik Stridvall
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
1998-10-11 19:04:17 +02:00
|
|
|
*/
|
|
|
|
|
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"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
1998-10-11 19:04:17 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(imagehlp);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
1998-10-11 19:04:17 +02:00
|
|
|
/**********************************************************************/
|
|
|
|
|
2003-01-15 00:43:41 +01:00
|
|
|
HANDLE IMAGEHLP_hHeap = 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
|
|
|
|
|
|
|
/***********************************************************************
|
2002-11-05 00:53:41 +01:00
|
|
|
* DllMain (IMAGEHLP.init)
|
1998-10-11 19:04:17 +02:00
|
|
|
*/
|
2002-11-05 00:53:41 +01:00
|
|
|
BOOL WINAPI DllMain(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);
|
2003-01-15 00:43:41 +01:00
|
|
|
IMAGEHLP_hHeap = 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",
|
2002-06-01 01:06:46 +02:00
|
|
|
debugstr_a(RootPath), debugstr_a(InputPathName),
|
1998-10-11 19:04:17 +02:00
|
|
|
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
|
|
|
{
|
2002-10-22 02:45:27 +02:00
|
|
|
FIXME("(%p, %p): stub\n",
|
1998-10-11 19:04:17 +02:00
|
|
|
FileHandle, lpSystemTime
|
|
|
|
);
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|