blob: 0c1dbd001328032e362a14ccef83d0f4da40c5b4 [file] [log] [blame]
Alexandre Julliardd30dfd21998-09-27 18:28:36 +00001/*
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00002 * Declarations for PSAPI
3 *
4 * Copyright (C) 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
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000019 */
20
21#ifndef __WINE_PSAPI_H
22#define __WINE_PSAPI_H
23
Alexandre Julliarda3960291999-02-26 11:11:13 +000024typedef struct _MODULEINFO {
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000025 LPVOID lpBaseOfDll;
26 DWORD SizeOfImage;
27 LPVOID EntryPoint;
Alexandre Julliarda3960291999-02-26 11:11:13 +000028} MODULEINFO, *LPMODULEINFO;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000029
Vincent Béron9a624912002-05-31 23:06:46 +000030typedef struct _PROCESS_MEMORY_COUNTERS {
31 DWORD cb;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000032 DWORD PageFaultCount;
33 DWORD PeakWorkingSetSize;
34 DWORD WorkingSetSize;
35 DWORD QuotaPeakPagedPoolUsage;
36 DWORD QuotaPagedPoolUsage;
Vincent Béron9a624912002-05-31 23:06:46 +000037 DWORD QuotaPeakNonPagedPoolUsage;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000038 DWORD QuotaNonPagedPoolUsage;
Vincent Béron9a624912002-05-31 23:06:46 +000039 DWORD PagefileUsage;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000040 DWORD PeakPagefileUsage;
Alexandre Julliarda3960291999-02-26 11:11:13 +000041} PROCESS_MEMORY_COUNTERS;
42typedef PROCESS_MEMORY_COUNTERS *PPROCESS_MEMORY_COUNTERS;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000043
Alexandre Julliarda3960291999-02-26 11:11:13 +000044typedef struct _PSAPI_WS_WATCH_INFORMATION {
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000045 LPVOID FaultingPc;
46 LPVOID FaultingVa;
Alexandre Julliarda3960291999-02-26 11:11:13 +000047} PSAPI_WS_WATCH_INFORMATION, *PPSAPI_WS_WATCH_INFORMATION;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000048
Hans Leidekkerfccfcbf2005-01-20 19:59:48 +000049typedef struct _PERFORMANCE_INFORMATION {
Eric Pouech4b708a32003-01-08 23:59:31 +000050 DWORD cb;
51 SIZE_T CommitTotal;
52 SIZE_T CommitLimit;
53 SIZE_T CommitPeak;
54 SIZE_T PhysicalTotal;
55 SIZE_T PhysicalAvailable;
56 SIZE_T SystemCache;
57 SIZE_T KernelTotal;
58 SIZE_T KernelPaged;
59 SIZE_T KernelNonpaged;
60 SIZE_T PageSize;
61 DWORD HandleCount;
62 DWORD ProcessCount;
63 DWORD ThreadCount;
Hans Leidekkerfccfcbf2005-01-20 19:59:48 +000064} PERFORMANCE_INFORMATION, *PPERFORMANCE_INFORMATION;
Eric Pouech4b708a32003-01-08 23:59:31 +000065
66typedef struct _ENUM_PAGE_FILE_INFORMATION {
67 DWORD cb;
68 DWORD Reserved;
69 SIZE_T TotalSize;
70 SIZE_T TotalInUse;
71 SIZE_T PeakUsage;
72} ENUM_PAGE_FILE_INFORMATION, *PENUM_PAGE_FILE_INFORMATION;
73
74typedef BOOL (*PENUM_PAGE_FILE_CALLBACKA) (LPVOID, PENUM_PAGE_FILE_INFORMATION, LPCSTR);
75typedef BOOL (*PENUM_PAGE_FILE_CALLBACKW) (LPVOID, PENUM_PAGE_FILE_INFORMATION, LPCWSTR);
76#define PENUM_PAGE_FILE_CALLBACK WINELIB_NAME_AW(PENUM_PAGE_FILE_CALLBACK)
77
78#ifdef __cplusplus
79extern "C" {
80#endif
81
82BOOL WINAPI EnumProcesses(DWORD*, DWORD, DWORD*);
83BOOL WINAPI EnumProcessModules(HANDLE, HMODULE*, DWORD, LPDWORD);
84DWORD WINAPI GetModuleBaseNameA(HANDLE, HMODULE, LPSTR, DWORD);
85DWORD WINAPI GetModuleBaseNameW(HANDLE, HMODULE, LPWSTR, DWORD);
86#define GetModuleBaseName WINELIB_NAME_AW(GetModuleBaseName)
87DWORD WINAPI GetModuleFileNameExA(HANDLE, HMODULE, LPSTR, DWORD);
88DWORD WINAPI GetModuleFileNameExW(HANDLE, HMODULE, LPWSTR, DWORD);
89#define GetModuleFileName WINELIB_NAME_AW(GetModuleFileName)
90BOOL WINAPI GetModuleInformation(HANDLE, HMODULE, LPMODULEINFO, DWORD);
91BOOL WINAPI EmptyWorkingSet(HANDLE);
92BOOL WINAPI QueryWorkingSet(HANDLE, PVOID, DWORD);
Hans Leidekkerfccfcbf2005-01-20 19:59:48 +000093BOOL WINAPI QueryWorkingSetEx(HANDLE, PVOID, DWORD);
Eric Pouech4b708a32003-01-08 23:59:31 +000094BOOL WINAPI InitializeProcessForWsWatch(HANDLE);
95BOOL WINAPI GetWsChanges(HANDLE, PPSAPI_WS_WATCH_INFORMATION, DWORD);
96DWORD WINAPI GetMappedFileNameW(HANDLE, LPVOID, LPWSTR, DWORD);
97DWORD WINAPI GetMappedFileNameA(HANDLE, LPVOID, LPSTR, DWORD);
98#define GetMappedFileName WINELIB_NAME_AW(GetMappedFileName)
99BOOL WINAPI EnumDeviceDrivers(LPVOID*, DWORD, LPDWORD);
100DWORD WINAPI GetDeviceDriverBaseNameA(LPVOID, LPSTR, DWORD);
101DWORD WINAPI GetDeviceDriverBaseNameW(LPVOID, LPWSTR, DWORD);
102#define GetDeviceDriverBaseName WINELIB_NAME_AW(GetDeviceDriverBaseName)
103DWORD WINAPI GetDeviceDriverFileNameA(LPVOID, LPSTR, DWORD);
104DWORD WINAPI GetDeviceDriverFileNameW(LPVOID, LPWSTR, DWORD);
105#define GetDeviceDriverFileName WINELIB_NAME_AW(GetDeviceDriverFileName)
106BOOL WINAPI GetProcessMemoryInfo(HANDLE, PPROCESS_MEMORY_COUNTERS, DWORD);
Hans Leidekkerfccfcbf2005-01-20 19:59:48 +0000107BOOL WINAPI GetPerformanceInfo(PPERFORMANCE_INFORMATION, DWORD);
Eric Pouech4b708a32003-01-08 23:59:31 +0000108BOOL WINAPI EnumPageFilesA(PENUM_PAGE_FILE_CALLBACKA, LPVOID);
109BOOL WINAPI EnumPageFilesW(PENUM_PAGE_FILE_CALLBACKW, LPVOID);
110#define EnumPageFiles WINELIB_NAME_AW(EnumPageFiles)
111DWORD WINAPI GetProcessImageFileNameA(HANDLE, LPSTR, DWORD);
112DWORD WINAPI GetProcessImageFileNameW(HANDLE, LPWSTR, DWORD);
113#define GetProcessImageFileName WINELIB_NAME_AW(GetProcessImageFileName)
114
115#ifdef __cplusplus
116}
117#endif
118
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000119#endif /* __WINE_PSAPI_H */