devenum/tests: Get rid of strchrW() and strncmpW().
[wine.git] / include / psapi.h
blob742bf7b574a8416dcf5be379a67fc54b934813ab
1 /*
2 * Declarations for PSAPI
4 * Copyright (C) 1998 Patrik Stridvall
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.
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.
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
21 #ifndef __WINE_PSAPI_H
22 #define __WINE_PSAPI_H
24 #ifndef PSAPI_VERSION
25 #define PSAPI_VERSION 2
26 #endif
28 typedef struct _MODULEINFO {
29 LPVOID lpBaseOfDll;
30 DWORD SizeOfImage;
31 LPVOID EntryPoint;
32 } MODULEINFO, *LPMODULEINFO;
34 typedef struct _PROCESS_MEMORY_COUNTERS {
35 DWORD cb;
36 DWORD PageFaultCount;
37 SIZE_T PeakWorkingSetSize;
38 SIZE_T WorkingSetSize;
39 SIZE_T QuotaPeakPagedPoolUsage;
40 SIZE_T QuotaPagedPoolUsage;
41 SIZE_T QuotaPeakNonPagedPoolUsage;
42 SIZE_T QuotaNonPagedPoolUsage;
43 SIZE_T PagefileUsage;
44 SIZE_T PeakPagefileUsage;
45 } PROCESS_MEMORY_COUNTERS;
46 typedef PROCESS_MEMORY_COUNTERS *PPROCESS_MEMORY_COUNTERS;
48 typedef struct _PSAPI_WS_WATCH_INFORMATION {
49 LPVOID FaultingPc;
50 LPVOID FaultingVa;
51 } PSAPI_WS_WATCH_INFORMATION, *PPSAPI_WS_WATCH_INFORMATION;
53 typedef struct _PSAPI_WS_WATCH_INFORMATION_EX {
54 PSAPI_WS_WATCH_INFORMATION BasicInfo;
55 ULONG_PTR FaultingThreadId;
56 ULONG_PTR Flags;
57 } PSAPI_WS_WATCH_INFORMATION_EX, *PPSAPI_WS_WATCH_INFORMATION_EX;
59 typedef struct _PERFORMANCE_INFORMATION {
60 DWORD cb;
61 SIZE_T CommitTotal;
62 SIZE_T CommitLimit;
63 SIZE_T CommitPeak;
64 SIZE_T PhysicalTotal;
65 SIZE_T PhysicalAvailable;
66 SIZE_T SystemCache;
67 SIZE_T KernelTotal;
68 SIZE_T KernelPaged;
69 SIZE_T KernelNonpaged;
70 SIZE_T PageSize;
71 DWORD HandleCount;
72 DWORD ProcessCount;
73 DWORD ThreadCount;
74 } PERFORMANCE_INFORMATION, *PPERFORMANCE_INFORMATION;
76 typedef struct _ENUM_PAGE_FILE_INFORMATION {
77 DWORD cb;
78 DWORD Reserved;
79 SIZE_T TotalSize;
80 SIZE_T TotalInUse;
81 SIZE_T PeakUsage;
82 } ENUM_PAGE_FILE_INFORMATION, *PENUM_PAGE_FILE_INFORMATION;
84 typedef BOOL (*PENUM_PAGE_FILE_CALLBACKA) (LPVOID, PENUM_PAGE_FILE_INFORMATION, LPCSTR);
85 typedef BOOL (*PENUM_PAGE_FILE_CALLBACKW) (LPVOID, PENUM_PAGE_FILE_INFORMATION, LPCWSTR);
86 #define PENUM_PAGE_FILE_CALLBACK WINELIB_NAME_AW(PENUM_PAGE_FILE_CALLBACK)
88 #ifdef __cplusplus
89 extern "C" {
90 #endif
92 #if PSAPI_VERSION > 1
93 #define EnumProcesses K32EnumProcesses
94 #define EnumProcessModules K32EnumProcessModules
95 #define EnumProcessModulesEx K32EnumProcessModulesEx
96 #define GetModuleBaseNameA K32GetModuleBaseNameA
97 #define GetModuleBaseNameW K32GetModuleBaseNameW
98 #define GetModuleFileNameExA K32GetModuleFileNameExA
99 #define GetModuleFileNameExW K32GetModuleFileNameExW
100 #define GetModuleInformation K32GetModuleInformation
101 #define EmptyWorkingSet K32EmptyWorkingSet
102 #define QueryWorkingSet K32QueryWorkingSet
103 #define QueryWorkingSetEx K32QueryWorkingSetEx
104 #define InitializeProcessForWsWatch K32InitializeProcessForWsWatch
105 #define GetWsChanges K32GetWsChanges
106 #define GetWsChangesEx K32GetWsChangesEx
107 #define GetMappedFileNameW K32GetMappedFileNameW
108 #define GetMappedFileNameA K32GetMappedFileNameA
109 #define EnumDeviceDrivers K32EnumDeviceDrivers
110 #define GetDeviceDriverBaseNameA K32GetDeviceDriverBaseNameA
111 #define GetDeviceDriverBaseNameW K32GetDeviceDriverBaseNameW
112 #define GetDeviceDriverFileNameA K32GetDeviceDriverFileNameA
113 #define GetDeviceDriverFileNameW K32GetDeviceDriverFileNameW
114 #define GetProcessMemoryInfo K32GetProcessMemoryInfo
115 #define GetPerformanceInfo K32GetPerformanceInfo
116 #define EnumPageFilesW K32EnumPageFilesW
117 #define EnumPageFilesA K32EnumPageFilesA
118 #define GetProcessImageFileNameA K32GetProcessImageFileNameA
119 #define GetProcessImageFileNameW K32GetProcessImageFileNameW
120 #endif
122 BOOL WINAPI EnumProcesses(DWORD*, DWORD, DWORD*);
123 BOOL WINAPI EnumProcessModules(HANDLE, HMODULE*, DWORD, LPDWORD);
124 BOOL WINAPI EnumProcessModulesEx(HANDLE, HMODULE*, DWORD, LPDWORD, DWORD);
125 DWORD WINAPI GetModuleBaseNameA(HANDLE, HMODULE, LPSTR, DWORD);
126 DWORD WINAPI GetModuleBaseNameW(HANDLE, HMODULE, LPWSTR, DWORD);
127 #define GetModuleBaseName WINELIB_NAME_AW(GetModuleBaseName)
128 DWORD WINAPI GetModuleFileNameExA(HANDLE, HMODULE, LPSTR, DWORD);
129 DWORD WINAPI GetModuleFileNameExW(HANDLE, HMODULE, LPWSTR, DWORD);
130 #define GetModuleFileNameEx WINELIB_NAME_AW(GetModuleFileNameEx)
131 BOOL WINAPI GetModuleInformation(HANDLE, HMODULE, LPMODULEINFO, DWORD);
132 BOOL WINAPI EmptyWorkingSet(HANDLE);
133 BOOL WINAPI QueryWorkingSet(HANDLE, PVOID, DWORD);
134 BOOL WINAPI QueryWorkingSetEx(HANDLE, PVOID, DWORD);
135 BOOL WINAPI InitializeProcessForWsWatch(HANDLE);
136 BOOL WINAPI GetWsChanges(HANDLE, PPSAPI_WS_WATCH_INFORMATION, DWORD);
137 BOOL WINAPI GetWsChangesEx(HANDLE, PSAPI_WS_WATCH_INFORMATION_EX*, DWORD*);
138 DWORD WINAPI GetMappedFileNameW(HANDLE, LPVOID, LPWSTR, DWORD);
139 DWORD WINAPI GetMappedFileNameA(HANDLE, LPVOID, LPSTR, DWORD);
140 #define GetMappedFileName WINELIB_NAME_AW(GetMappedFileName)
141 BOOL WINAPI EnumDeviceDrivers(LPVOID*, DWORD, LPDWORD);
142 DWORD WINAPI GetDeviceDriverBaseNameA(LPVOID, LPSTR, DWORD);
143 DWORD WINAPI GetDeviceDriverBaseNameW(LPVOID, LPWSTR, DWORD);
144 #define GetDeviceDriverBaseName WINELIB_NAME_AW(GetDeviceDriverBaseName)
145 DWORD WINAPI GetDeviceDriverFileNameA(LPVOID, LPSTR, DWORD);
146 DWORD WINAPI GetDeviceDriverFileNameW(LPVOID, LPWSTR, DWORD);
147 #define GetDeviceDriverFileName WINELIB_NAME_AW(GetDeviceDriverFileName)
148 BOOL WINAPI GetProcessMemoryInfo(HANDLE, PPROCESS_MEMORY_COUNTERS, DWORD);
149 BOOL WINAPI GetPerformanceInfo(PPERFORMANCE_INFORMATION, DWORD);
150 BOOL WINAPI EnumPageFilesA(PENUM_PAGE_FILE_CALLBACKA, LPVOID);
151 BOOL WINAPI EnumPageFilesW(PENUM_PAGE_FILE_CALLBACKW, LPVOID);
152 #define EnumPageFiles WINELIB_NAME_AW(EnumPageFiles)
153 DWORD WINAPI GetProcessImageFileNameA(HANDLE, LPSTR, DWORD);
154 DWORD WINAPI GetProcessImageFileNameW(HANDLE, LPWSTR, DWORD);
155 #define GetProcessImageFileName WINELIB_NAME_AW(GetProcessImageFileName)
157 #ifdef __cplusplus
159 #endif
161 #endif /* __WINE_PSAPI_H */