1 // Licensed under the Apache License, Version 2.0 2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. 4 // All files in the project carrying such notice may not be copied, modified, or distributed 5 // except according to those terms. 6 //! FFI bindings to psapi. 7 use shared::basetsd::{SIZE_T, ULONG_PTR}; 8 use shared::minwindef::{BOOL, DWORD, HMODULE, LPDWORD, LPVOID, PDWORD}; 9 use um::winnt::{HANDLE, LPCSTR, LPCWSTR, LPSTR, LPWSTR, PVOID}; 10 pub const LIST_MODULES_DEFAULT: DWORD = 0x0; 11 pub const LIST_MODULES_32BIT: DWORD = 0x01; 12 pub const LIST_MODULES_64BIT: DWORD = 0x02; 13 pub const LIST_MODULES_ALL: DWORD = LIST_MODULES_32BIT | LIST_MODULES_64BIT; 14 extern "system" { K32EnumProcesses( lpidProcess: *mut DWORD, cb: DWORD, lpcbNeeded: LPDWORD, ) -> BOOL15 pub fn K32EnumProcesses( 16 lpidProcess: *mut DWORD, 17 cb: DWORD, 18 lpcbNeeded: LPDWORD, 19 ) -> BOOL; K32EnumProcessModules( hProcess: HANDLE, lphModule: *mut HMODULE, cb: DWORD, lpcbNeeded: LPDWORD, ) -> BOOL20 pub fn K32EnumProcessModules( 21 hProcess: HANDLE, 22 lphModule: *mut HMODULE, 23 cb: DWORD, 24 lpcbNeeded: LPDWORD, 25 ) -> BOOL; K32EnumProcessModulesEx( hProcess: HANDLE, lphModule: *mut HMODULE, cb: DWORD, lpcbNeeded: LPDWORD, dwFilterFlag: DWORD, ) -> BOOL26 pub fn K32EnumProcessModulesEx( 27 hProcess: HANDLE, 28 lphModule: *mut HMODULE, 29 cb: DWORD, 30 lpcbNeeded: LPDWORD, 31 dwFilterFlag: DWORD, 32 ) -> BOOL; K32GetModuleBaseNameA( hProcess: HANDLE, hModule: HMODULE, lpBaseName: LPSTR, nSize: DWORD, ) -> DWORD33 pub fn K32GetModuleBaseNameA( 34 hProcess: HANDLE, 35 hModule: HMODULE, 36 lpBaseName: LPSTR, 37 nSize: DWORD, 38 ) -> DWORD; K32GetModuleBaseNameW( hProcess: HANDLE, hModule: HMODULE, lpBaseName: LPWSTR, nSize: DWORD, ) -> DWORD39 pub fn K32GetModuleBaseNameW( 40 hProcess: HANDLE, 41 hModule: HMODULE, 42 lpBaseName: LPWSTR, 43 nSize: DWORD, 44 ) -> DWORD; K32GetModuleFileNameExA( hProcess: HANDLE, hModule: HMODULE, lpFilename: LPSTR, nSize: DWORD, ) -> DWORD45 pub fn K32GetModuleFileNameExA( 46 hProcess: HANDLE, 47 hModule: HMODULE, 48 lpFilename: LPSTR, 49 nSize: DWORD, 50 ) -> DWORD; K32GetModuleFileNameExW( hProcess: HANDLE, hModule: HMODULE, lpFilename: LPWSTR, nSize: DWORD, ) -> DWORD51 pub fn K32GetModuleFileNameExW( 52 hProcess: HANDLE, 53 hModule: HMODULE, 54 lpFilename: LPWSTR, 55 nSize: DWORD, 56 ) -> DWORD; K32EmptyWorkingSet( hProcess: HANDLE, ) -> BOOL57 pub fn K32EmptyWorkingSet( 58 hProcess: HANDLE, 59 ) -> BOOL; K32QueryWorkingSet( hProcess: HANDLE, pv: PVOID, cb: DWORD, ) -> BOOL60 pub fn K32QueryWorkingSet( 61 hProcess: HANDLE, 62 pv: PVOID, 63 cb: DWORD, 64 ) -> BOOL; K32QueryWorkingSetEx( hProcess: HANDLE, pv: PVOID, cb: DWORD, ) -> BOOL65 pub fn K32QueryWorkingSetEx( 66 hProcess: HANDLE, 67 pv: PVOID, 68 cb: DWORD, 69 ) -> BOOL; K32InitializeProcessForWsWatch( hProcess: HANDLE, ) -> BOOL70 pub fn K32InitializeProcessForWsWatch( 71 hProcess: HANDLE, 72 ) -> BOOL; K32GetWsChanges( hProcess: HANDLE, lpWatchInfo: PPSAPI_WS_WATCH_INFORMATION, cb: DWORD, ) -> BOOL73 pub fn K32GetWsChanges( 74 hProcess: HANDLE, 75 lpWatchInfo: PPSAPI_WS_WATCH_INFORMATION, 76 cb: DWORD, 77 ) -> BOOL; K32GetWsChangesEx( hProcess: HANDLE, lpWatchInfoEx: PPSAPI_WS_WATCH_INFORMATION_EX, cb: PDWORD, ) -> BOOL78 pub fn K32GetWsChangesEx( 79 hProcess: HANDLE, 80 lpWatchInfoEx: PPSAPI_WS_WATCH_INFORMATION_EX, 81 cb: PDWORD, 82 ) -> BOOL; K32GetMappedFileNameW( hProcess: HANDLE, lpv: LPVOID, lpFilename: LPWSTR, nSize: DWORD, ) -> DWORD83 pub fn K32GetMappedFileNameW( 84 hProcess: HANDLE, 85 lpv: LPVOID, 86 lpFilename: LPWSTR, 87 nSize: DWORD, 88 ) -> DWORD; K32GetMappedFileNameA( hProcess: HANDLE, lpv: LPVOID, lpFilename: LPSTR, nSize: DWORD, ) -> DWORD89 pub fn K32GetMappedFileNameA( 90 hProcess: HANDLE, 91 lpv: LPVOID, 92 lpFilename: LPSTR, 93 nSize: DWORD, 94 ) -> DWORD; K32EnumDeviceDrivers( lpImageBase: *mut LPVOID, cb: DWORD, lpcbNeeded: LPDWORD, ) -> BOOL95 pub fn K32EnumDeviceDrivers( 96 lpImageBase: *mut LPVOID, 97 cb: DWORD, 98 lpcbNeeded: LPDWORD, 99 ) -> BOOL; K32GetDeviceDriverBaseNameA( ImageBase: LPVOID, lpFilename: LPSTR, nSize: DWORD, ) -> DWORD100 pub fn K32GetDeviceDriverBaseNameA( 101 ImageBase: LPVOID, 102 lpFilename: LPSTR, 103 nSize: DWORD, 104 ) -> DWORD; K32GetDeviceDriverBaseNameW( ImageBase: LPVOID, lpFilename: LPWSTR, nSize: DWORD, ) -> DWORD105 pub fn K32GetDeviceDriverBaseNameW( 106 ImageBase: LPVOID, 107 lpFilename: LPWSTR, 108 nSize: DWORD, 109 ) -> DWORD; K32GetDeviceDriverFileNameA( ImageBase: LPVOID, lpFilename: LPSTR, nSize: DWORD, ) -> DWORD110 pub fn K32GetDeviceDriverFileNameA( 111 ImageBase: LPVOID, 112 lpFilename: LPSTR, 113 nSize: DWORD, 114 ) -> DWORD; K32GetDeviceDriverFileNameW( ImageBase: LPVOID, lpFilename: LPWSTR, nSize: DWORD, ) -> DWORD115 pub fn K32GetDeviceDriverFileNameW( 116 ImageBase: LPVOID, 117 lpFilename: LPWSTR, 118 nSize: DWORD, 119 ) -> DWORD; K32GetPerformanceInfo( pPerformanceInformation: PPERFORMANCE_INFORMATION, cb: DWORD, ) -> BOOL120 pub fn K32GetPerformanceInfo( 121 pPerformanceInformation: PPERFORMANCE_INFORMATION, 122 cb: DWORD, 123 ) -> BOOL; K32EnumPageFilesW( pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKW, pContext: LPVOID, ) -> BOOL124 pub fn K32EnumPageFilesW( 125 pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKW, 126 pContext: LPVOID, 127 ) -> BOOL; K32EnumPageFilesA( pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKA, pContext: LPVOID, ) -> BOOL128 pub fn K32EnumPageFilesA( 129 pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKA, 130 pContext: LPVOID, 131 ) -> BOOL; K32GetProcessImageFileNameA( hProcess: HANDLE, lpImageFileName: LPSTR, nSize: DWORD, ) -> DWORD132 pub fn K32GetProcessImageFileNameA( 133 hProcess: HANDLE, 134 lpImageFileName: LPSTR, 135 nSize: DWORD, 136 ) -> DWORD; K32GetProcessImageFileNameW( hProcess: HANDLE, lpImageFileName: LPWSTR, nSize: DWORD, ) -> DWORD137 pub fn K32GetProcessImageFileNameW( 138 hProcess: HANDLE, 139 lpImageFileName: LPWSTR, 140 nSize: DWORD, 141 ) -> DWORD; EnumProcesses( lpidProcess: *mut DWORD, cb: DWORD, lpcbNeeded: LPDWORD, ) -> BOOL142 pub fn EnumProcesses( 143 lpidProcess: *mut DWORD, 144 cb: DWORD, 145 lpcbNeeded: LPDWORD, 146 ) -> BOOL; K32GetProcessMemoryInfo( Process: HANDLE, ppsmemCounters: PPROCESS_MEMORY_COUNTERS, cb: DWORD, ) -> BOOL147 pub fn K32GetProcessMemoryInfo( 148 Process: HANDLE, 149 ppsmemCounters: PPROCESS_MEMORY_COUNTERS, 150 cb: DWORD, 151 ) -> BOOL; K32GetModuleInformation( hProcess: HANDLE, hModule: HMODULE, lpmodinfo: LPMODULEINFO, cb: DWORD, ) -> BOOL152 pub fn K32GetModuleInformation( 153 hProcess: HANDLE, 154 hModule: HMODULE, 155 lpmodinfo: LPMODULEINFO, 156 cb: DWORD, 157 ) -> BOOL; 158 } 159 pub type LPMODULEINFO = *mut MODULEINFO; 160 pub type PPSAPI_WORKING_SET_INFORMATION = *mut PSAPI_WORKING_SET_INFORMATION; 161 pub type PPSAPI_WORKING_SET_EX_INFORMATION = *mut PSAPI_WORKING_SET_EX_INFORMATION; 162 pub type PPSAPI_WS_WATCH_INFORMATION = *mut PSAPI_WS_WATCH_INFORMATION; 163 pub type PPSAPI_WS_WATCH_INFORMATION_EX = *mut PSAPI_WS_WATCH_INFORMATION_EX; 164 pub type PENUM_PAGE_FILE_INFORMATION = *mut ENUM_PAGE_FILE_INFORMATION; 165 pub type PPERFORMANCE_INFORMATION = *mut PERFORMANCE_INFORMATION; 166 pub type PPROCESS_MEMORY_COUNTERS = *mut PROCESS_MEMORY_COUNTERS; 167 pub type PPROCESS_MEMORY_COUNTERS_EX = *mut PROCESS_MEMORY_COUNTERS_EX; 168 FN!{stdcall PENUM_PAGE_FILE_CALLBACKA( 169 pContext: LPVOID, 170 pPageFileInfo: PENUM_PAGE_FILE_INFORMATION, 171 lpFilename: LPCSTR, 172 ) -> BOOL} 173 FN!{stdcall PENUM_PAGE_FILE_CALLBACKW( 174 pContext: LPVOID, 175 pPageFileInfo: PENUM_PAGE_FILE_INFORMATION, 176 lpFilename: LPCWSTR, 177 ) -> BOOL} 178 STRUCT!{struct MODULEINFO { 179 lpBaseOfDll: LPVOID, 180 SizeOfImage: DWORD, 181 EntryPoint: LPVOID, 182 }} 183 STRUCT!{struct ENUM_PAGE_FILE_INFORMATION { 184 cb: DWORD, 185 Reserved: DWORD, 186 TotalSize: SIZE_T, 187 TotalInUse: SIZE_T, 188 PeakUsage: SIZE_T, 189 }} 190 STRUCT!{struct PERFORMANCE_INFORMATION { 191 cb: DWORD, 192 CommitTotal: SIZE_T, 193 CommitLimit: SIZE_T, 194 CommitPeak: SIZE_T, 195 PhysicalTotal: SIZE_T, 196 PhysicalAvailable: SIZE_T, 197 SystemCache: SIZE_T, 198 KernelTotal: SIZE_T, 199 KernelPaged: SIZE_T, 200 KernelNonpaged: SIZE_T, 201 PageSize: SIZE_T, 202 HandleCount: DWORD, 203 ProcessCount: DWORD, 204 ThreadCount: DWORD, 205 }} 206 STRUCT!{struct PROCESS_MEMORY_COUNTERS { 207 cb: DWORD, 208 PageFaultCount: DWORD, 209 PeakWorkingSetSize: SIZE_T, 210 WorkingSetSize: SIZE_T, 211 QuotaPeakPagedPoolUsage: SIZE_T, 212 QuotaPagedPoolUsage: SIZE_T, 213 QuotaPeakNonPagedPoolUsage: SIZE_T, 214 QuotaNonPagedPoolUsage: SIZE_T, 215 PagefileUsage: SIZE_T, 216 PeakPagefileUsage: SIZE_T, 217 }} 218 STRUCT!{struct PROCESS_MEMORY_COUNTERS_EX { 219 cb: DWORD, 220 PageFaultCount: DWORD, 221 PeakWorkingSetSize: SIZE_T, 222 WorkingSetSize: SIZE_T, 223 QuotaPeakPagedPoolUsage: SIZE_T, 224 QuotaPagedPoolUsage: SIZE_T, 225 QuotaPeakNonPagedPoolUsage: SIZE_T, 226 QuotaNonPagedPoolUsage: SIZE_T, 227 PagefileUsage: SIZE_T, 228 PeakPagefileUsage: SIZE_T, 229 PrivateUsage: SIZE_T, 230 }} 231 STRUCT!{struct PSAPI_WORKING_SET_BLOCK { 232 Flags: ULONG_PTR, 233 }} 234 BITFIELD!{PSAPI_WORKING_SET_BLOCK Flags: ULONG_PTR [ 235 Protection set_Protection[0..5], 236 ShareCount set_ShareCount[5..8], 237 Shared set_Shared[8..9], 238 Reserved set_Reserved[9..12], 239 VirtualPage set_VirtualPage[12..32], 240 ]} 241 pub type PPSAPI_WORKING_SET_BLOCK = *mut PSAPI_WORKING_SET_BLOCK; 242 STRUCT!{struct PSAPI_WORKING_SET_EX_BLOCK { 243 Flags: ULONG_PTR, 244 }} 245 #[cfg(not(target_arch="x86_64"))] 246 BITFIELD!{PSAPI_WORKING_SET_EX_BLOCK Flags: ULONG_PTR [ 247 Valid set_Valid[0..1], 248 ShareCount set_ShareCount[1..4], 249 Win32Protection set_Win32Protection[4..15], 250 Shared set_Shared[15..16], 251 Node set_Node[16..22], 252 Locked set_Locked[22..23], 253 LargePage set_LargePage[23..24], 254 Reserved set_Reserved[24..31], 255 Bad set_Bad[31..32], 256 ]} 257 #[cfg(target_arch="x86_64")] 258 BITFIELD!{PSAPI_WORKING_SET_EX_BLOCK Flags: ULONG_PTR [ 259 Valid set_Valid[0..1], 260 ShareCount set_ShareCount[1..4], 261 Win32Protection set_Win32Protection[4..15], 262 Shared set_Shared[15..16], 263 Node set_Node[16..22], 264 Locked set_Locked[22..23], 265 LargePage set_LargePage[23..24], 266 Reserved set_Reserved[24..31], 267 Bad set_Bad[31..32], 268 ReservedUlong set_ReservedULong[32..64], 269 ]} 270 pub type PPSAPI_WORKING_SET_EX_BLOCK = *mut PSAPI_WORKING_SET_EX_BLOCK; 271 STRUCT!{struct PSAPI_WORKING_SET_INFORMATION { 272 NumberOfEntries: ULONG_PTR, 273 WorkingSetInfo: [PSAPI_WORKING_SET_BLOCK; 1], 274 }} 275 STRUCT!{struct PSAPI_WORKING_SET_EX_INFORMATION { 276 VirtualAddress: PVOID, 277 VirtualAttributes: PSAPI_WORKING_SET_EX_BLOCK, 278 }} 279 STRUCT!{struct PSAPI_WS_WATCH_INFORMATION { 280 FaultingPc: LPVOID, 281 FaultingVa: LPVOID, 282 }} 283 STRUCT!{struct PSAPI_WS_WATCH_INFORMATION_EX { 284 BasicInfo: PSAPI_WS_WATCH_INFORMATION, 285 FaultingThreadId: ULONG_PTR, 286 Flags: ULONG_PTR, 287 }} 288 extern "system" { EmptyWorkingSet( hProcess: HANDLE, ) -> BOOL289 pub fn EmptyWorkingSet( 290 hProcess: HANDLE, 291 ) -> BOOL; EnumDeviceDrivers( lpImageBase: *mut LPVOID, cb: DWORD, lpcbNeeded: LPDWORD, ) -> BOOL292 pub fn EnumDeviceDrivers( 293 lpImageBase: *mut LPVOID, 294 cb: DWORD, 295 lpcbNeeded: LPDWORD, 296 ) -> BOOL; EnumPageFilesA( pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKA, pContext: LPVOID, ) -> BOOL297 pub fn EnumPageFilesA( 298 pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKA, 299 pContext: LPVOID, 300 ) -> BOOL; EnumPageFilesW( pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKW, pContext: LPVOID, ) -> BOOL301 pub fn EnumPageFilesW( 302 pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKW, 303 pContext: LPVOID, 304 ) -> BOOL; EnumProcessModules( hProcess: HANDLE, lphModule: *mut HMODULE, cb: DWORD, lpcbNeeded: LPDWORD, ) -> BOOL305 pub fn EnumProcessModules( 306 hProcess: HANDLE, 307 lphModule: *mut HMODULE, 308 cb: DWORD, 309 lpcbNeeded: LPDWORD, 310 ) -> BOOL; EnumProcessModulesEx( hProcess: HANDLE, lphModule: *mut HMODULE, cb: DWORD, lpcbNeeded: LPDWORD, dwFilterFlag: DWORD, ) -> BOOL311 pub fn EnumProcessModulesEx( 312 hProcess: HANDLE, 313 lphModule: *mut HMODULE, 314 cb: DWORD, 315 lpcbNeeded: LPDWORD, 316 dwFilterFlag: DWORD, 317 ) -> BOOL; GetDeviceDriverBaseNameA( ImageBase: LPVOID, lpFilename: LPSTR, nSize: DWORD, ) -> DWORD318 pub fn GetDeviceDriverBaseNameA( 319 ImageBase: LPVOID, 320 lpFilename: LPSTR, 321 nSize: DWORD, 322 ) -> DWORD; GetDeviceDriverBaseNameW( ImageBase: LPVOID, lpFilename: LPWSTR, nSize: DWORD, ) -> DWORD323 pub fn GetDeviceDriverBaseNameW( 324 ImageBase: LPVOID, 325 lpFilename: LPWSTR, 326 nSize: DWORD, 327 ) -> DWORD; GetDeviceDriverFileNameA( ImageBase: LPVOID, lpFilename: LPSTR, nSize: DWORD, ) -> DWORD328 pub fn GetDeviceDriverFileNameA( 329 ImageBase: LPVOID, 330 lpFilename: LPSTR, 331 nSize: DWORD, 332 ) -> DWORD; GetDeviceDriverFileNameW( ImageBase: LPVOID, lpFilename: LPWSTR, nSize: DWORD, ) -> DWORD333 pub fn GetDeviceDriverFileNameW( 334 ImageBase: LPVOID, 335 lpFilename: LPWSTR, 336 nSize: DWORD, 337 ) -> DWORD; GetMappedFileNameA( hProcess: HANDLE, lpv: LPVOID, lpFilename: LPSTR, nSize: DWORD, ) -> DWORD338 pub fn GetMappedFileNameA( 339 hProcess: HANDLE, 340 lpv: LPVOID, 341 lpFilename: LPSTR, 342 nSize: DWORD, 343 ) -> DWORD; GetMappedFileNameW( hProcess: HANDLE, lpv: LPVOID, lpFilename: LPWSTR, nSize: DWORD, ) -> DWORD344 pub fn GetMappedFileNameW( 345 hProcess: HANDLE, 346 lpv: LPVOID, 347 lpFilename: LPWSTR, 348 nSize: DWORD, 349 ) -> DWORD; GetModuleBaseNameA( hProcess: HANDLE, hModule: HMODULE, lpBaseName: LPSTR, nSize: DWORD, ) -> DWORD350 pub fn GetModuleBaseNameA( 351 hProcess: HANDLE, 352 hModule: HMODULE, 353 lpBaseName: LPSTR, 354 nSize: DWORD, 355 ) -> DWORD; GetModuleBaseNameW( hProcess: HANDLE, hModule: HMODULE, lpBaseName: LPWSTR, nSize: DWORD, ) -> DWORD356 pub fn GetModuleBaseNameW( 357 hProcess: HANDLE, 358 hModule: HMODULE, 359 lpBaseName: LPWSTR, 360 nSize: DWORD, 361 ) -> DWORD; GetModuleFileNameExA( hProcess: HANDLE, hModule: HMODULE, lpFilename: LPSTR, nSize: DWORD, ) -> DWORD362 pub fn GetModuleFileNameExA( 363 hProcess: HANDLE, 364 hModule: HMODULE, 365 lpFilename: LPSTR, 366 nSize: DWORD, 367 ) -> DWORD; GetModuleFileNameExW( hProcess: HANDLE, hModule: HMODULE, lpFilename: LPWSTR, nSize: DWORD, ) -> DWORD368 pub fn GetModuleFileNameExW( 369 hProcess: HANDLE, 370 hModule: HMODULE, 371 lpFilename: LPWSTR, 372 nSize: DWORD, 373 ) -> DWORD; GetModuleInformation( hProcess: HANDLE, hModule: HMODULE, lpmodinfo: LPMODULEINFO, cb: DWORD, ) -> BOOL374 pub fn GetModuleInformation( 375 hProcess: HANDLE, 376 hModule: HMODULE, 377 lpmodinfo: LPMODULEINFO, 378 cb: DWORD, 379 ) -> BOOL; GetPerformanceInfo( pPerformanceInformation: PPERFORMANCE_INFORMATION, cb: DWORD, ) -> BOOL380 pub fn GetPerformanceInfo( 381 pPerformanceInformation: PPERFORMANCE_INFORMATION, 382 cb: DWORD, 383 ) -> BOOL; GetProcessImageFileNameA( hProcess: HANDLE, lpImageFileName: LPSTR, nSize: DWORD, ) -> DWORD384 pub fn GetProcessImageFileNameA( 385 hProcess: HANDLE, 386 lpImageFileName: LPSTR, 387 nSize: DWORD, 388 ) -> DWORD; GetProcessImageFileNameW( hProcess: HANDLE, lpImageFileName: LPWSTR, nSize: DWORD, ) -> DWORD389 pub fn GetProcessImageFileNameW( 390 hProcess: HANDLE, 391 lpImageFileName: LPWSTR, 392 nSize: DWORD, 393 ) -> DWORD; GetProcessMemoryInfo( hProcess: HANDLE, ppsmemCounters: PPROCESS_MEMORY_COUNTERS, cb: DWORD, ) -> BOOL394 pub fn GetProcessMemoryInfo( 395 hProcess: HANDLE, 396 ppsmemCounters: PPROCESS_MEMORY_COUNTERS, 397 cb: DWORD, 398 ) -> BOOL; GetWsChanges( hProcess: HANDLE, lpWatchInfo: PPSAPI_WS_WATCH_INFORMATION, cb: DWORD, ) -> BOOL399 pub fn GetWsChanges( 400 hProcess: HANDLE, 401 lpWatchInfo: PPSAPI_WS_WATCH_INFORMATION, 402 cb: DWORD, 403 ) -> BOOL; GetWsChangesEx( hProcess: HANDLE, lpWatchInfoEx: PPSAPI_WS_WATCH_INFORMATION_EX, cb: PDWORD, ) -> BOOL404 pub fn GetWsChangesEx( 405 hProcess: HANDLE, 406 lpWatchInfoEx: PPSAPI_WS_WATCH_INFORMATION_EX, 407 cb: PDWORD, 408 ) -> BOOL; InitializeProcessForWsWatch( hProcess: HANDLE, ) -> BOOL409 pub fn InitializeProcessForWsWatch( 410 hProcess: HANDLE, 411 ) -> BOOL; QueryWorkingSet( hProcess: HANDLE, pv: PVOID, cb: DWORD, ) -> BOOL412 pub fn QueryWorkingSet( 413 hProcess: HANDLE, 414 pv: PVOID, 415 cb: DWORD, 416 ) -> BOOL; QueryWorkingSetEx( hProcess: HANDLE, pv: PVOID, cb: DWORD, ) -> BOOL417 pub fn QueryWorkingSetEx( 418 hProcess: HANDLE, 419 pv: PVOID, 420 cb: DWORD, 421 ) -> BOOL; 422 } 423