Update shell xxxAW wrapper prototypes for fixed SHLWAPI functions.
[wine] / dlls / psapi / psapi_main.c
1 /*
2  *      PSAPI library
3  *
4  *      Copyright 1998  Patrik Stridvall
5  *
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.
10  *
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.
15  *
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
19  */
20
21 #include "winbase.h"
22 #include "windef.h"
23 #include "winerror.h"
24 #include "wine/debug.h"
25 #include "psapi.h"
26
27 WINE_DEFAULT_DEBUG_CHANNEL(psapi);
28
29 #include <string.h>
30
31 /***********************************************************************
32  *           EmptyWorkingSet (PSAPI.@)
33  */
34 BOOL WINAPI EmptyWorkingSet(HANDLE hProcess)
35 {
36   return SetProcessWorkingSetSize(hProcess, 0xFFFFFFFF, 0xFFFFFFFF);
37 }
38
39 /***********************************************************************
40  *           EnumDeviceDrivers (PSAPI.@)
41  */
42 BOOL WINAPI EnumDeviceDrivers(
43   LPVOID *lpImageBase, DWORD cb, LPDWORD lpcbNeeded)
44 {
45   FIXME("(%p, %ld, %p): stub\n", lpImageBase, cb, lpcbNeeded);
46
47   if(lpcbNeeded)
48     *lpcbNeeded = 0;
49
50   return TRUE;
51 }    
52
53
54 /***********************************************************************
55  *           EnumProcesses (PSAPI.@)
56  */
57 BOOL WINAPI EnumProcesses(DWORD *lpidProcess, DWORD cb, DWORD *lpcbNeeded)
58 {
59   FIXME("(%p, %ld, %p): stub\n", lpidProcess,cb, lpcbNeeded);
60
61   if(lpcbNeeded)
62     *lpcbNeeded = 0;
63
64   return TRUE;
65 }
66
67 /***********************************************************************
68  *           EnumProcessModules (PSAPI.@)
69  */
70 BOOL WINAPI EnumProcessModules(
71   HANDLE hProcess, HMODULE *lphModule, DWORD cb, LPDWORD lpcbNeeded)
72 {
73   FIXME("(hProcess=0x%08x, %p, %ld, %p): stub\n",
74     hProcess, lphModule, cb, lpcbNeeded
75   );
76
77   if(lpcbNeeded)
78     *lpcbNeeded = 0;
79
80   return TRUE;
81 }
82
83 /***********************************************************************
84  *          GetDeviceDriverBaseNameA (PSAPI.@)
85  */
86 DWORD WINAPI GetDeviceDriverBaseNameA(
87   LPVOID ImageBase, LPSTR lpBaseName, DWORD nSize)
88 {
89   FIXME("(%p, %s, %ld): stub\n",
90     ImageBase, debugstr_a(lpBaseName), nSize
91   );
92
93   if(lpBaseName && nSize)
94     lpBaseName[0] = '\0';
95
96   return 0;
97 }
98
99 /***********************************************************************
100  *           GetDeviceDriverBaseNameW (PSAPI.@)
101  */
102 DWORD WINAPI GetDeviceDriverBaseNameW(
103   LPVOID ImageBase, LPWSTR lpBaseName, DWORD nSize)
104 {
105   FIXME("(%p, %s, %ld): stub\n",
106     ImageBase, debugstr_w(lpBaseName), nSize
107   );
108
109   if(lpBaseName && nSize)
110     lpBaseName[0] = '\0';
111
112   return 0;
113 }
114
115 /***********************************************************************
116  *           GetDeviceDriverFileNameA (PSAPI.@)
117  */
118 DWORD WINAPI GetDeviceDriverFileNameA(
119   LPVOID ImageBase, LPSTR lpFilename, DWORD nSize)
120 {
121   FIXME("(%p, %s, %ld): stub\n",
122     ImageBase, debugstr_a(lpFilename), nSize
123   );
124
125   if(lpFilename && nSize)
126     lpFilename[0] = '\0';
127
128   return 0;
129 }
130
131 /***********************************************************************
132  *           GetDeviceDriverFileNameW (PSAPI.@)
133  */
134 DWORD WINAPI GetDeviceDriverFileNameW(
135   LPVOID ImageBase, LPWSTR lpFilename, DWORD nSize)
136 {
137   FIXME("(%p, %s, %ld): stub\n",
138     ImageBase, debugstr_w(lpFilename), nSize
139   );
140
141   if(lpFilename && nSize)
142     lpFilename[0] = '\0';
143
144   return 0;
145 }
146
147 /***********************************************************************
148  *           GetMappedFileNameA (PSAPI.@)
149  */
150 DWORD WINAPI GetMappedFileNameA(
151   HANDLE hProcess, LPVOID lpv, LPSTR lpFilename, DWORD nSize)
152 {
153   FIXME("(hProcess=0x%08x, %p, %s, %ld): stub\n",
154     hProcess, lpv, debugstr_a(lpFilename), nSize
155   );
156
157   if(lpFilename && nSize)
158     lpFilename[0] = '\0';
159
160   return 0;
161 }
162
163 /***********************************************************************
164  *           GetMappedFileNameW (PSAPI.@)
165  */
166 DWORD WINAPI GetMappedFileNameW(
167   HANDLE hProcess, LPVOID lpv, LPWSTR lpFilename, DWORD nSize)
168 {
169   FIXME("(hProcess=0x%08x, %p, %s, %ld): stub\n",
170     hProcess, lpv, debugstr_w(lpFilename), nSize
171   );
172
173   if(lpFilename && nSize)
174     lpFilename[0] = '\0';
175
176   return 0;
177 }
178
179 /***********************************************************************
180  *           GetModuleBaseNameA (PSAPI.@)
181  */
182 DWORD WINAPI GetModuleBaseNameA(
183   HANDLE hProcess, HMODULE hModule, LPSTR lpBaseName, DWORD nSize)
184 {
185   FIXME("(hProcess=0x%08x, hModule=0x%08x, %s, %ld): stub\n",
186     hProcess, hModule, debugstr_a(lpBaseName), nSize
187   );
188
189   if(lpBaseName && nSize)
190     lpBaseName[0] = '\0';
191
192   return 0;
193 }
194
195 /***********************************************************************
196  *           GetModuleBaseNameW (PSAPI.@)
197  */
198 DWORD WINAPI GetModuleBaseNameW(
199   HANDLE hProcess, HMODULE hModule, LPWSTR lpBaseName, DWORD nSize)
200 {
201   FIXME("(hProcess=0x%08x, hModule=0x%08x, %s, %ld): stub\n",
202     hProcess, hModule, debugstr_w(lpBaseName), nSize);
203
204   if(lpBaseName && nSize)
205     lpBaseName[0] = '\0';
206
207   return 0;
208 }
209
210 /***********************************************************************
211  *           GetModuleFileNameExA (PSAPI.@)
212  */
213 DWORD WINAPI GetModuleFileNameExA(
214   HANDLE hProcess, HMODULE hModule, LPSTR lpFilename, DWORD nSize)
215 {
216   FIXME("(hProcess=0x%08x,hModule=0x%08x, %s, %ld): stub\n",
217     hProcess, hModule, debugstr_a(lpFilename), nSize
218   );
219
220   if(lpFilename&&nSize)
221     lpFilename[0]='\0';
222
223   return 0;
224 }
225
226 /***********************************************************************
227  *           GetModuleFileNameExW (PSAPI.@)
228  */
229 DWORD WINAPI GetModuleFileNameExW(
230   HANDLE hProcess, HMODULE hModule, LPWSTR lpFilename, DWORD nSize)
231 {
232   FIXME("(hProcess=0x%08x,hModule=0x%08x, %s, %ld): stub\n",
233     hProcess, hModule, debugstr_w(lpFilename), nSize
234   );
235
236   if(lpFilename && nSize)
237     lpFilename[0] = '\0';
238
239   return 0;
240 }
241
242 /***********************************************************************
243  *           GetModuleInformation (PSAPI.@)
244  */
245 BOOL WINAPI GetModuleInformation(
246   HANDLE hProcess, HMODULE hModule, LPMODULEINFO lpmodinfo, DWORD cb)
247 {
248   FIXME("(hProcess=0x%08x, hModule=0x%08x, %p, %ld): stub\n",
249     hProcess, hModule, lpmodinfo, cb
250   );
251
252   memset(lpmodinfo, 0, cb);
253
254   return TRUE;
255 }
256
257 /***********************************************************************
258  *           GetProcessMemoryInfo (PSAPI.@)
259  */
260 BOOL WINAPI GetProcessMemoryInfo(
261   HANDLE Process, PPROCESS_MEMORY_COUNTERS ppsmemCounters, DWORD cb)
262 {
263   FIXME("(hProcess=0x%08x, %p, %ld): stub\n",
264     Process, ppsmemCounters, cb
265   );
266
267   memset(ppsmemCounters, 0, cb);
268
269   return TRUE;
270 }
271
272 /***********************************************************************
273  *           GetWsChanges (PSAPI.@)
274  */
275 BOOL WINAPI GetWsChanges(
276   HANDLE hProcess, PPSAPI_WS_WATCH_INFORMATION lpWatchInfo, DWORD cb)
277 {
278   FIXME("(hProcess=0x%08x, %p, %ld): stub\n",
279     hProcess, lpWatchInfo, cb
280   );
281
282   memset(lpWatchInfo, 0, cb);
283
284   return TRUE;
285 }
286
287 /***********************************************************************
288  *           InitializeProcessForWsWatch (PSAPI.@)
289  */
290 BOOL WINAPI InitializeProcessForWsWatch(HANDLE hProcess)
291 {
292   FIXME("(hProcess=0x%08x): stub\n", hProcess);
293
294   return TRUE;
295 }
296
297 /***********************************************************************
298  *           QueryWorkingSet (PSAPI.?)
299  * FIXME
300  *     I haven't been able to find the ordinal for this function,
301  *     This means it can't be called from outside the DLL.
302  */
303 BOOL WINAPI QueryWorkingSet(HANDLE hProcess, LPVOID pv, DWORD cb)
304 {
305   FIXME("(hProcess=0x%08x, %p, %ld)\n", hProcess, pv, cb);
306
307   if(pv && cb)
308     ((DWORD *) pv)[0] = 0; /* Empty WorkingSet */
309
310   return TRUE;
311 }
312
313
314
315
316