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 /**********************************************************************/
33 HANDLE IMAGEHLP_hHeap
= NULL
;
35 static API_VERSION IMAGEHLP_ApiVersion
= { 4, 0, 0, 5 };
37 /***********************************************************************
38 * DllMain (IMAGEHLP.init)
40 BOOL WINAPI
DllMain(HINSTANCE hinstDLL
, DWORD fdwReason
, LPVOID lpvReserved
)
44 case DLL_PROCESS_ATTACH
:
45 DisableThreadLibraryCalls(hinstDLL
);
46 IMAGEHLP_hHeap
= HeapCreate(0, 0x10000, 0);
48 case DLL_PROCESS_DETACH
:
49 HeapDestroy(IMAGEHLP_hHeap
);
50 IMAGEHLP_hHeap
= NULL
;
58 /***********************************************************************
59 * ImagehlpApiVersion (IMAGEHLP.@)
61 LPAPI_VERSION WINAPI
ImagehlpApiVersion(VOID
)
63 return &IMAGEHLP_ApiVersion
;
66 /***********************************************************************
67 * ImagehlpApiVersionEx (IMAGEHLP.@)
69 LPAPI_VERSION WINAPI
ImagehlpApiVersionEx(LPAPI_VERSION AppVersion
)
74 AppVersion
->MajorVersion
= IMAGEHLP_ApiVersion
.MajorVersion
;
75 AppVersion
->MinorVersion
= IMAGEHLP_ApiVersion
.MinorVersion
;
76 AppVersion
->Revision
= IMAGEHLP_ApiVersion
.Revision
;
77 AppVersion
->Reserved
= IMAGEHLP_ApiVersion
.Reserved
;
82 /***********************************************************************
83 * MakeSureDirectoryPathExists (IMAGEHLP.@)
85 BOOL WINAPI
MakeSureDirectoryPathExists(LPCSTR DirPath
)
87 if (CreateDirectoryA(DirPath
,NULL
))
89 if (GetLastError() == ERROR_ALREADY_EXISTS
)
91 SetLastError(ERROR_SUCCESS
);
97 /***********************************************************************
98 * MarkImageAsRunFromSwap (IMAGEHLP.@)
100 * No documentation available.
103 /***********************************************************************
104 * SearchTreeForFile (IMAGEHLP.@)
106 BOOL WINAPI
SearchTreeForFile(
107 LPSTR RootPath
, LPSTR InputPathName
, LPSTR OutputPathBuffer
)
109 FIXME("(%s, %s, %s): stub\n",
110 debugstr_a(RootPath
), debugstr_a(InputPathName
),
111 debugstr_a(OutputPathBuffer
)
113 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
117 /***********************************************************************
118 * TouchFileTimes (IMAGEHLP.@)
120 BOOL WINAPI
TouchFileTimes(
121 HANDLE FileHandle
, LPSYSTEMTIME lpSystemTime
)
123 FIXME("(%p, %p): stub\n",
124 FileHandle
, lpSystemTime
126 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);