更新:2007 年 11 月
获取计算机空闲虚拟地址空间的总量。
' Usage
Dim value As ULong = My.Computer.Info.AvailableVirtualMemory
' Declaration
Public ReadOnly Property AvailableVirtualMemory As ULong
返回值
一个包含计算机空闲虚拟地址空间字节数的 ULong。
异常
下面的情况可能会导致异常:
- 应用程序无法获取内存状态 (Win32Exception)。
备注
My.Computer.Info.AvailableVirtualMemory 属性需要 Windows XP、Windows 2000 Professional、Windows Server 2003 或 Windows 2000 Server。
示例
此示例使用 My.Computer.Info.AvailableVirtualMemory 属性来显示代码在其上运行的计算机的可用虚拟内存量。
MsgBox("Computer's available virtual memory: " & _
My.Computer.Info.AvailableVirtualMemory)
要求
命名空间:Microsoft.VisualBasic.Devices
**程序集:**Visual Basic 运行库(位于 Microsoft.VisualBasic.dll 中)
按项目类型列出的可用性
项目类型 |
可用 |
---|---|
Windows 应用程序 |
是 |
类库 |
是 |
控制台应用程序 |
是 |
Windows 控件库 |
是 |
Web 控件库 |
是 |
Windows 服务 |
是 |
网站 |
是 |
权限
不需要任何权限。
请参见
参考
My.Computer.Info.TotalVirtualMemory 属性