source: vendor/w32api/3.6/include/psapi.h

Last change on this file was 2720, checked in by bird, 19 years ago

w32api v3.6

File size: 3.0 KB
Line 
1/*
2 psapi.h - Include file for PSAPI.DLL APIs
3
4 Written by Mumit Khan <khan@nanotech.wisc.edu>
5
6 This file is part of a free library for the Win32 API.
7
8 NOTE: This strictly does not belong in the Win32 API since it's
9 really part of Platform SDK. However,GDB needs it and we might
10 as well provide it here.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
16*/
17#ifndef _PSAPI_H
18#define _PSAPI_H
19#if __GNUC__ >=3
20#pragma GCC system_header
21#endif
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#ifndef RC_INVOKED
28
29typedef struct _MODULEINFO {
30 LPVOID lpBaseOfDll;
31 DWORD SizeOfImage;
32 LPVOID EntryPoint;
33} MODULEINFO,*LPMODULEINFO;
34
35typedef struct _PSAPI_WS_WATCH_INFORMATION {
36 LPVOID FaultingPc;
37 LPVOID FaultingVa;
38} PSAPI_WS_WATCH_INFORMATION,*PPSAPI_WS_WATCH_INFORMATION;
39
40typedef struct _PROCESS_MEMORY_COUNTERS {
41 DWORD cb;
42 DWORD PageFaultCount;
43 DWORD PeakWorkingSetSize;
44 DWORD WorkingSetSize;
45 DWORD QuotaPeakPagedPoolUsage;
46 DWORD QuotaPagedPoolUsage;
47 DWORD QuotaPeakNonPagedPoolUsage;
48 DWORD QuotaNonPagedPoolUsage;
49 DWORD PagefileUsage;
50 DWORD PeakPagefileUsage;
51} PROCESS_MEMORY_COUNTERS,*PPROCESS_MEMORY_COUNTERS;
52
53/* Grouped by application,not in alphabetical order. */
54BOOL WINAPI EnumProcesses(DWORD *,DWORD,DWORD *);
55BOOL WINAPI EnumProcessModules(HANDLE,HMODULE *,DWORD,LPDWORD);
56DWORD WINAPI GetModuleBaseNameA(HANDLE,HMODULE,LPSTR,DWORD);
57DWORD WINAPI GetModuleBaseNameW(HANDLE,HMODULE,LPWSTR,DWORD);
58DWORD WINAPI GetModuleFileNameExA(HANDLE,HMODULE,LPSTR,DWORD);
59DWORD WINAPI GetModuleFileNameExW(HANDLE,HMODULE,LPWSTR,DWORD);
60BOOL WINAPI GetModuleInformation(HANDLE,HMODULE,LPMODULEINFO,DWORD);
61BOOL WINAPI EmptyWorkingSet(HANDLE);
62BOOL WINAPI QueryWorkingSet(HANDLE,PVOID,DWORD);
63BOOL WINAPI InitializeProcessForWsWatch(HANDLE);
64BOOL WINAPI GetWsChanges(HANDLE,PPSAPI_WS_WATCH_INFORMATION,DWORD);
65DWORD WINAPI GetMappedFileNameW(HANDLE,LPVOID,LPWSTR,DWORD);
66DWORD WINAPI GetMappedFileNameA(HANDLE,LPVOID,LPSTR,DWORD);
67BOOL WINAPI EnumDeviceDrivers(LPVOID *,DWORD,LPDWORD);
68DWORD WINAPI GetDeviceDriverBaseNameA(LPVOID,LPSTR,DWORD);
69DWORD WINAPI GetDeviceDriverBaseNameW(LPVOID,LPWSTR,DWORD);
70DWORD WINAPI GetDeviceDriverFileNameA(LPVOID,LPSTR,DWORD);
71DWORD WINAPI GetDeviceDriverFileNameW(LPVOID,LPWSTR,DWORD);
72BOOL WINAPI GetProcessMemoryInfo(HANDLE,PPROCESS_MEMORY_COUNTERS,DWORD);
73
74#endif /* not RC_INVOKED */
75
76#ifdef UNICODE
77#define GetModuleBaseName GetModuleBaseNameW
78#define GetModuleFileNameEx GetModuleFileNameExW
79#define GetMappedFilenameEx GetMappedFilenameExW
80#define GetDeviceDriverBaseName GetDeviceDriverBaseNameW
81#define GetDeviceDriverFileName GetDeviceDriverFileNameW
82#else
83#define GetModuleBaseName GetModuleBaseNameA
84#define GetModuleFileNameEx GetModuleFileNameExA
85#define GetMappedFilenameEx GetMappedFilenameExA
86#define GetDeviceDriverBaseName GetDeviceDriverBaseNameA
87#define GetDeviceDriverFileName GetDeviceDriverFileNameA
88#endif
89
90#ifdef __cplusplus
91}
92#endif
93
94#endif /* _PSAPI_H */
95
Note: See TracBrowser for help on using the repository browser.