2 psapi.h - Include file for PSAPI.DLL APIs
4 Written by Mumit Khan <khan@nanotech.wisc.edu>
6 This file is part of a free library for the Win32 API.
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.
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.
20 #pragma GCC system_header
29 typedef struct _MODULEINFO
{
33 } MODULEINFO
,*LPMODULEINFO
;
35 typedef struct _PSAPI_WS_WATCH_INFORMATION
{
38 } PSAPI_WS_WATCH_INFORMATION
,*PPSAPI_WS_WATCH_INFORMATION
;
40 typedef struct _PROCESS_MEMORY_COUNTERS
{
43 DWORD PeakWorkingSetSize
;
45 DWORD QuotaPeakPagedPoolUsage
;
46 DWORD QuotaPagedPoolUsage
;
47 DWORD QuotaPeakNonPagedPoolUsage
;
48 DWORD QuotaNonPagedPoolUsage
;
50 DWORD PeakPagefileUsage
;
51 } PROCESS_MEMORY_COUNTERS
,*PPROCESS_MEMORY_COUNTERS
;
53 /* Grouped by application,not in alphabetical order. */
54 BOOL WINAPI
EnumProcesses(DWORD
*,DWORD
,DWORD
*);
55 BOOL WINAPI
EnumProcessModules(HANDLE
,HMODULE
*,DWORD
,LPDWORD
);
56 DWORD WINAPI
GetModuleBaseNameA(HANDLE
,HMODULE
,LPSTR
,DWORD
);
57 DWORD WINAPI
GetModuleBaseNameW(HANDLE
,HMODULE
,LPWSTR
,DWORD
);
58 DWORD WINAPI
GetModuleFileNameExA(HANDLE
,HMODULE
,LPSTR
,DWORD
);
59 DWORD WINAPI
GetModuleFileNameExW(HANDLE
,HMODULE
,LPWSTR
,DWORD
);
60 BOOL WINAPI
GetModuleInformation(HANDLE
,HMODULE
,LPMODULEINFO
,DWORD
);
61 BOOL WINAPI
EmptyWorkingSet(HANDLE
);
62 BOOL WINAPI
QueryWorkingSet(HANDLE
,PVOID
,DWORD
);
63 BOOL WINAPI
InitializeProcessForWsWatch(HANDLE
);
64 BOOL WINAPI
GetWsChanges(HANDLE
,PPSAPI_WS_WATCH_INFORMATION
,DWORD
);
65 DWORD WINAPI
GetMappedFileNameW(HANDLE
,LPVOID
,LPWSTR
,DWORD
);
66 DWORD WINAPI
GetMappedFileNameA(HANDLE
,LPVOID
,LPSTR
,DWORD
);
67 BOOL WINAPI
EnumDeviceDrivers(LPVOID
*,DWORD
,LPDWORD
);
68 DWORD WINAPI
GetDeviceDriverBaseNameA(LPVOID
,LPSTR
,DWORD
);
69 DWORD WINAPI
GetDeviceDriverBaseNameW(LPVOID
,LPWSTR
,DWORD
);
70 DWORD WINAPI
GetDeviceDriverFileNameA(LPVOID
,LPSTR
,DWORD
);
71 DWORD WINAPI
GetDeviceDriverFileNameW(LPVOID
,LPWSTR
,DWORD
);
72 BOOL WINAPI
GetProcessMemoryInfo(HANDLE
,PPROCESS_MEMORY_COUNTERS
,DWORD
);
73 #if (_WIN32_WINNT >= 0x0501)
74 DWORD WINAPI
GetProcessImageFileNameA(HANDLE
,LPSTR
,DWORD
);
75 DWORD WINAPI
GetProcessImageFileNameW(HANDLE
,LPWSTR
,DWORD
);
78 #endif /* not RC_INVOKED */
81 #define GetModuleBaseName GetModuleBaseNameW
82 #define GetModuleFileNameEx GetModuleFileNameExW
83 #define GetMappedFileName GetMappedFileNameW
84 #define GetDeviceDriverBaseName GetDeviceDriverBaseNameW
85 #define GetDeviceDriverFileName GetDeviceDriverFileNameW
86 #if (_WIN32_WINNT >= 0x0501)
87 #define GetProcessImageFileName GetProcessImageFileNameW
90 #define GetModuleBaseName GetModuleBaseNameA
91 #define GetModuleFileNameEx GetModuleFileNameExA
92 #define GetMappedFileName GetMappedFileNameA
93 #define GetDeviceDriverBaseName GetDeviceDriverBaseNameA
94 #define GetDeviceDriverFileName GetDeviceDriverFileNameA
95 #if (_WIN32_WINNT >= 0x0501)
96 #define GetProcessImageFileName GetProcessImageFileNameA
104 #endif /* _PSAPI_H */