国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 編程 > .NET > 正文

通過(guò)WMI獲得硬盤(pán)和CPU的物理序列號(hào)(VB.net)

2024-07-10 13:01:15
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

'獲得硬盤(pán)序列號(hào)

dim cmicwmi as new system.management.managementobjectsearcher("select * from win32_diskdrive")



dim uint32 as uint32

for each cmicwmiobj as managementobject in cmicwmi.get

uint32 = cmicwmiobj("signature")

next

textbox1.text = uint32.tostring





'獲得cpu序列號(hào)

dim wmi as new system.management.managementobjectsearcher("select * from win32_processor")



dim uint32 as string

for each wmiobj as managementobject in wmi.get

uint32 = wmiobj("processorid")

next

textbox1.text = uint32



'獲得硬盤(pán)總?cè)萘?br>
dim wmi as new system.management.managementobjectsearcher("select * from win32_diskdrive")



dim uint64 as uint64

for each wmiobj as managementobject in wmi.get

uint64 = wmiobj("size")

next

textbox1.text = uint64.tostring

首先,引用system.management;然后在代碼中imports system.management;

發(fā)表評(píng)論 共有條評(píng)論
用戶(hù)名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 哈密市| 宿松县| 松溪县| 淮南市| 大连市| 朝阳县| 阳高县| 沈丘县| 西吉县| 桦川县| 康定县| 萨迦县| 灵寿县| 佛教| 雷波县| 松原市| 荔浦县| 潜江市| 澄城县| 保亭| 饶阳县| 依安县| 石河子市| 无锡市| 高台县| 闻喜县| 得荣县| 金沙县| 岳阳市| 区。| 辉南县| 上犹县| 庆云县| 涡阳县| 恩平市| 南溪县| 合山市| 枝江市| 缙云县| 钟祥市| 西林县|