讀取硬體序列號

2021-04-09 04:15:38 字數 739 閱讀 4794

using

system;

using

system.collections.generic;

using

system.text;

using

system.management;

namespace

讀取序列號

...//

獲取硬碟序列號

string

hdid;

managementclass cimobject1 

=new

managementclass(

"win32_diskdrive");

managementobjectcollection moc1 

=cimobject1.getinstances();

foreach

(managementobject mo 

inmoc1)

...//

獲取網絡卡位址

managementclass mc 

=new

managementclass(

"win32_networkadapterconfiguration");

managementobjectcollection moc2 

=mc.getinstances();

foreach

(managementobject mo 

inmoc2)

...}}}

讀取硬碟序列號

pragma hdrstop pragma argsused include include include include hdd.h const word ide atapi identify 0xa1 讀取atapi裝置的命令 const word ide ata identify 0xec ...

讀取軟硬光碟序列號

獲取序列號是要讀取軟硬光碟的資訊,可通過以下函式獲得 public declare function getvolumeinformation lib kernel32.dll alias getvolumeinformationa byval lprootpathname as string,by...

C 讀取硬碟的序列號

include include include define dfp get version 0x00074080 define dfp send drive command 0x0007c084 define dfp receive drive data 0x0007c088 pragma pac...