Index: Include/api_psapi.sbp
===================================================================
--- Include/api_psapi.sbp	(revision 1)
+++ Include/api_psapi.sbp	(revision 96)
@@ -1,14 +1,106 @@
-' api_psapi.sbp
-
-
-#ifndef _INC_PSAPI
-#define _INC_PSAPI
-
+#ifndef _INC_PSAPI_
+#define _INC_PSAPI_
 
 Declare Function EnumProcesses Lib "psapi" (lpidProcess As *DWord, cb As DWord, ByRef cbNeeded As DWord) As BOOL
-Declare Function EnumProcessModules Lib "psapi" (hProcess As HANDLE, lphModule As *HMODULE, cb As DWord, ByRef cbNeeded As DWord) As BOOL
-Declare Function GetModuleBaseName Lib "psapi" Alias "GetModuleBaseNameA" (hProcess As HANDLE, hModule As HMODULE, lpBaseName As LPSTR, nSize As DWord) As DWord
-Declare Function GetModuleFileNameEx Lib "psapi" Alias "GetModuleFileNameExA" (hProcess As HANDLE, hModule As HMODULE, lpFilename As LPSTR, nSize As DWord) As DWord
+Declare Function EnumProcessModules Lib "psapi" (hProcess As HANDLE, lphModule As *HANDLE, cb As DWord, ByRef lpcbNeeded As DWord) As BOOL
+Declare Function GetModuleBaseName Lib "psapi" Alias "GetModuleBaseNameA" (hProcess As HANDLE, hModule As HANDLE, lpBaseName As LPSTR, nSize As DWord) As DWORD
+Declare Function GetModuleFileNameEx Lib "psapi" Alias "GetModuleFileNameExA" (hProcess As HANDLE, hModule As HANDLE, lpFilename As LPSTR, nSize As DWord) As DWORD
 
