在VB中 怎样读取一个进程占多少内存
发布网友
发布时间:2022-05-25 23:42
我来回答
共1个回答
热心网友
时间:2023-11-26 14:05
使用API函数
ReadProcessMemory
原型:
Private
Declare
Function
ReadProcessMemory
Lib
"kernel32"
(ByVal
hProcess
As
Long,
ByVal
lpBaseAddress
As
Any,
ByVal
lpBuffer
As
Any,
ByVal
nSize
As
Long,
lpNumberOfBytesWritten
As
Long)
As
Long
说明:
ByVal
hProcess
As
Long,
是打开的进程的句柄
ByVal
lpBaseAddress
As
Any,
是进程的地址
ByVal
lpBuffer
As
Any,
是数据的存放地址
ByVal
nSize
As
Long,
是你想要读取的数据的长度
lpNumberOfBytesWritten
As
Long
是实际读取的数据的长度.