|
|
发表于 2006-1-13 04:02:00
|
显示全部楼层
Re:Question.....
Option Explicit
'/*++ BUILD Version: 0001 // Increment this if a change has global effects
'
'Copyright (c) 1994-1997 Microsoft Corporation
'
'Module Name:
'
' psapi.h
'
'Abstract:
' Include file for APIs provided by PSAPI.DLL
'
'Author:
'
' Richard Shupak [richards] 06-Jan-1994
'
'Revision History:
'
'--*/
Declare Function EnumProcesses Lib "psapi.dll" _
(lpidProcess As Long, _
ByVal cb As Long, _
cbNeeded As Long) As Long
Declare Function EnumProcessModules Lib "psapi.dll" _
(ByVal hProcess As Long, _
lphModule As Long, _
ByVal cb As Long, _
lpcbNeeded As Long) As Long
Declare Function GetModuleBaseName Lib "psapi.dll" _
Alias "GetModuleBaseNameA" _
(ByVal hProcess As Long, _
ByVal hModule As Long, _
ByVal lpBaseName As String, _
ByVal nSize As Long) As Long
Declare Function GetModuleFileNameEx Lib "psapi.dll" _
Alias "GetModuleFileNameExA" _
(ByVal hProcess As Long, _
ByVal hModule As Long, _
ByVal lpFileName As String, _
ByVal nSize As Long) As Long
Type MODULEINFO
lpBaseOfDll As Long
SizeOfImage As Long
EntryPoint As Long
End Type
Declare Function GetModuleInformation Lib "psapi.dll" _
(ByVal hProcess As Long, _
ByVal hModule As Long, _
lpmodinfo As MODULEINFO, _
ByVal cb As Long) As Long
Declare Function EmptyWorkingSet Lib "psapi.dll" _
(ByVal hProcess As Long) As Long
Declare Function QueryWorkingSet Lib "psapi.dll" _
(ByVal hProcess As Long, _
pv As Any, _
ByVal cb As Long) As Long
Declare Function InitializeProcessForWsWatch Lib "psapi.dll" _
(ByVal hProcess As Long) As Long
Type PSAPI_WS_WATCH_INFORMATION
FaultingPc As Long
FaultingVa As Long
End Type
Declare Function GetWsChanges Lib "psapi.dll" _
(ByVal hProcess As Long, _
lpWatchInfo As PSAPI_WS_WATCH_INFORMATION, _
ByVal cb As Long) As Long
Declare Function GetMappedFileName Lib "psapi.dll" _
Alias "GetMappedFileNameA" _
(ByVal hProcess As Long, _
lpv As Any, _
ByVal lpFileName As String, _
ByVal nSize As Long) As Long
Declare Function EnumDeviceDrivers Lib "psapi.dll" _
(lpImageBase As Any, _
ByVal cb As Long, _
lpcbNeeded As Long) As Long
Declare Function GetDeviceDriverBaseName Lib "psapi.dll" _
Alias "GetDeviceDriverBaseNameA" _
(ImageBase As Any, _
ByVal lpBaseName As String, _
ByVal nSize As Long) As Long
Declare Function GetDeviceDriverFileName Lib "psapi.dll" _
Alias "GetDeviceDriverFileNameA" _
(ImageBase As Any, _
ByVal lpFileName As String, _
ByVal nSize As Long) As Long
'// Structure for GetProcessMemoryInfo()
Type PROCESS_MEMORY_COUNTERS
cb As Long
PageFaultCount As Long
PeakWorkingSetSize As Long
WorkingSetSize As Long
QuotaPeakPagedPoolUsage As Long
QuotaPagedPoolUsage As Long
QuotaPeakNonPagedPoolUsage As Long
QuotaNonPagedPoolUsage As Long
PagefileUsage As Long
PeakPagefileUsage As Long
End Type
Declare Function GetProcessMemoryInfo Lib "psapi.dll" _
(ByVal hProcess As Long, _
ppsmemCounters As PROCESS_MEMORY_COUNTERS, _
ByVal cb As Long) As Long
'/////////////////////////////////////////////////////////////////////////// |
|