+Type MODULEINFO
+	lpBaseOfDll As VoidPtr
+	SizeOfImage As DWORD
+	EntryPoint As VoidPtr
+End Type
+TypeDef LPMODULEINFO = *MODULEINFO
+
+Declare Function GetModuleInformation Lib "psapi" (hProcess As HANDLE, hModule As HANDLE, lpmodinfo As LPMODULEINFO, cb As DWord) As BOOL
+Declare Function EmptyWorkingSet Lib "psapi" (hProcess As HANDLE) As BOOL
+Declare Function QueryWorkingSet Lib "psapi" (hProcess As HANDLE, pv As VoidPtr, cb As DWord) As BOOL
+Declare Function QueryWorkingSetEx Lib "psapi" (hProcess As HANDLE, pv As VoidPtr, cb As DWord) As BOOL
+Declare Function InitializeProcessForWsWatch Lib "psapi" (hProcess As HANDLE) As BOOL
+
+Type PSAPI_WS_WATCH_INFORMATION
+	FaultingPc As VoidPtr
+	FaultingVa As VoidPtr
+End Type
+TypeDef PPSAPI_WS_WATCH_INFORMATION = *PSAPI_WS_WATCH_INFORMATION
+
+Declare Function GetWsChanges Lib "psapi" (hProcess As HANDLE, lpWatchInfo As PPSAPI_WS_WATCH_INFORMATION, cb As DWord) As BOOL
+Declare Function GetMappedFileName Lib "psapi" Alias "GetMappedFileNameA" (hProcess As HANDLE, lpv As VoidPtr, lpFilename As LPSTR, nSize As DWord) As DWORD
+Declare Function EnumDeviceDrivers Lib "psapi" (ByRef lpImageBase As VoidPtr, cb As DWord, ByRef lpcbNeeded As DWord) As BOOL
+Declare Function GetDeviceDriverBaseName Lib "psapi" Alias "GetDeviceDriverBaseNameA" (ImageBase As VoidPtr, lpBaseName As LPSTR, nSize As DWord) As DWORD
+Declare Function GetDeviceDriverFileName Lib "psapi" Alias "GetDeviceDriverFileNamA" (ImageBase As VoidPtr, lpFilename As LPSTR, nSize As DWord) As DWORD
+
+' Structure for GetProcessMemoryInfo()
+Type PROCESS_MEMORY_COUNTERS
+	cb As DWORD
+	PageFaultCount As DWORD
+	PeakWorkingSetSize As SIZE_T
+	WorkingSetSize As SIZE_T
+	QuotaPeakPagedPoolUsage As SIZE_T
+	QuotaPagedPoolUsage As SIZE_T
+	QuotaPeakNonPagedPoolUsage As SIZE_T
+	QuotaNonPagedPoolUsage As SIZE_T
+	PagefileUsage As SIZE_T
+	PeakPagefileUsage As SIZE_T
+End Type
+
+TypeDef PPROCESS_MEMORY_COUNTERS = *PROCESS_MEMORY_COUNTERS
+
+#ifdef _WIN32_WINNT
+Type PROCESS_MEMORY_COUNTERS_EX
+	cb As DWORD
+	PageFaultCount As DWORD
+	PeakWorkingSetSize As SIZE_T
+	WorkingSetSize As SIZE_T
+	QuotaPeakPagedPoolUsage As SIZE_T
+	QuotaPagedPoolUsage As SIZE_T
+	QuotaPeakNonPagedPoolUsage As SIZE_T
+	QuotaNonPagedPoolUsage As SIZE_T
+	PagefileUsage As SIZE_T
+	PeakPagefileUsage As SIZE_T
+	PrivateUsage As SIZE_T
+End Type
+TypeDef PPROCESS_MEMORY_COUNTERS_EX = *PROCESS_MEMORY_COUNTERS_EX
+#endif
+
+Declare Function GetProcessMemoryInfo Lib "psapi" (Process As HANDLE, ppsmemCounters As PPROCESS_MEMORY_COUNTERS, cb As DWord)
+
+Type PERFORMANCE_INFORMATION
+	cb As DWORD
+	CommitTotal As SIZE_T
+	CommitLimit As SIZE_T
+	CommitPeak As SIZE_T
+	PhysicalTotal As SIZE_T
+	PhysicalAvailable As SIZE_T
+	SystemCache As SIZE_T
+	KernelTotal As SIZE_T
+	KernelPaged As SIZE_T
+	KernelNonpaged As SIZE_T
+	PageSize As SIZE_T
+	HandleCount As DWORD
+	ProcessCount As DWORD
+	ThreadCount As DWORD
+End Type
+TypeDef PPERFORMANCE_INFORMATION = *PERFORMANCE_INFORMATION
+TypeDef PERFORMACE_INFORMATION = PERFORMANCE_INFORMATION
+TypeDef PPERFORMACE_INFORMATION = *PERFORMANCE_INFORMATION
+
+Declare Function GetPerformanceInfo Lib "psapi" (pPerformanceInformation As PPERFORMACE_INFORMATION, cb As DWord)
+
+Type ENUM_PAGE_FILE_INFORMATION
+	cb As DWORD
+	Reserved As DWORD
+	TotalSize As SIZE_T
+	TotalInUse As SIZE_T
+	PeakUsage As SIZE_T
+End Type
+TypeDef PENUM_PAGE_FILE_INFORMATION = *ENUM_PAGE_FILE_INFORMATION
+
+TypeDef PENUM_PAGE_FILE_CALLBACKW = *Function(pContext As VoidPtr, pPageFileInfo As PENUM_PAGE_FILE_INFORMATION, lpFilename As LPCWSTR) As BOOL
+TypeDef PENUM_PAGE_FILE_CALLBACKA = *Function(pContext As VoidPtr, pPageFileInfo As PENUM_PAGE_FILE_INFORMATION, lpFilename As LPCSTR) As BOOL
+
+Declare Function EnumPageFiles Lib "psapi" Alias "EnumPageFilesA" (pCallBackRoutine As PENUM_PAGE_FILE_CALLBACKA, pContext As VoidPtr) As BOOL
+Declare Function GetProcessImageFileName Lib "psapi" Alias "GetProcessImageFileNameA" (hProcess As HANDLE, lpImageFileName As LPSTR, nSize As DWord) As DWORD
 
 #endif '_INC_PSAPI
