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
27 #include "wine/debug.h"
29 WINE_DEFAULT_DEBUG_CHANNEL(imagehlp);
31 /**********************************************************************/
32 HANDLE IMAGEHLP_hHeap = NULL;
34 /***********************************************************************
35 * DllMain (IMAGEHLP.init)
37 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
41 case DLL_PROCESS_ATTACH:
42 DisableThreadLibraryCalls(hinstDLL);
43 IMAGEHLP_hHeap = HeapCreate(0, 0x10000, 0);
45 case DLL_PROCESS_DETACH:
46 HeapDestroy(IMAGEHLP_hHeap);
47 IMAGEHLP_hHeap = NULL;
55 /***********************************************************************
56 * MarkImageAsRunFromSwap (IMAGEHLP.@)
58 * No documentation available.
61 /***********************************************************************
62 * TouchFileTimes (IMAGEHLP.@)
64 BOOL WINAPI TouchFileTimes(HANDLE FileHandle, LPSYSTEMTIME lpSystemTime)
67 SYSTEMTIME SystemTime;
69 if(lpSystemTime == NULL)
71 GetSystemTime(&SystemTime);
72 lpSystemTime = &SystemTime;
75 return (SystemTimeToFileTime(lpSystemTime, &FileTime) &&
76 SetFileTime(FileHandle, NULL, NULL, &FileTime));