blob: b125a4688a7ba2f3f8313389b3e1f1bfdcd4a066 [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
Patrik Stridvall1ed4ecf1999-06-26 14:58:24 +000024#include "windef.h"
25
Alexandre Julliarda3960291999-02-26 11:11:13 +000026typedef struct _MODULEINFO {
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000027 LPVOID lpBaseOfDll;
28 DWORD SizeOfImage;
29 LPVOID EntryPoint;
Alexandre Julliarda3960291999-02-26 11:11:13 +000030} MODULEINFO, *LPMODULEINFO;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000031
Vincent Béron9a624912002-05-31 23:06:46 +000032typedef struct _PROCESS_MEMORY_COUNTERS {
33 DWORD cb;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000034 DWORD PageFaultCount;
35 DWORD PeakWorkingSetSize;
36 DWORD WorkingSetSize;
37 DWORD QuotaPeakPagedPoolUsage;
38 DWORD QuotaPagedPoolUsage;
Vincent Béron9a624912002-05-31 23:06:46 +000039 DWORD QuotaPeakNonPagedPoolUsage;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000040 DWORD QuotaNonPagedPoolUsage;
Vincent Béron9a624912002-05-31 23:06:46 +000041 DWORD PagefileUsage;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000042 DWORD PeakPagefileUsage;
Alexandre Julliarda3960291999-02-26 11:11:13 +000043} PROCESS_MEMORY_COUNTERS;
44typedef PROCESS_MEMORY_COUNTERS *PPROCESS_MEMORY_COUNTERS;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000045
Alexandre Julliarda3960291999-02-26 11:11:13 +000046typedef struct _PSAPI_WS_WATCH_INFORMATION {
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000047 LPVOID FaultingPc;
48 LPVOID FaultingVa;
Alexandre Julliarda3960291999-02-26 11:11:13 +000049} PSAPI_WS_WATCH_INFORMATION, *PPSAPI_WS_WATCH_INFORMATION;
Alexandre Julliardd30dfd21998-09-27 18:28:36 +000050
Eric Pouech4b708a32003-01-08 23:59:31 +000051typedef struct _PERFORMACE_INFORMATION {
52 DWORD cb;
53 SIZE_T CommitTotal;
54 SIZE_T CommitLimit;
55 SIZE_T CommitPeak;
56 SIZE_T PhysicalTotal;
57 SIZE_T PhysicalAvailable;
58 SIZE_T SystemCache;
59 SIZE_T KernelTotal;
60 SIZE_T KernelPaged;
61 SIZE_T KernelNonpaged;
62 SIZE_T PageSize;
63 DWORD HandleCount;
64 DWORD ProcessCount;
65 DWORD ThreadCount;
66} PERFORMACE_INFORMATION, *PPERFORMACE_INFORMATION;
67
68typedef struct _ENUM_PAGE_FILE_INFORMATION {
69 DWORD cb;
70 DWORD Reserved;
71 SIZE_T TotalSize;
72 SIZE_T TotalInUse;
73 SIZE_T PeakUsage;
74} ENUM_PAGE_FILE_INFORMATION, *PENUM_PAGE_FILE_INFORMATION;
75
76typedef BOOL (*PENUM_PAGE_FILE_CALLBACKA) (LPVOID, PENUM_PAGE_FILE_INFORMATION, LPCSTR);
77typedef BOOL (*PENUM_PAGE_FILE_CALLBACKW) (LPVOID, PENUM_PAGE_FILE_INFORMATION, LPCWSTR);
78#define PENUM_PAGE_FILE_CALLBACK WINELIB_NAME_AW(PENUM_PAGE_FILE_CALLBACK)
79
80#ifdef __cplusplus
81extern "C" {
82#endif
83
84BOOL WINAPI EnumProcesses(DWORD*, DWORD, DWORD*);
85BOOL WINAPI EnumProcessModules(HANDLE, HMODULE*, DWORD, LPDWORD);
86DWORD WINAPI GetModuleBaseNameA(HANDLE, HMODULE, LPSTR, DWORD);
87DWORD WINAPI GetModuleBaseNameW(HANDLE, HMODULE, LPWSTR, DWORD);
88#define GetModuleBaseName WINELIB_NAME_AW(GetModuleBaseName)
89DWORD WINAPI GetModuleFileNameExA(HANDLE, HMODULE, LPSTR, DWORD);
90DWORD WINAPI GetModuleFileNameExW(HANDLE, HMODULE, LPWSTR, DWORD);
91#define GetModuleFileName WINELIB_NAME_AW(GetModuleFileName)
92BOOL WINAPI GetModuleInformation(HANDLE, HMODULE, LPMODULEINFO, DWORD);
93BOOL WINAPI EmptyWorkingSet(HANDLE);
94BOOL WINAPI QueryWorkingSet(HANDLE, PVOID, DWORD);
95BOOL WINAPI InitializeProcessForWsWatch(HANDLE);
96BOOL WINAPI GetWsChanges(HANDLE, PPSAPI_WS_WATCH_INFORMATION, DWORD);
97DWORD WINAPI GetMappedFileNameW(HANDLE, LPVOID, LPWSTR, DWORD);
98DWORD WINAPI GetMappedFileNameA(HANDLE, LPVOID, LPSTR, DWORD);
99#define GetMappedFileName WINELIB_NAME_AW(GetMappedFileName)
100BOOL WINAPI EnumDeviceDrivers(LPVOID*, DWORD, LPDWORD);
101DWORD WINAPI GetDeviceDriverBaseNameA(LPVOID, LPSTR, DWORD);
102DWORD WINAPI GetDeviceDriverBaseNameW(LPVOID, LPWSTR, DWORD);
103#define GetDeviceDriverBaseName WINELIB_NAME_AW(GetDeviceDriverBaseName)
104DWORD WINAPI GetDeviceDriverFileNameA(LPVOID, LPSTR, DWORD);
105DWORD WINAPI GetDeviceDriverFileNameW(LPVOID, LPWSTR, DWORD);
106#define GetDeviceDriverFileName WINELIB_NAME_AW(GetDeviceDriverFileName)
107BOOL WINAPI GetProcessMemoryInfo(HANDLE, PPROCESS_MEMORY_COUNTERS, DWORD);
108BOOL WINAPI GetPerformanceInfo(PPERFORMACE_INFORMATION, DWORD);
109BOOL WINAPI EnumPageFilesA(PENUM_PAGE_FILE_CALLBACKA, LPVOID);
110BOOL WINAPI EnumPageFilesW(PENUM_PAGE_FILE_CALLBACKW, LPVOID);
111#define EnumPageFiles WINELIB_NAME_AW(EnumPageFiles)
112DWORD WINAPI GetProcessImageFileNameA(HANDLE, LPSTR, DWORD);
113DWORD WINAPI GetProcessImageFileNameW(HANDLE, LPWSTR, DWORD);
114#define GetProcessImageFileName WINELIB_NAME_AW(GetProcessImageFileName)
115
116#ifdef __cplusplus
117}
118#endif
119
Alexandre Julliardd30dfd21998-09-27 18:28:36 +0000120#endif /* __WINE_PSAPI_H */