When an error occurred in a property sheet because of invalid data,
[wine] / dlls / imagehlp / imagehlp_main.c
1 /*
2  *      IMAGEHLP library
3  *
4  *      Copyright 1998  Patrik Stridvall
5  */
6
7 #include "imagehlp.h"
8 #include "winerror.h"
9 #include "winbase.h"
10 #include "windef.h"
11 #include "debugtools.h"
12
13 DEFAULT_DEBUG_CHANNEL(imagehlp)
14
15 /**********************************************************************/
16
17 HANDLE IMAGEHLP_hHeap = (HANDLE) NULL;
18
19 static API_VERSION IMAGEHLP_ApiVersion = { 4, 0, 0, 5 };
20
21 /***********************************************************************
22  *           IMAGEHLP_LibMain (IMAGEHLP.init)
23  */
24 BOOL WINAPI IMAGEHLP_LibMain(
25   HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
26 {
27   switch(fdwReason)
28     {
29     case DLL_PROCESS_ATTACH:
30       IMAGEHLP_hHeap = HeapCreate(0, 0x10000, 0);
31       break;
32     case DLL_PROCESS_DETACH:
33       HeapDestroy(IMAGEHLP_hHeap);
34       IMAGEHLP_hHeap = (HANDLE) NULL;
35       break;
36     case DLL_THREAD_ATTACH:
37       break;
38     case DLL_THREAD_DETACH:
39       break;
40     default:
41       break;
42     }
43   return TRUE;
44 }
45
46 /***********************************************************************
47  *           ImagehlpApiVersion32 (IMAGEHLP.22)
48  */
49 PAPI_VERSION WINAPI ImagehlpApiVersion()
50 {
51   return &IMAGEHLP_ApiVersion;
52 }
53
54 /***********************************************************************
55  *           ImagehlpApiVersionEx32 (IMAGEHLP.23)
56  */
57 PAPI_VERSION WINAPI ImagehlpApiVersionEx(PAPI_VERSION AppVersion)
58 {
59   if(!AppVersion)
60     return NULL;
61
62   AppVersion->MajorVersion = IMAGEHLP_ApiVersion.MajorVersion;
63   AppVersion->MinorVersion = IMAGEHLP_ApiVersion.MinorVersion;
64   AppVersion->Revision = IMAGEHLP_ApiVersion.Revision;
65   AppVersion->Reserved = IMAGEHLP_ApiVersion.Reserved;
66
67   return AppVersion;
68 }
69
70 /***********************************************************************
71  *           MakeSureDirectoryPathExists32 (IMAGEHLP.24)
72  */
73 BOOL WINAPI MakeSureDirectoryPathExists(LPCSTR DirPath)
74 {
75   FIXME("(%s): stub\n", debugstr_a(DirPath));
76   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
77   return FALSE;
78 }
79
80 /***********************************************************************
81  *           MarkImageAsRunFromSwap (IMAGEHLP.29)
82  * FIXME
83  *   No documentation available.
84  */
85
86 /***********************************************************************
87  *           SearchTreeForFile32 (IMAGEHLP.33)
88  */
89 BOOL WINAPI SearchTreeForFile(
90   LPSTR RootPath, LPSTR InputPathName, LPSTR OutputPathBuffer)
91 {
92   FIXME("(%s, %s, %s): stub\n",
93     debugstr_a(RootPath), debugstr_a(InputPathName), 
94     debugstr_a(OutputPathBuffer)
95   );
96   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
97   return FALSE;
98 }
99
100 /***********************************************************************
101  *           TouchFileTimes32 (IMAGEHLP.56)
102  */
103 BOOL WINAPI TouchFileTimes(
104   HANDLE FileHandle, LPSYSTEMTIME lpSystemTime)
105 {
106   FIXME("(0x%08x, %p): stub\n",
107     FileHandle, lpSystemTime
108   );
109   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
110   return FALSE;
111 }
112
113
114