Home > Back-end >  D7 how to obtain the local connection network card MAC physical address?
D7 how to obtain the local connection network card MAC physical address?

Time:09-19

D7 version of offline, how to obtain local connection the physical address of the Ethernet MAC,
Please pay attention to is not active network card MAC, because sometimes it is wifi connection is sometimes wiring,
The above address is different, and I want to break the off-line can also get the address, the address of the Ethernet card,
Thanks for passing and reply you the great god!

CodePudding user response:

We usually method of access to the network card address, only after the network card activation, to earn,
So, the hardware machine code, usually cannot use the network card MAC,
Not seen for all network card MAC PC code,

CodePudding user response:

reference 1st floor lyhoo163 response:
we usually method of access to the network card address, only after the network card activation, to earn,
So, the hardware machine code, usually cannot use the network card MAC,
Not seen for all network card MAC PC code,


Network card is not the only global, how not to do the machine code?
The upstairs, please the teacher, how can I get the computer's unique identification number?
I also don't be the only, as long as don't repeat so much good,
Ask teacher that the only identification number: the most suitable for computer hard disk serial number? The serial number of the BIOS?
Teacher or there are other better ways, had better have ready-made code, 3 ks

CodePudding user response:

Through WMI access to network card MAC address, the hard disk serial number, serial number into the main board, CPU ID, the BIOS serial number
Delphi system information captured by the WMI
USES the ActiveX, ComObj;

The function GetWMIProperty (WMIType, WMIProperty: string) : string;
Var
Wmi, Objs, Obj: OleVariant;
Enum: IEnumVariant;
C: the Cardinal;
The begin
Wmi:=CreateOleObject (' WbemScripting. SWbemLocator ');
Objs:=Wmi. ConnectServer (', 'root/cimv2). ExecQuery (' Select * from Win32_' + WMIType);
Enum:=IEnumVariant (IUnknown (Objs. _NewEnum));
Enum. Reset;
Enum. Next, 1, Obj, C);
Obj:=Obj. Properties_. Item (WMIProperty, 0). The Value;
The Result: Obj=;
end;


//get the hard disk serial number
ShowMessage (GetWMIProperty (' DiskDrive ', 'PNPDeviceID'));
//get BISO serial number
ShowMessage (GetWMIProperty (' BIOS ', 'SerialNumber));
//access to network card MAC address
ShowMessage (GetWMIProperty (' NetworkAdapter ', 'MACAddress));
//access card serial number
ShowMessage (GetWMIProperty (' NetworkAdapter ', 'PNPDeviceID'));
//get the CPU serial number
ShowMessage (GetWMIProperty (' Processor ', 'ProcessorId'));

Can also use the same method for arbitrary system information of interest, such as the running process, account information, etc.,

More information on the WMI reference:
http://www.microsoft.com/whdc/system/pnppwr/wmi/default.mspx
http://msdn2.microsoft.com/en-us/library/aa394572.aspx

CodePudding user response:

In my download resources: http://download.csdn.net/detail/doloopcn/7990147
It's helpful for you to look at

CodePudding user response:

About the machine code:
1, I found that access to the network card address, usually only after the network card activation, to earn, if networking is different, so the network card, can't be as machine code,
2, hard drive ID, also is empty, when in
3, I notice way, take the BIOS, hard disk, CPU and other data, coupled together constitute the machine code,
4, sometimes, also USES the network card address, encryption encryption processing,

Good idea, U disk encryption dog,
  • Related