1 | /*
|
---|
2 | * Declarations for PSAPI
|
---|
3 | *
|
---|
4 | * Copyright (C) 1998 Patrik Stridvall
|
---|
5 | *
|
---|
6 | * This library is free software; you can redistribute it and/or
|
---|
7 | * modify it under the terms of the GNU Lesser General Public
|
---|
8 | * License as published by the Free Software Foundation; either
|
---|
9 | * version 2.1 of the License, or (at your option) any later version.
|
---|
10 | *
|
---|
11 | * This library is distributed in the hope that it will be useful,
|
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
14 | * Lesser General Public License for more details.
|
---|
15 | *
|
---|
16 | * You should have received a copy of the GNU Lesser General Public
|
---|
17 | * License along with this library; if not, write to the Free Software
|
---|
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
19 | */
|
---|
20 |
|
---|
21 | /*
|
---|
22 | * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
23 | * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
|
---|
24 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
25 | * a choice of LGPL license versions is made available with the language indicating
|
---|
26 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
27 | * of the LGPL is applied is otherwise unspecified.
|
---|
28 | */
|
---|
29 |
|
---|
30 | #ifndef __WINE_PSAPI_H
|
---|
31 | #define __WINE_PSAPI_H
|
---|
32 |
|
---|
33 | typedef struct _MODULEINFO {
|
---|
34 | LPVOID lpBaseOfDll;
|
---|
35 | DWORD SizeOfImage;
|
---|
36 | LPVOID EntryPoint;
|
---|
37 | } MODULEINFO, *LPMODULEINFO;
|
---|
38 |
|
---|
39 | typedef struct _PROCESS_MEMORY_COUNTERS {
|
---|
40 | DWORD cb;
|
---|
41 | DWORD PageFaultCount;
|
---|
42 | SIZE_T PeakWorkingSetSize;
|
---|
43 | SIZE_T WorkingSetSize;
|
---|
44 | SIZE_T QuotaPeakPagedPoolUsage;
|
---|
45 | SIZE_T QuotaPagedPoolUsage;
|
---|
46 | SIZE_T QuotaPeakNonPagedPoolUsage;
|
---|
47 | SIZE_T QuotaNonPagedPoolUsage;
|
---|
48 | SIZE_T PagefileUsage;
|
---|
49 | SIZE_T PeakPagefileUsage;
|
---|
50 | } PROCESS_MEMORY_COUNTERS;
|
---|
51 | typedef PROCESS_MEMORY_COUNTERS *PPROCESS_MEMORY_COUNTERS;
|
---|
52 |
|
---|
53 | typedef struct _PSAPI_WS_WATCH_INFORMATION {
|
---|
54 | LPVOID FaultingPc;
|
---|
55 | LPVOID FaultingVa;
|
---|
56 | } PSAPI_WS_WATCH_INFORMATION, *PPSAPI_WS_WATCH_INFORMATION;
|
---|
57 |
|
---|
58 | typedef struct _PERFORMANCE_INFORMATION {
|
---|
59 | DWORD cb;
|
---|
60 | SIZE_T CommitTotal;
|
---|
61 | SIZE_T CommitLimit;
|
---|
62 | SIZE_T CommitPeak;
|
---|
63 | SIZE_T PhysicalTotal;
|
---|
64 | SIZE_T PhysicalAvailable;
|
---|
65 | SIZE_T SystemCache;
|
---|
66 | SIZE_T KernelTotal;
|
---|
67 | SIZE_T KernelPaged;
|
---|
68 | SIZE_T KernelNonpaged;
|
---|
69 | SIZE_T PageSize;
|
---|
70 | DWORD HandleCount;
|
---|
71 | DWORD ProcessCount;
|
---|
72 | DWORD ThreadCount;
|
---|
73 | } PERFORMANCE_INFORMATION, *PPERFORMANCE_INFORMATION;
|
---|
74 |
|
---|
75 | typedef struct _ENUM_PAGE_FILE_INFORMATION {
|
---|
76 | DWORD cb;
|
---|
77 | DWORD Reserved;
|
---|
78 | SIZE_T TotalSize;
|
---|
79 | SIZE_T TotalInUse;
|
---|
80 | SIZE_T PeakUsage;
|
---|
81 | } ENUM_PAGE_FILE_INFORMATION, *PENUM_PAGE_FILE_INFORMATION;
|
---|
82 |
|
---|
83 | typedef BOOL (*PENUM_PAGE_FILE_CALLBACKA) (LPVOID, PENUM_PAGE_FILE_INFORMATION, LPCSTR);
|
---|
84 | typedef BOOL (*PENUM_PAGE_FILE_CALLBACKW) (LPVOID, PENUM_PAGE_FILE_INFORMATION, LPCWSTR);
|
---|
85 | #define PENUM_PAGE_FILE_CALLBACK WINELIB_NAME_AW(PENUM_PAGE_FILE_CALLBACK)
|
---|
86 |
|
---|
87 | #ifdef __cplusplus
|
---|
88 | extern "C" {
|
---|
89 | #endif
|
---|
90 |
|
---|
91 | BOOL WINAPI EnumProcesses(DWORD*, DWORD, DWORD*);
|
---|
92 | BOOL WINAPI EnumProcessModules(HANDLE, HMODULE*, DWORD, LPDWORD);
|
---|
93 | DWORD WINAPI GetModuleBaseNameA(HANDLE, HMODULE, LPSTR, DWORD);
|
---|
94 | DWORD WINAPI GetModuleBaseNameW(HANDLE, HMODULE, LPWSTR, DWORD);
|
---|
95 | #define GetModuleBaseName WINELIB_NAME_AW(GetModuleBaseName)
|
---|
96 | DWORD WINAPI GetModuleFileNameExA(HANDLE, HMODULE, LPSTR, DWORD);
|
---|
97 | DWORD WINAPI GetModuleFileNameExW(HANDLE, HMODULE, LPWSTR, DWORD);
|
---|
98 | #define GetModuleFileNameEx WINELIB_NAME_AW(GetModuleFileNameEx)
|
---|
99 | BOOL WINAPI GetModuleInformation(HANDLE, HMODULE, LPMODULEINFO, DWORD);
|
---|
100 | BOOL WINAPI EmptyWorkingSet(HANDLE);
|
---|
101 | BOOL WINAPI QueryWorkingSet(HANDLE, PVOID, DWORD);
|
---|
102 | BOOL WINAPI QueryWorkingSetEx(HANDLE, PVOID, DWORD);
|
---|
103 | BOOL WINAPI InitializeProcessForWsWatch(HANDLE);
|
---|
104 | BOOL WINAPI GetWsChanges(HANDLE, PPSAPI_WS_WATCH_INFORMATION, DWORD);
|
---|
105 | DWORD WINAPI GetMappedFileNameW(HANDLE, LPVOID, LPWSTR, DWORD);
|
---|
106 | DWORD WINAPI GetMappedFileNameA(HANDLE, LPVOID, LPSTR, DWORD);
|
---|
107 | #define GetMappedFileName WINELIB_NAME_AW(GetMappedFileName)
|
---|
108 | BOOL WINAPI EnumDeviceDrivers(LPVOID*, DWORD, LPDWORD);
|
---|
109 | DWORD WINAPI GetDeviceDriverBaseNameA(LPVOID, LPSTR, DWORD);
|
---|
110 | DWORD WINAPI GetDeviceDriverBaseNameW(LPVOID, LPWSTR, DWORD);
|
---|
111 | #define GetDeviceDriverBaseName WINELIB_NAME_AW(GetDeviceDriverBaseName)
|
---|
112 | DWORD WINAPI GetDeviceDriverFileNameA(LPVOID, LPSTR, DWORD);
|
---|
113 | DWORD WINAPI GetDeviceDriverFileNameW(LPVOID, LPWSTR, DWORD);
|
---|
114 | #define GetDeviceDriverFileName WINELIB_NAME_AW(GetDeviceDriverFileName)
|
---|
115 | BOOL WINAPI GetProcessMemoryInfo(HANDLE, PPROCESS_MEMORY_COUNTERS, DWORD);
|
---|
116 | BOOL WINAPI GetPerformanceInfo(PPERFORMANCE_INFORMATION, DWORD);
|
---|
117 | BOOL WINAPI EnumPageFilesA(PENUM_PAGE_FILE_CALLBACKA, LPVOID);
|
---|
118 | BOOL WINAPI EnumPageFilesW(PENUM_PAGE_FILE_CALLBACKW, LPVOID);
|
---|
119 | #define EnumPageFiles WINELIB_NAME_AW(EnumPageFiles)
|
---|
120 | DWORD WINAPI GetProcessImageFileNameA(HANDLE, LPSTR, DWORD);
|
---|
121 | DWORD WINAPI GetProcessImageFileNameW(HANDLE, LPWSTR, DWORD);
|
---|
122 | #define GetProcessImageFileName WINELIB_NAME_AW(GetProcessImageFileName)
|
---|
123 |
|
---|
124 | #ifdef __cplusplus
|
---|
125 | }
|
---|
126 | #endif
|
---|
127 |
|
---|
128 | #endif /* __WINE_PSAPI_H */
|
---|