4 * Copyright 1998 Patrik Stridvall
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include "wine/debug.h"
27 WINE_DEFAULT_DEBUG_CHANNEL(imagehlp);
29 /**********************************************************************/
31 HANDLE IMAGEHLP_hHeap = NULL;
33 static API_VERSION IMAGEHLP_ApiVersion = { 4, 0, 0, 5 };
35 /***********************************************************************
36 * DllMain (IMAGEHLP.init)
38 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
42 case DLL_PROCESS_ATTACH:
43 DisableThreadLibraryCalls(hinstDLL);
44 IMAGEHLP_hHeap = HeapCreate(0, 0x10000, 0);
46 case DLL_PROCESS_DETACH:
47 HeapDestroy(IMAGEHLP_hHeap);
48 IMAGEHLP_hHeap = NULL;
56 /***********************************************************************
57 * ImagehlpApiVersion (IMAGEHLP.@)
59 PAPI_VERSION WINAPI ImagehlpApiVersion()
61 return &IMAGEHLP_ApiVersion;
64 /***********************************************************************
65 * ImagehlpApiVersionEx (IMAGEHLP.@)
67 PAPI_VERSION WINAPI ImagehlpApiVersionEx(PAPI_VERSION AppVersion)
72 AppVersion->MajorVersion = IMAGEHLP_ApiVersion.MajorVersion;
73 AppVersion->MinorVersion = IMAGEHLP_ApiVersion.MinorVersion;
74 AppVersion->Revision = IMAGEHLP_ApiVersion.Revision;
75 AppVersion->Reserved = IMAGEHLP_ApiVersion.Reserved;
80 /***********************************************************************
81 * MakeSureDirectoryPathExists (IMAGEHLP.@)
83 BOOL WINAPI MakeSureDirectoryPathExists(LPCSTR DirPath)
85 if (CreateDirectoryA(DirPath,NULL))
87 if (GetLastError() == ERROR_ALREADY_EXISTS)
89 SetLastError(ERROR_SUCCESS);
95 /***********************************************************************
96 * MarkImageAsRunFromSwap (IMAGEHLP.@)
98 * No documentation available.
101 /***********************************************************************
102 * SearchTreeForFile (IMAGEHLP.@)
104 BOOL WINAPI SearchTreeForFile(
105 LPSTR RootPath, LPSTR InputPathName, LPSTR OutputPathBuffer)
107 FIXME("(%s, %s, %s): stub\n",
108 debugstr_a(RootPath), debugstr_a(InputPathName),
109 debugstr_a(OutputPathBuffer)
111 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
115 /***********************************************************************
116 * TouchFileTimes (IMAGEHLP.@)
118 BOOL WINAPI TouchFileTimes(
119 HANDLE FileHandle, LPSYSTEMTIME lpSystemTime)
121 FIXME("(%p, %p): stub\n",
122 FileHandle, lpSystemTime
124 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);