Changeset 96


Ignore:
Timestamp:
Feb 13, 2007, 10:50:25 PM (18 years ago)
Author:
NoWest
Message:

移植完了。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/api_psapi.sbp

    r1 r96  
    1 ' api_psapi.sbp
    2 
    3 
    4 #ifndef _INC_PSAPI
    5 #define _INC_PSAPI
    6 
     1#ifndef _INC_PSAPI_
     2#define _INC_PSAPI_
    73
    84Declare Function EnumProcesses Lib "psapi" (lpidProcess As *DWord, cb As DWord, ByRef cbNeeded As DWord) As BOOL
    9 Declare Function EnumProcessModules Lib "psapi" (hProcess As HANDLE, lphModule As *HMODULE, cb As DWord, ByRef cbNeeded As DWord) As BOOL
    10 Declare Function GetModuleBaseName Lib "psapi" Alias "GetModuleBaseNameA" (hProcess As HANDLE, hModule As HMODULE, lpBaseName As LPSTR, nSize As DWord) As DWord
    11 Declare Function GetModuleFileNameEx Lib "psapi" Alias "GetModuleFileNameExA" (hProcess As HANDLE, hModule As HMODULE, lpFilename As LPSTR, nSize As DWord) As DWord
     5Declare Function EnumProcessModules Lib "psapi" (hProcess As HANDLE, lphModule As *HANDLE, cb As DWord, ByRef lpcbNeeded As DWord) As BOOL
     6Declare Function GetModuleBaseName Lib "psapi" Alias "GetModuleBaseNameA" (hProcess As HANDLE, hModule As HANDLE, lpBaseName As LPSTR, nSize As DWord) As DWORD
     7Declare Function GetModuleFileNameEx Lib "psapi" Alias "GetModuleFileNameExA" (hProcess As HANDLE, hModule As HANDLE, lpFilename As LPSTR, nSize As DWord) As DWORD
    128
     9Type MODULEINFO
     10    lpBaseOfDll As VoidPtr
     11    SizeOfImage As DWORD
     12    EntryPoint As VoidPtr
     13End Type
     14TypeDef LPMODULEINFO = *MODULEINFO
     15
     16Declare Function GetModuleInformation Lib "psapi" (hProcess As HANDLE, hModule As HANDLE, lpmodinfo As LPMODULEINFO, cb As DWord) As BOOL
     17Declare Function EmptyWorkingSet Lib "psapi" (hProcess As HANDLE) As BOOL
     18Declare Function QueryWorkingSet Lib "psapi" (hProcess As HANDLE, pv As VoidPtr, cb As DWord) As BOOL
     19Declare Function QueryWorkingSetEx Lib "psapi" (hProcess As HANDLE, pv As VoidPtr, cb As DWord) As BOOL
     20Declare Function InitializeProcessForWsWatch Lib "psapi" (hProcess As HANDLE) As BOOL
     21
     22Type PSAPI_WS_WATCH_INFORMATION
     23    FaultingPc As VoidPtr
     24    FaultingVa As VoidPtr
     25End Type
     26TypeDef PPSAPI_WS_WATCH_INFORMATION = *PSAPI_WS_WATCH_INFORMATION
     27
     28Declare Function GetWsChanges Lib "psapi" (hProcess As HANDLE, lpWatchInfo As PPSAPI_WS_WATCH_INFORMATION, cb As DWord) As BOOL
     29Declare Function GetMappedFileName Lib "psapi" Alias "GetMappedFileNameA" (hProcess As HANDLE, lpv As VoidPtr, lpFilename As LPSTR, nSize As DWord) As DWORD
     30Declare Function EnumDeviceDrivers Lib "psapi" (ByRef lpImageBase As VoidPtr, cb As DWord, ByRef lpcbNeeded As DWord) As BOOL
     31Declare Function GetDeviceDriverBaseName Lib "psapi" Alias "GetDeviceDriverBaseNameA" (ImageBase As VoidPtr, lpBaseName As LPSTR, nSize As DWord) As DWORD
     32Declare Function GetDeviceDriverFileName Lib "psapi" Alias "GetDeviceDriverFileNamA" (ImageBase As VoidPtr, lpFilename As LPSTR, nSize As DWord) As DWORD
     33
     34' Structure for GetProcessMemoryInfo()
     35Type PROCESS_MEMORY_COUNTERS
     36    cb As DWORD
     37    PageFaultCount As DWORD
     38    PeakWorkingSetSize As SIZE_T
     39    WorkingSetSize As SIZE_T
     40    QuotaPeakPagedPoolUsage As SIZE_T
     41    QuotaPagedPoolUsage As SIZE_T
     42    QuotaPeakNonPagedPoolUsage As SIZE_T
     43    QuotaNonPagedPoolUsage As SIZE_T
     44    PagefileUsage As SIZE_T
     45    PeakPagefileUsage As SIZE_T
     46End Type
     47
     48TypeDef PPROCESS_MEMORY_COUNTERS = *PROCESS_MEMORY_COUNTERS
     49
     50#ifdef _WIN32_WINNT
     51Type PROCESS_MEMORY_COUNTERS_EX
     52    cb As DWORD
     53    PageFaultCount As DWORD
     54    PeakWorkingSetSize As SIZE_T
     55    WorkingSetSize As SIZE_T
     56    QuotaPeakPagedPoolUsage As SIZE_T
     57    QuotaPagedPoolUsage As SIZE_T
     58    QuotaPeakNonPagedPoolUsage As SIZE_T
     59    QuotaNonPagedPoolUsage As SIZE_T
     60    PagefileUsage As SIZE_T
     61    PeakPagefileUsage As SIZE_T
     62    PrivateUsage As SIZE_T
     63End Type
     64TypeDef PPROCESS_MEMORY_COUNTERS_EX = *PROCESS_MEMORY_COUNTERS_EX
     65#endif
     66
     67Declare Function GetProcessMemoryInfo Lib "psapi" (Process As HANDLE, ppsmemCounters As PPROCESS_MEMORY_COUNTERS, cb As DWord)
     68
     69Type PERFORMANCE_INFORMATION
     70    cb As DWORD
     71    CommitTotal As SIZE_T
     72    CommitLimit As SIZE_T
     73    CommitPeak As SIZE_T
     74    PhysicalTotal As SIZE_T
     75    PhysicalAvailable As SIZE_T
     76    SystemCache As SIZE_T
     77    KernelTotal As SIZE_T
     78    KernelPaged As SIZE_T
     79    KernelNonpaged As SIZE_T
     80    PageSize As SIZE_T
     81    HandleCount As DWORD
     82    ProcessCount As DWORD
     83    ThreadCount As DWORD
     84End Type
     85TypeDef PPERFORMANCE_INFORMATION = *PERFORMANCE_INFORMATION
     86TypeDef PERFORMACE_INFORMATION = PERFORMANCE_INFORMATION
     87TypeDef PPERFORMACE_INFORMATION = *PERFORMANCE_INFORMATION
     88
     89Declare Function GetPerformanceInfo Lib "psapi" (pPerformanceInformation As PPERFORMACE_INFORMATION, cb As DWord)
     90
     91Type ENUM_PAGE_FILE_INFORMATION
     92    cb As DWORD
     93    Reserved As DWORD
     94    TotalSize As SIZE_T
     95    TotalInUse As SIZE_T
     96    PeakUsage As SIZE_T
     97End Type
     98TypeDef PENUM_PAGE_FILE_INFORMATION = *ENUM_PAGE_FILE_INFORMATION
     99
     100TypeDef PENUM_PAGE_FILE_CALLBACKW = *Function(pContext As VoidPtr, pPageFileInfo As PENUM_PAGE_FILE_INFORMATION, lpFilename As LPCWSTR) As BOOL
     101TypeDef PENUM_PAGE_FILE_CALLBACKA = *Function(pContext As VoidPtr, pPageFileInfo As PENUM_PAGE_FILE_INFORMATION, lpFilename As LPCSTR) As BOOL
     102
     103Declare Function EnumPageFiles Lib "psapi" Alias "EnumPageFilesA" (pCallBackRoutine As PENUM_PAGE_FILE_CALLBACKA, pContext As VoidPtr) As BOOL
     104Declare Function GetProcessImageFileName Lib "psapi" Alias "GetProcessImageFileNameA" (hProcess As HANDLE, lpImageFileName As LPSTR, nSize As DWord) As DWORD
    13105
    14106#endif '_INC_PSAPI
Note: See TracChangeset for help on using the changeset viewer.