~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/psapi/tests/psapi_main.c

Version: ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  * Unit test suite for PSAPI
  3  *
  4  * Copyright (C) 2005 Felix Nawothnig
  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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 19  */
 20 
 21 #include <stdarg.h>
 22 #include <stdio.h>
 23 
 24 #include "windows.h"
 25 #include "wine/test.h"
 26 #include "psapi.h"
 27 
 28 #define expect_eq_d(expected, actual) \
 29     do { \
 30       int value = (actual); \
 31       ok((expected) == value, "Expected " #actual " to be %d (" #expected ") is %d\n", \
 32           (expected), value); \
 33     } while (0)
 34 
 35 #define PSAPI_GET_PROC(func) \
 36     p ## func = (void*)GetProcAddress(hpsapi, #func); \
 37     if(!p ## func) { \
 38         ok(0, "GetProcAddress(%s) failed\n", #func); \
 39         FreeLibrary(hpsapi); \
 40         return FALSE; \
 41     }
 42 
 43 /* All PSAPI functions return non-zero and call SetLastError() 
 44  * on failure so we can use some macros for convenience */
 45 
 46 #define w32_suc(x) \
 47   (SetLastError(0xdeadbeef), \
 48    (x) \
 49      ? (ok(1, "succeeded\n"), 1) \
 50      : GetLastError() == 0xdeadbeef \
 51        ? (ok(0, "failed without error code\n"), 0) \
 52        : (ok(0, "failed with %d\n", GetLastError()), 0))
 53 
 54 #define w32_err(x, e) \
 55   (SetLastError(0xdeadbeef), \
 56    (x) \
 57      ? (ok(0, "expected error=%d but succeeded\n", e), 0) \
 58      : GetLastError() == e \
 59        ? (ok(1, "failed with %d\n", e), 1) \
 60        : GetLastError() == 0xdeadbeef \
 61          ? (ok(0, "failed without error code\n"), 0) \
 62          : (ok(0, "expected error=%d but failed with %d\n", \
 63                  e, GetLastError()), 0))
 64 
 65 static BOOL  (WINAPI *pEmptyWorkingSet)(HANDLE);
 66 static BOOL  (WINAPI *pEnumProcesses)(DWORD*, DWORD, DWORD*);
 67 static BOOL  (WINAPI *pEnumProcessModules)(HANDLE, HMODULE*, DWORD, LPDWORD);
 68 static DWORD (WINAPI *pGetModuleBaseNameA)(HANDLE, HMODULE, LPSTR, DWORD);
 69 static DWORD (WINAPI *pGetModuleFileNameExA)(HANDLE, HMODULE, LPSTR, DWORD);
 70 static BOOL  (WINAPI *pGetModuleInformation)(HANDLE, HMODULE, LPMODULEINFO, DWORD);
 71 static DWORD (WINAPI *pGetMappedFileNameA)(HANDLE, LPVOID, LPSTR, DWORD);
 72 static DWORD (WINAPI *pGetProcessImageFileNameA)(HANDLE, LPSTR, DWORD);
 73 static DWORD (WINAPI *pGetProcessImageFileNameW)(HANDLE, LPWSTR, DWORD);
 74 static BOOL  (WINAPI *pGetProcessMemoryInfo)(HANDLE, PPROCESS_MEMORY_COUNTERS, DWORD);
 75 static BOOL  (WINAPI *pGetWsChanges)(HANDLE, PPSAPI_WS_WATCH_INFORMATION, DWORD);
 76 static BOOL  (WINAPI *pInitializeProcessForWsWatch)(HANDLE);
 77 static BOOL  (WINAPI *pQueryWorkingSet)(HANDLE, PVOID, DWORD);
 78       
 79 static BOOL InitFunctionPtrs(HMODULE hpsapi)
 80 {
 81     PSAPI_GET_PROC(EmptyWorkingSet);
 82     PSAPI_GET_PROC(EnumProcessModules);
 83     PSAPI_GET_PROC(EnumProcesses);
 84     PSAPI_GET_PROC(GetModuleBaseNameA);
 85     PSAPI_GET_PROC(GetModuleFileNameExA);
 86     PSAPI_GET_PROC(GetModuleInformation);
 87     PSAPI_GET_PROC(GetMappedFileNameA);
 88     PSAPI_GET_PROC(GetProcessMemoryInfo);
 89     PSAPI_GET_PROC(GetWsChanges);
 90     PSAPI_GET_PROC(InitializeProcessForWsWatch);
 91     PSAPI_GET_PROC(QueryWorkingSet);
 92     /* GetProcessImageFileName is not exported on NT4 */
 93     pGetProcessImageFileNameA =
 94       (void *)GetProcAddress(hpsapi, "GetProcessImageFileNameA");
 95     pGetProcessImageFileNameW =
 96       (void *)GetProcAddress(hpsapi, "GetProcessImageFileNameW");
 97     return TRUE;
 98 }
 99 
100 static HANDLE hpSR, hpQI, hpVR, hpQV, hpAA;
101 static const HANDLE hBad = (HANDLE)0xdeadbeef;
102 
103 static void test_EnumProcesses(void)
104 {
105     DWORD pid, cbUsed = 0xdeadbeef;
106 
107     if(w32_suc(pEnumProcesses(NULL, 0, &cbUsed)))
108         ok(cbUsed == 0, "cbUsed=%d\n", cbUsed);
109     if(w32_suc(pEnumProcesses(&pid, 4, &cbUsed)))
110         ok(cbUsed == 4, "cbUsed=%d\n", cbUsed);
111 }
112 
113 static void test_EnumProcessModules(void)
114 {
115     HMODULE hMod = GetModuleHandle(NULL);
116     DWORD cbNeeded = 0xdeadbeef;
117 
118     w32_err(pEnumProcessModules(NULL, NULL, 0, &cbNeeded), ERROR_INVALID_HANDLE);
119     w32_err(pEnumProcessModules(hpQI, NULL, 0, &cbNeeded), ERROR_ACCESS_DENIED);
120     w32_suc(pEnumProcessModules(hpQV, NULL, 0, &cbNeeded));
121     if(!w32_suc(pEnumProcessModules(hpQV, &hMod, sizeof(HMODULE), &cbNeeded)))
122         return;
123     ok(cbNeeded / sizeof(HMODULE) >= 3 && cbNeeded / sizeof(HMODULE) <= 5 * sizeof(HMODULE),
124        "cbNeeded=%d\n", cbNeeded);
125     ok(hMod == GetModuleHandle(NULL),
126        "hMod=%p GetModuleHandle(NULL)=%p\n", hMod, GetModuleHandle(NULL));
127 }
128 
129 static void test_GetModuleInformation(void)
130 {
131     HMODULE hMod = GetModuleHandle(NULL);
132     MODULEINFO info;
133     
134     w32_err(pGetModuleInformation(NULL, hMod, &info, sizeof(info)), ERROR_INVALID_HANDLE);
135     w32_err(pGetModuleInformation(hpQI, hMod, &info, sizeof(info)), ERROR_ACCESS_DENIED);
136     w32_err(pGetModuleInformation(hpQV, hBad, &info, sizeof(info)), ERROR_INVALID_HANDLE);
137     w32_err(pGetModuleInformation(hpQV, hMod, &info, sizeof(info)-1), ERROR_INSUFFICIENT_BUFFER);
138     if(w32_suc(pGetModuleInformation(hpQV, hMod, &info, sizeof(info))))
139         ok(info.lpBaseOfDll == hMod, "lpBaseOfDll=%p hMod=%p\n", info.lpBaseOfDll, hMod);
140 }
141 
142 static void test_GetProcessMemoryInfo(void)
143 {
144     PROCESS_MEMORY_COUNTERS pmc;
145 
146     w32_err(pGetProcessMemoryInfo(NULL, &pmc, sizeof(pmc)), ERROR_INVALID_HANDLE);
147     todo_wine w32_err(pGetProcessMemoryInfo(hpSR, &pmc, sizeof(pmc)), ERROR_ACCESS_DENIED);
148     w32_err(pGetProcessMemoryInfo(hpQI, &pmc, sizeof(pmc)-1), ERROR_INSUFFICIENT_BUFFER);
149     w32_suc(pGetProcessMemoryInfo(hpQI, &pmc, sizeof(pmc)));
150 }
151 
152 static void test_GetMappedFileName(void)
153 {
154     HMODULE hMod = GetModuleHandle(NULL);
155     char szMapPath[MAX_PATH], szModPath[MAX_PATH], *szMapBaseName;
156     DWORD ret;
157     
158     w32_err(pGetMappedFileNameA(NULL, hMod, szMapPath, sizeof(szMapPath)), ERROR_INVALID_HANDLE);
159     w32_err(pGetMappedFileNameA(hpSR, hMod, szMapPath, sizeof(szMapPath)), ERROR_ACCESS_DENIED);
160     if(!w32_suc(ret = pGetMappedFileNameA(hpQI, hMod, szMapPath, sizeof(szMapPath))))
161         return;
162     ok(ret == strlen(szMapPath), "szMapPath=\"%s\" ret=%d\n", szMapPath, ret);
163     ok(szMapPath[0] == '\\', "szMapPath=\"%s\"\n", szMapPath);
164     szMapBaseName = strrchr(szMapPath, '\\'); /* That's close enough for us */
165     if(!szMapBaseName || !*szMapBaseName)
166     {
167         ok(0, "szMapPath=\"%s\"\n", szMapPath);
168         return;
169     }
170     GetModuleFileNameA(NULL, szModPath, sizeof(szModPath));
171     ok(!strcmp(strrchr(szModPath, '\\'), szMapBaseName),
172        "szModPath=\"%s\" szMapBaseName=\"%s\"\n", szModPath, szMapBaseName);
173 }
174 
175 static void test_GetProcessImageFileName(void)
176 {
177     HMODULE hMod = GetModuleHandle(NULL);
178     char szImgPath[MAX_PATH], szMapPath[MAX_PATH];
179     WCHAR szImgPathW[MAX_PATH];
180     DWORD ret;
181 
182     if(pGetProcessImageFileNameA == NULL)
183         return;
184 
185     /* This function is available on WinXP+ only */
186     SetLastError(0xdeadbeef);
187     if(!pGetProcessImageFileNameA(hpQI, szImgPath, sizeof(szImgPath)))
188     {
189         if(GetLastError() == ERROR_INVALID_FUNCTION) {
190             win_skip("GetProcessImageFileName not implemented\n");
191             return;
192         }
193 
194         if(GetLastError() == 0xdeadbeef)
195             todo_wine ok(0, "failed without error code\n");
196         else
197             todo_wine ok(0, "failed with %d\n", GetLastError());
198     }
199 
200     todo_wine w32_err(pGetProcessImageFileNameA(NULL, szImgPath, sizeof(szImgPath)), ERROR_INVALID_HANDLE);
201     todo_wine w32_err(pGetProcessImageFileNameA(hpSR, szImgPath, sizeof(szImgPath)), ERROR_ACCESS_DENIED);
202     todo_wine w32_err(pGetProcessImageFileNameA(hpQI, szImgPath, 0), ERROR_INSUFFICIENT_BUFFER);
203     todo_wine
204     if(w32_suc(ret = pGetProcessImageFileNameA(hpQI, szImgPath, sizeof(szImgPath))) &&
205        w32_suc(pGetMappedFileNameA(hpQV, hMod, szMapPath, sizeof(szMapPath)))) {
206         /* Windows returns 2*strlen-1 */
207         ok(ret >= strlen(szImgPath), "szImgPath=\"%s\" ret=%d\n", szImgPath, ret);
208         ok(!strcmp(szImgPath, szMapPath),
209            "szImgPath=\"%s\" szMapPath=\"%s\"\n", szImgPath, szMapPath);
210     }
211 
212     w32_err(pGetProcessImageFileNameW(NULL, szImgPathW, sizeof(szImgPathW)), ERROR_INVALID_HANDLE);
213     /* no information about correct buffer size returned: */
214     w32_err(pGetProcessImageFileNameW(hpQI, szImgPathW, 0), ERROR_INSUFFICIENT_BUFFER);
215     w32_err(pGetProcessImageFileNameW(hpQI, NULL, 0), ERROR_INSUFFICIENT_BUFFER);
216 
217     /* correct call */
218     memset(szImgPathW, 0xff, sizeof(szImgPathW));
219     ret = pGetProcessImageFileNameW(hpQI, szImgPathW, sizeof(szImgPathW)/sizeof(WCHAR));
220     ok(ret > 0, "GetProcessImageFileNameW should have succeeded.\n");
221     ok(szImgPathW[0] == '\\', "GetProcessImageFileNameW should have returned an NT path.\n");
222     expect_eq_d(lstrlenW(szImgPathW), ret);
223 
224     /* boundary values of 'size' */
225     w32_err(pGetProcessImageFileNameW(hpQI, szImgPathW, ret), ERROR_INSUFFICIENT_BUFFER);
226 
227     memset(szImgPathW, 0xff, sizeof(szImgPathW));
228     ret = pGetProcessImageFileNameW(hpQI, szImgPathW, ret + 1);
229     ok(ret > 0, "GetProcessImageFileNameW should have succeeded.\n");
230     ok(szImgPathW[0] == '\\', "GetProcessImageFileNameW should have returned an NT path.\n");
231     expect_eq_d(lstrlenW(szImgPathW), ret);
232 }
233 
234 static void test_GetModuleFileNameEx(void)
235 {
236     HMODULE hMod = GetModuleHandle(NULL);
237     char szModExPath[MAX_PATH+1], szModPath[MAX_PATH+1];
238     DWORD ret;
239     
240     w32_err(pGetModuleFileNameExA(NULL, hMod, szModExPath, sizeof(szModExPath)), ERROR_INVALID_HANDLE);
241     w32_err(pGetModuleFileNameExA(hpQI, hMod, szModExPath, sizeof(szModExPath)), ERROR_ACCESS_DENIED);
242     w32_err(pGetModuleFileNameExA(hpQV, hBad, szModExPath, sizeof(szModExPath)), ERROR_INVALID_HANDLE);
243     if(!w32_suc(ret = pGetModuleFileNameExA(hpQV, NULL, szModExPath, sizeof(szModExPath))))
244         return;
245     ok(ret == strlen(szModExPath), "szModExPath=\"%s\" ret=%d\n", szModExPath, ret);
246     GetModuleFileNameA(NULL, szModPath, sizeof(szModPath));
247     ok(!strncmp(szModExPath, szModPath, MAX_PATH), 
248        "szModExPath=\"%s\" szModPath=\"%s\"\n", szModExPath, szModPath);
249 }
250 
251 static void test_GetModuleBaseName(void)
252 {
253     HMODULE hMod = GetModuleHandle(NULL);
254     char szModPath[MAX_PATH], szModBaseName[MAX_PATH];
255     DWORD ret;
256 
257     w32_err(pGetModuleBaseNameA(NULL, hMod, szModBaseName, sizeof(szModBaseName)), ERROR_INVALID_HANDLE);
258     w32_err(pGetModuleBaseNameA(hpQI, hMod, szModBaseName, sizeof(szModBaseName)), ERROR_ACCESS_DENIED);
259     w32_err(pGetModuleBaseNameA(hpQV, hBad, szModBaseName, sizeof(szModBaseName)), ERROR_INVALID_HANDLE);
260     if(!w32_suc(ret = pGetModuleBaseNameA(hpQV, NULL, szModBaseName, sizeof(szModBaseName))))
261         return;
262     ok(ret == strlen(szModBaseName), "szModBaseName=\"%s\" ret=%d\n", szModBaseName, ret);
263     GetModuleFileNameA(NULL, szModPath, sizeof(szModPath));
264     ok(!strcmp(strrchr(szModPath, '\\') + 1, szModBaseName),
265        "szModPath=\"%s\" szModBaseName=\"%s\"\n", szModPath, szModBaseName);
266 }
267 
268 static void test_ws_functions(void)
269 {
270     PSAPI_WS_WATCH_INFORMATION wswi[4096];
271     ULONG_PTR pages[4096];
272     char *addr;
273     unsigned int i;
274     
275     todo_wine w32_err(pEmptyWorkingSet(NULL), ERROR_INVALID_HANDLE);
276     todo_wine w32_err(pEmptyWorkingSet(hpSR), ERROR_ACCESS_DENIED);
277     w32_suc(pEmptyWorkingSet(hpAA));
278     
279     todo_wine w32_err(pInitializeProcessForWsWatch(NULL), ERROR_INVALID_HANDLE);
280     w32_suc(pInitializeProcessForWsWatch(hpAA));
281     
282     if(!w32_suc(addr = VirtualAlloc(NULL, 1, MEM_COMMIT, PAGE_READWRITE)))
283         return;
284 
285     if(!VirtualLock(addr, 1))
286     {
287         trace("locking failed (error=%d) - skipping test\n", GetLastError());
288         goto free_page;
289     }
290         
291     todo_wine if(w32_suc(pQueryWorkingSet(hpQI, pages, 4096 * sizeof(ULONG_PTR))))
292     {
293        for(i = 0; i < pages[0]; i++)
294            if((pages[i+1] & ~0xfffL) == (ULONG_PTR)addr)
295            {
296                ok(1, "QueryWorkingSet found our page\n");
297                goto test_gwsc;
298            }
299        
300        ok(0, "QueryWorkingSet didn't find our page\n");
301     }
302 
303 test_gwsc:
304     todo_wine if(w32_suc(pGetWsChanges(hpQI, wswi, sizeof(wswi))))
305     {
306         for(i = 0; wswi[i].FaultingVa; i++)
307             if(((ULONG_PTR)wswi[i].FaultingVa & ~0xfffL) == (ULONG_PTR)addr)
308             {
309                 ok(1, "GetWsChanges found our page\n");
310                 goto free_page;
311             }
312 
313         ok(0, "GetWsChanges didn't find our page\n");
314     }
315     
316 free_page:
317     VirtualFree(addr, 0, MEM_RELEASE);
318 }
319 
320 START_TEST(psapi_main)
321 {
322     HMODULE hpsapi = LoadLibraryA("psapi.dll");
323     
324     if(!hpsapi)
325     {
326         trace("Could not load psapi.dll\n");
327         return;
328     }
329 
330     if(InitFunctionPtrs(hpsapi))
331     {
332         DWORD pid = GetCurrentProcessId();
333 
334         w32_suc(hpSR = OpenProcess(STANDARD_RIGHTS_REQUIRED, FALSE, pid));
335         w32_suc(hpQI = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid));
336         w32_suc(hpVR = OpenProcess(PROCESS_VM_READ, FALSE, pid));
337         w32_suc(hpQV = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid));
338         w32_suc(hpAA = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid));
339         if(hpSR && hpQI && hpVR && hpQV && hpAA)
340         {
341             test_EnumProcesses();
342             test_EnumProcessModules();
343             test_GetModuleInformation();
344             test_GetProcessMemoryInfo();
345             todo_wine test_GetMappedFileName();
346             test_GetProcessImageFileName();
347             test_GetModuleFileNameEx();
348             test_GetModuleBaseName();
349             test_ws_functions();
350         }
351         CloseHandle(hpSR);
352         CloseHandle(hpQI);
353         CloseHandle(hpVR);
354         CloseHandle(hpQV);
355         CloseHandle(hpAA);
356     }
357     
358     FreeLibrary(hpsapi);
359 }
360 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.