Install curl-7.28.1.tar.bz2
[msysgit.git] / mingw / include / psapi.h
blob398f64a6ecf2134d14c757262f62478062402775
1 /*
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.
17 #ifndef _PSAPI_H
18 #define _PSAPI_H
19 #if __GNUC__ >=3
20 #pragma GCC system_header
21 #endif
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
27 #ifndef RC_INVOKED
29 typedef struct _MODULEINFO {
30 LPVOID lpBaseOfDll;
31 DWORD SizeOfImage;
32 LPVOID EntryPoint;
33 } MODULEINFO,*LPMODULEINFO;
35 typedef struct _PSAPI_WS_WATCH_INFORMATION {
36 LPVOID FaultingPc;
37 LPVOID FaultingVa;
38 } PSAPI_WS_WATCH_INFORMATION,*PPSAPI_WS_WATCH_INFORMATION;
40 typedef 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;
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);
76 #endif
78 #endif /* not RC_INVOKED */
80 #ifdef UNICODE
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
88 #endif
89 #else
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
97 #endif
98 #endif
100 #ifdef __cplusplus
102 #endif
104 #endif /* _PSAPI_H */