/[ProcessMemoryDumper]/branches/pmd_18_x86/psapi.h
ViewVC logotype

Contents of /branches/pmd_18_x86/psapi.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (show annotations) (download)
Fri Aug 31 04:08:07 2012 UTC (7 years, 4 months ago) by william
File MIME type: text/plain
File size: 4177 byte(s)
commit upstream branch code
1 /*++ BUILD Version: 0001 // Increment this if a change has global effects
2
3 Copyright (c) 1994-1998 Microsoft Corporation
4
5 Module Name:
6
7 psapi.h
8
9 Abstract:
10
11 Include file for APIs provided by PSAPI.DLL
12
13 Author:
14
15 Richard Shupak [richards] 06-Jan-1994
16
17 Revision History:
18
19 --*/
20
21 #ifndef _PSAPI_H_
22 #define _PSAPI_H_
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 BOOL
29 WINAPI
30 EnumProcesses(
31 DWORD * lpidProcess,
32 DWORD cb,
33 DWORD * cbNeeded
34 );
35
36 BOOL
37 WINAPI
38 EnumProcessModules(
39 HANDLE hProcess,
40 HMODULE *lphModule,
41 DWORD cb,
42 LPDWORD lpcbNeeded
43 );
44
45 DWORD
46 WINAPI
47 GetModuleBaseNameA(
48 HANDLE hProcess,
49 HMODULE hModule,
50 LPSTR lpBaseName,
51 DWORD nSize
52 );
53
54 DWORD
55 WINAPI
56 GetModuleBaseNameW(
57 HANDLE hProcess,
58 HMODULE hModule,
59 LPWSTR lpBaseName,
60 DWORD nSize
61 );
62
63 #ifdef UNICODE
64 #define GetModuleBaseName GetModuleBaseNameW
65 #else
66 #define GetModuleBaseName GetModuleBaseNameA
67 #endif // !UNICODE
68
69
70 DWORD
71 WINAPI
72 GetModuleFileNameExA(
73 HANDLE hProcess,
74 HMODULE hModule,
75 LPSTR lpFilename,
76 DWORD nSize
77 );
78
79 DWORD
80 WINAPI
81 GetModuleFileNameExW(
82 HANDLE hProcess,
83 HMODULE hModule,
84 LPWSTR lpFilename,
85 DWORD nSize
86 );
87
88 #ifdef UNICODE
89 #define GetModuleFileNameEx GetModuleFileNameExW
90 #else
91 #define GetModuleFileNameEx GetModuleFileNameExA
92 #endif // !UNICODE
93
94
95 typedef struct _MODULEINFO {
96 LPVOID lpBaseOfDll;
97 DWORD SizeOfImage;
98 LPVOID EntryPoint;
99 } MODULEINFO, *LPMODULEINFO;
100
101
102 BOOL
103 WINAPI
104 GetModuleInformation(
105 HANDLE hProcess,
106 HMODULE hModule,
107 LPMODULEINFO lpmodinfo,
108 DWORD cb
109 );
110
111
112 BOOL
113 WINAPI
114 EmptyWorkingSet(
115 HANDLE hProcess
116 );
117
118
119 BOOL
120 WINAPI
121 QueryWorkingSet(
122 HANDLE hProcess,
123 PVOID pv,
124 DWORD cb
125 );
126
127 BOOL
128 WINAPI
129 InitializeProcessForWsWatch(
130 HANDLE hProcess
131 );
132
133
134 typedef struct _PSAPI_WS_WATCH_INFORMATION {
135 LPVOID FaultingPc;
136 LPVOID FaultingVa;
137 } PSAPI_WS_WATCH_INFORMATION, *PPSAPI_WS_WATCH_INFORMATION;
138
139 BOOL
140 WINAPI
141 GetWsChanges(
142 HANDLE hProcess,
143 PPSAPI_WS_WATCH_INFORMATION lpWatchInfo,
144 DWORD cb
145 );
146
147 DWORD
148 WINAPI
149 GetMappedFileNameW(
150 HANDLE hProcess,
151 LPVOID lpv,
152 LPWSTR lpFilename,
153 DWORD nSize
154 );
155
156 DWORD
157 WINAPI
158 GetMappedFileNameA(
159 HANDLE hProcess,
160 LPVOID lpv,
161 LPSTR lpFilename,
162 DWORD nSize
163 );
164
165 #ifdef UNICODE
166 #define GetMappedFilenameEx GetMappedFilenameExW
167 #else
168 #define GetMappedFilenameEx GetMappedFilenameExA
169 #endif // !UNICODE
170
171 BOOL
172 WINAPI
173 EnumDeviceDrivers(
174 LPVOID *lpImageBase,
175 DWORD cb,
176 LPDWORD lpcbNeeded
177 );
178
179
180 DWORD
181 WINAPI
182 GetDeviceDriverBaseNameA(
183 LPVOID ImageBase,
184 LPSTR lpBaseName,
185 DWORD nSize
186 );
187
188 DWORD
189 WINAPI
190 GetDeviceDriverBaseNameW(
191 LPVOID ImageBase,
192 LPWSTR lpBaseName,
193 DWORD nSize
194 );
195
196 #ifdef UNICODE
197 #define GetDeviceDriverBaseName GetDeviceDriverBaseNameW
198 #else
199 #define GetDeviceDriverBaseName GetDeviceDriverBaseNameA
200 #endif // !UNICODE
201
202
203 DWORD
204 WINAPI
205 GetDeviceDriverFileNameA(
206 LPVOID ImageBase,
207 LPSTR lpFilename,
208 DWORD nSize
209 );
210
211 DWORD
212 WINAPI
213 GetDeviceDriverFileNameW(
214 LPVOID ImageBase,
215 LPWSTR lpFilename,
216 DWORD nSize
217 );
218
219 #ifdef UNICODE
220 #define GetDeviceDriverFileName GetDeviceDriverFileNameW
221 #else
222 #define GetDeviceDriverFileName GetDeviceDriverFileNameA
223 #endif // !UNICODE
224
225 // Structure for GetProcessMemoryInfo()
226
227 typedef struct _PROCESS_MEMORY_COUNTERS {
228 DWORD cb;
229 DWORD PageFaultCount;
230 DWORD PeakWorkingSetSize;
231 DWORD WorkingSetSize;
232 DWORD QuotaPeakPagedPoolUsage;
233 DWORD QuotaPagedPoolUsage;
234 DWORD QuotaPeakNonPagedPoolUsage;
235 DWORD QuotaNonPagedPoolUsage;
236 DWORD PagefileUsage;
237 DWORD PeakPagefileUsage;
238 } PROCESS_MEMORY_COUNTERS;
239 typedef PROCESS_MEMORY_COUNTERS *PPROCESS_MEMORY_COUNTERS;
240
241 BOOL
242 WINAPI
243 GetProcessMemoryInfo(
244 HANDLE Process,
245 PPROCESS_MEMORY_COUNTERS ppsmemCounters,
246 DWORD cb
247 );
248
249 #ifdef __cplusplus
250 }
251 #endif
252
253 #endif

  ViewVC Help
Powered by ViewVC 1.1.22