注册 登录
编程论坛 VB6论坛

VB6读取物理内存容量的问题

chen3bing 发布于 2019-08-15 14:52, 1343 次点击
我在网上找了一个VB6读取物理内存容量的程序。
代码:
strComputer = "."

Set wbemServices = GetObject("winmgmts:\\" & strComputer)
Set wbemObjectSet = wbemServices.InstancesOf("Win32_LogicalMemoryConfiguration")

For Each wbemObject In wbemObjectSet
WScript.Echo "物理内存 (MB): " & CInt(wbemObject.TotalPhysicalMemory / 1024)
Next
运行错误:
只有本站会员才能查看附件,请 登录

只有本站会员才能查看附件,请 登录

我查了一下,说是指定类无效。
请问高手,该如何解决?谢谢!
0 回复
1