以文本方式查看主题
-
Foxtable(狐表)
(http://foxtable.com/bbs/index.asp)
--
专家坐堂
(http://foxtable.com/bbs/list.asp?boardid=2)
----
[求助]关于获取内存个数信息的问题
(http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=142109)
-- 作者:81538475
-- 发布时间:2019/10/18 16:22:00
-- [求助]关于获取内存个数信息的问题
在网上找了很久有没有看到获取内存个数的代码,都是内存总数,或者内存品牌的,不知道 system_management.DLL 是不是没有这个功能呢。
哪位知道的麻烦告诉我一下把。
-- 作者:有点蓝
-- 发布时间:2019/10/18 16:28:00
--
遍历也不行?
Dim mos As new System.Management.ManagementObjectSearcher("s
ele
ct * from Win32_PhysicalMemory")
Dim moe = mos.Get().GetEnumerator()
do while moe.MoveNext() isnot nothing
Output.Show(moe.Current.Properties("Manufacturer").Value.ToString())
loop
-- 作者:81538475
-- 发布时间:2019/10/18 16:31:00
--
直接,停不下来拉。
-- 作者:81538475
-- 发布时间:2019/10/18 16:47:00
--
Dim mos As new System.Management.ManagementObjectSearcher("se\\ect * from Win32_PhysicalMemory")
Dim moe = mos.Get().GetEnumerator()
Do While moe.MoveNext() =True
Output.Show(moe.Current.Properties("Manufacturer").Value.ToString())
Loop
是不是改成这样
-- 作者:81538475
-- 发布时间:2019/10/18 16:55:00
--
现在这个数量问题解决了。。但是内一跟内存多大,是个难题。。内存大小一样到还好。
-- 作者:有点蓝
-- 发布时间:2019/10/18 16:59:00
--
Dim mc = new System.Management.ManagementClass("Win32_PhysicalMemory")
Dim moc = mc.GetInstances()
Output.Show(moc.count)
For Each mo As object In moc
Output.Show( mo.Properties("Description").Value.ToString())
Output.Show( mo.Properties("Manufacturer").Value.ToString())
Output.Show( mo.Properties("SerialNumber").Value.ToString())
Next
-- 作者:coch2004
-- 发布时间:2019/10/18 18:04:00
--
各位老铁顶一下!!! 记住:
wbemtest.exe这个名字.方便你我他!!!
此主题相关图片如下:123.jpg