source: branch/egtra-stream-without-en_dec/api_psapi.sbp@ 673

Last change on this file since 673 was 497, checked in by イグトランス (egtra), 17 years ago

インクルードガードとその他不要な前処理定義などの削除

File size: 5.6 KB
Line 
1' api_psapi.sbp
2
3#ifdef UNICODE
4Const _FuncName_GetModuleBaseName = "GetModuleBaseNameW"
5Const _FuncName_GetModuleFileNameEx = "GetModuleFileNameExW"
6Const _FuncName_GetMappedFileName = "GetMappedFileNameW"
7Const _FuncName_GetDeviceDriverBaseName = "GetDeviceDriverBaseNameW"
8Const _FuncName_GetDeviceDriverFileName = "GetDeviceDriverFileNameW"
9Const _FuncName_GetProcessImageFileName = "GetProcessImageFileNameW"
10Const _FuncName_EnumPageFiles = "EnumPageFilesW"
11#else
12Const _FuncName_GetModuleBaseName = "GetModuleBaseNameA"
13Const _FuncName_GetModuleFileNameEx = "GetModuleFileNameExA"
14Const _FuncName_GetMappedFileName = "GetMappedFileNameA"
15Const _FuncName_GetDeviceDriverBaseName = "GetDeviceDriverBaseNameA"
16Const _FuncName_GetDeviceDriverFileName = "GetDeviceDriverFileNameA"
17Const _FuncName_GetProcessImageFileName = "GetProcessImageFileNameA"
18Const _FuncName_EnumPageFiles = "EnumPageFilesA"
19#endif
20
21Declare Function EnumProcesses Lib "psapi" (lpidProcess As *DWord, cb As DWord, ByRef cbNeeded As DWord) As BOOL
22Declare Function EnumProcessModules Lib "psapi" (hProcess As HANDLE, lphModule As *HANDLE, cb As DWord, ByRef lpcbNeeded As DWord) As BOOL
23Declare Function GetModuleBaseName Lib "psapi" Alias _FuncName_GetModuleBaseName (hProcess As HANDLE, hModule As HANDLE, lpBaseName As LPTSTR, nSize As DWord) As DWORD
24Declare Function GetModuleFileNameEx Lib "psapi" Alias _FuncName_GetModuleFileNameEx (hProcess As HANDLE, hModule As HANDLE, lpFilename As LPTSTR, nSize As DWord) As DWORD
25
26Type MODULEINFO
27 lpBaseOfDll As VoidPtr
28 SizeOfImage As DWORD
29 EntryPoint As VoidPtr
30End Type
31TypeDef LPMODULEINFO = *MODULEINFO
32
33Declare Function GetModuleInformation Lib "psapi" (hProcess As HANDLE, hModule As HANDLE, lpmodinfo As LPMODULEINFO, cb As DWord) As BOOL
34Declare Function EmptyWorkingSet Lib "psapi" (hProcess As HANDLE) As BOOL
35Declare Function QueryWorkingSet Lib "psapi" (hProcess As HANDLE, pv As VoidPtr, cb As DWord) As BOOL
36Declare Function QueryWorkingSetEx Lib "psapi" (hProcess As HANDLE, pv As VoidPtr, cb As DWord) As BOOL
37Declare Function InitializeProcessForWsWatch Lib "psapi" (hProcess As HANDLE) As BOOL
38
39Type PSAPI_WS_WATCH_INFORMATION
40 FaultingPc As VoidPtr
41 FaultingVa As VoidPtr
42End Type
43TypeDef PPSAPI_WS_WATCH_INFORMATION = *PSAPI_WS_WATCH_INFORMATION
44
45Declare Function GetWsChanges Lib "psapi" (hProcess As HANDLE, lpWatchInfo As PPSAPI_WS_WATCH_INFORMATION, cb As DWord) As BOOL
46Declare Function GetMappedFileName Lib "psapi" Alias _FuncName_GetMappedFileName (hProcess As HANDLE, lpv As VoidPtr, lpFilename As LPTSTR, nSize As DWord) As DWORD
47Declare Function EnumDeviceDrivers Lib "psapi" (ByRef lpImageBase As VoidPtr, cb As DWord, ByRef lpcbNeeded As DWord) As BOOL
48Declare Function GetDeviceDriverBaseName Lib "psapi" Alias _FuncName_GetDeviceDriverBaseName (ImageBase As VoidPtr, lpBaseName As LPTSTR, nSize As DWord) As DWORD
49Declare Function GetDeviceDriverFileName Lib "psapi" Alias _FuncName_GetDeviceDriverFileName (ImageBase As VoidPtr, lpFilename As LPTSTR, nSize As DWord) As DWORD
50
51' Structure for GetProcessMemoryInfo()
52Type PROCESS_MEMORY_COUNTERS
53 cb As DWORD
54 PageFaultCount As DWORD
55 PeakWorkingSetSize As SIZE_T
56 WorkingSetSize As SIZE_T
57 QuotaPeakPagedPoolUsage As SIZE_T
58 QuotaPagedPoolUsage As SIZE_T
59 QuotaPeakNonPagedPoolUsage As SIZE_T
60 QuotaNonPagedPoolUsage As SIZE_T
61 PagefileUsage As SIZE_T
62 PeakPagefileUsage As SIZE_T
63End Type
64
65TypeDef PPROCESS_MEMORY_COUNTERS = *PROCESS_MEMORY_COUNTERS
66
67#ifdef _WIN32_WINNT
68Type PROCESS_MEMORY_COUNTERS_EX
69 cb As DWORD
70 PageFaultCount As DWORD
71 PeakWorkingSetSize As SIZE_T
72 WorkingSetSize As SIZE_T
73 QuotaPeakPagedPoolUsage As SIZE_T
74 QuotaPagedPoolUsage As SIZE_T
75 QuotaPeakNonPagedPoolUsage As SIZE_T
76 QuotaNonPagedPoolUsage As SIZE_T
77 PagefileUsage As SIZE_T
78 PeakPagefileUsage As SIZE_T
79 PrivateUsage As SIZE_T
80End Type
81TypeDef PPROCESS_MEMORY_COUNTERS_EX = *PROCESS_MEMORY_COUNTERS_EX
82#endif
83
84Declare Function GetProcessMemoryInfo Lib "psapi" (Process As HANDLE, ppsmemCounters As PPROCESS_MEMORY_COUNTERS, cb As DWord) As BOOL
85
86Type PERFORMANCE_INFORMATION
87 cb As DWORD
88 CommitTotal As SIZE_T
89 CommitLimit As SIZE_T
90 CommitPeak As SIZE_T
91 PhysicalTotal As SIZE_T
92 PhysicalAvailable As SIZE_T
93 SystemCache As SIZE_T
94 KernelTotal As SIZE_T
95 KernelPaged As SIZE_T
96 KernelNonpaged As SIZE_T
97 PageSize As SIZE_T
98 HandleCount As DWORD
99 ProcessCount As DWORD
100 ThreadCount As DWORD
101End Type
102TypeDef PPERFORMANCE_INFORMATION = *PERFORMANCE_INFORMATION
103TypeDef PERFORMACE_INFORMATION = PERFORMANCE_INFORMATION
104TypeDef PPERFORMACE_INFORMATION = *PERFORMANCE_INFORMATION
105
106Declare Function GetPerformanceInfo Lib "psapi" (pPerformanceInformation As PPERFORMACE_INFORMATION, cb As DWord) As BOOL
107
108Type ENUM_PAGE_FILE_INFORMATION
109 cb As DWORD
110 Reserved As DWORD
111 TotalSize As SIZE_T
112 TotalInUse As SIZE_T
113 PeakUsage As SIZE_T
114End Type
115TypeDef PENUM_PAGE_FILE_INFORMATION = *ENUM_PAGE_FILE_INFORMATION
116
117TypeDef PENUM_PAGE_FILE_CALLBACKW = *Function(pContext As VoidPtr, pPageFileInfo As PENUM_PAGE_FILE_INFORMATION, lpFilename As LPCWSTR) As BOOL
118TypeDef PENUM_PAGE_FILE_CALLBACKA = *Function(pContext As VoidPtr, pPageFileInfo As PENUM_PAGE_FILE_INFORMATION, lpFilename As LPCSTR) As BOOL
119#ifdef UNICODE
120TypeDef PENUM_PAGE_FILE_CALLBACK = PENUM_PAGE_FILE_CALLBACKW
121#else
122TypeDef PENUM_PAGE_FILE_CALLBACK = PENUM_PAGE_FILE_CALLBACKA
123#endif
124
125Declare Function EnumPageFiles Lib "psapi" Alias _FuncName_EnumPageFiles (pCallBackRoutine As PENUM_PAGE_FILE_CALLBACK, pContext As VoidPtr) As BOOL
126Declare Function GetProcessImageFileName Lib "psapi" Alias _FuncName_GetProcessImageFileName (hProcess As HANDLE, lpImageFileName As LPTSTR, nSize As DWord) As DWORD
Note: See TracBrowser for help on using the repository browser.