comparison fuhtark_test/include/winapi/psapi.h @ 1500:91c8c3b7cbf0

add: futhark tests for generating vulkan api
author sam <sam@basx.dev>
date Wed, 26 Nov 2025 21:36:48 +0700
parents
children
comparison
equal deleted inserted replaced
1499:1f58458b7ef7 1500:91c8c3b7cbf0
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER within this package.
5 */
6 #ifndef _PSAPI_H_
7 #define _PSAPI_H_
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 #ifdef UNICODE
14 #define GetModuleBaseName GetModuleBaseNameW
15 #define GetModuleFileNameEx GetModuleFileNameExW
16 #define GetMappedFileName GetMappedFileNameW
17 #define GetDeviceDriverBaseName GetDeviceDriverBaseNameW
18 #define GetDeviceDriverFileName GetDeviceDriverFileNameW
19 #define PENUM_PAGE_FILE_CALLBACK PENUM_PAGE_FILE_CALLBACKW
20 #define EnumPageFiles EnumPageFilesW
21 #define GetProcessImageFileName GetProcessImageFileNameW
22 #else
23 #define GetModuleBaseName GetModuleBaseNameA
24 #define GetModuleFileNameEx GetModuleFileNameExA
25 #define GetMappedFileName GetMappedFileNameA
26 #define GetDeviceDriverBaseName GetDeviceDriverBaseNameA
27 #define GetDeviceDriverFileName GetDeviceDriverFileNameA
28 #define PENUM_PAGE_FILE_CALLBACK PENUM_PAGE_FILE_CALLBACKA
29 #define EnumPageFiles EnumPageFilesA
30 #define GetProcessImageFileName GetProcessImageFileNameA
31 #endif
32
33 WINBOOL WINAPI EnumProcesses(DWORD *lpidProcess,DWORD cb,DWORD *cbNeeded);
34 WINBOOL WINAPI EnumProcessModules(HANDLE hProcess,HMODULE *lphModule,DWORD cb,LPDWORD lpcbNeeded);
35 DWORD WINAPI GetModuleBaseNameA(HANDLE hProcess,HMODULE hModule,LPSTR lpBaseName,DWORD nSize);
36 DWORD WINAPI GetModuleBaseNameW(HANDLE hProcess,HMODULE hModule,LPWSTR lpBaseName,DWORD nSize);
37 DWORD WINAPI GetModuleFileNameExA(HANDLE hProcess,HMODULE hModule,LPSTR lpFilename,DWORD nSize);
38 DWORD WINAPI GetModuleFileNameExW(HANDLE hProcess,HMODULE hModule,LPWSTR lpFilename,DWORD nSize);
39
40 typedef struct _MODULEINFO {
41 LPVOID lpBaseOfDll;
42 DWORD SizeOfImage;
43 LPVOID EntryPoint;
44 } MODULEINFO,*LPMODULEINFO;
45
46 WINBOOL WINAPI GetModuleInformation(HANDLE hProcess,HMODULE hModule,LPMODULEINFO lpmodinfo,DWORD cb);
47 WINBOOL WINAPI EmptyWorkingSet(HANDLE hProcess);
48 WINBOOL WINAPI QueryWorkingSet(HANDLE hProcess,PVOID pv,DWORD cb);
49 WINBOOL WINAPI QueryWorkingSetEx(HANDLE hProcess,PVOID pv,DWORD cb);
50 WINBOOL WINAPI InitializeProcessForWsWatch(HANDLE hProcess);
51
52 typedef struct _PSAPI_WS_WATCH_INFORMATION {
53 LPVOID FaultingPc;
54 LPVOID FaultingVa;
55 } PSAPI_WS_WATCH_INFORMATION,*PPSAPI_WS_WATCH_INFORMATION;
56
57 WINBOOL WINAPI GetWsChanges(HANDLE hProcess,PPSAPI_WS_WATCH_INFORMATION lpWatchInfo,DWORD cb);
58 DWORD WINAPI GetMappedFileNameW(HANDLE hProcess,LPVOID lpv,LPWSTR lpFilename,DWORD nSize);
59 DWORD WINAPI GetMappedFileNameA(HANDLE hProcess,LPVOID lpv,LPSTR lpFilename,DWORD nSize);
60 WINBOOL WINAPI EnumDeviceDrivers(LPVOID *lpImageBase,DWORD cb,LPDWORD lpcbNeeded);
61 DWORD WINAPI GetDeviceDriverBaseNameA(LPVOID ImageBase,LPSTR lpBaseName,DWORD nSize);
62 DWORD WINAPI GetDeviceDriverBaseNameW(LPVOID ImageBase,LPWSTR lpBaseName,DWORD nSize);
63 DWORD WINAPI GetDeviceDriverFileNameA(LPVOID ImageBase,LPSTR lpFilename,DWORD nSize);
64 DWORD WINAPI GetDeviceDriverFileNameW(LPVOID ImageBase,LPWSTR lpFilename,DWORD nSize);
65
66 typedef struct _PROCESS_MEMORY_COUNTERS {
67 DWORD cb;
68 DWORD PageFaultCount;
69 SIZE_T PeakWorkingSetSize;
70 SIZE_T WorkingSetSize;
71 SIZE_T QuotaPeakPagedPoolUsage;
72 SIZE_T QuotaPagedPoolUsage;
73 SIZE_T QuotaPeakNonPagedPoolUsage;
74 SIZE_T QuotaNonPagedPoolUsage;
75 SIZE_T PagefileUsage;
76 SIZE_T PeakPagefileUsage;
77 } PROCESS_MEMORY_COUNTERS;
78 typedef PROCESS_MEMORY_COUNTERS *PPROCESS_MEMORY_COUNTERS;
79
80 typedef struct _PROCESS_MEMORY_COUNTERS_EX {
81 DWORD cb;
82 DWORD PageFaultCount;
83 SIZE_T PeakWorkingSetSize;
84 SIZE_T WorkingSetSize;
85 SIZE_T QuotaPeakPagedPoolUsage;
86 SIZE_T QuotaPagedPoolUsage;
87 SIZE_T QuotaPeakNonPagedPoolUsage;
88 SIZE_T QuotaNonPagedPoolUsage;
89 SIZE_T PagefileUsage;
90 SIZE_T PeakPagefileUsage;
91 SIZE_T PrivateUsage;
92 } PROCESS_MEMORY_COUNTERS_EX;
93 typedef PROCESS_MEMORY_COUNTERS_EX *PPROCESS_MEMORY_COUNTERS_EX;
94
95 WINBOOL WINAPI GetProcessMemoryInfo(HANDLE Process,PPROCESS_MEMORY_COUNTERS ppsmemCounters,DWORD cb);
96
97 typedef struct _PERFORMANCE_INFORMATION {
98 DWORD cb;
99 SIZE_T CommitTotal;
100 SIZE_T CommitLimit;
101 SIZE_T CommitPeak;
102 SIZE_T PhysicalTotal;
103 SIZE_T PhysicalAvailable;
104 SIZE_T SystemCache;
105 SIZE_T KernelTotal;
106 SIZE_T KernelPaged;
107 SIZE_T KernelNonpaged;
108 SIZE_T PageSize;
109 DWORD HandleCount;
110 DWORD ProcessCount;
111 DWORD ThreadCount;
112 } PERFORMANCE_INFORMATION,*PPERFORMANCE_INFORMATION,PERFORMACE_INFORMATION,*PPERFORMACE_INFORMATION;
113
114 WINBOOL WINAPI GetPerformanceInfo (PPERFORMACE_INFORMATION pPerformanceInformation,DWORD cb);
115
116 typedef struct _ENUM_PAGE_FILE_INFORMATION {
117 DWORD cb;
118 DWORD Reserved;
119 SIZE_T TotalSize;
120 SIZE_T TotalInUse;
121 SIZE_T PeakUsage;
122 } ENUM_PAGE_FILE_INFORMATION,*PENUM_PAGE_FILE_INFORMATION;
123
124 typedef WINBOOL (*PENUM_PAGE_FILE_CALLBACKW) (LPVOID pContext,PENUM_PAGE_FILE_INFORMATION pPageFileInfo,LPCWSTR lpFilename);
125 typedef WINBOOL (*PENUM_PAGE_FILE_CALLBACKA) (LPVOID pContext,PENUM_PAGE_FILE_INFORMATION pPageFileInfo,LPCSTR lpFilename);
126
127 WINBOOL WINAPI EnumPageFilesW (PENUM_PAGE_FILE_CALLBACKW pCallBackRoutine,LPVOID pContext);
128 WINBOOL WINAPI EnumPageFilesA (PENUM_PAGE_FILE_CALLBACKA pCallBackRoutine,LPVOID pContext);
129 DWORD WINAPI GetProcessImageFileNameA(HANDLE hProcess,LPSTR lpImageFileName,DWORD nSize);
130 DWORD WINAPI GetProcessImageFileNameW(HANDLE hProcess,LPWSTR lpImageFileName,DWORD nSize);
131
132 #ifdef __cplusplus
133 }
134 #endif
135 #endif