Home > database >  PB for native Mac address
PB for native Mac address

Time:10-08

//get a computer name
The function Boolean GetComputerNameA (ref string lpBuffer, ref ulong nSize) library "KERNEL32. DLL" alias for "GetComputerNameA; Ansi
"//set the computer name
The FUNCTION Boolean SetComputerNameA (ref string cname) LIBRARY "kernel32. DLL" alias for "SetComputerNameA; Ansi
"//sets the system time
The Function Boolean SetSystemDateTime (integer wYear, integer wMonth, integer wDay, integer wHour, integer wMinute, integer wSecond) Library "mHand. DLL
"The FUNCTION int GetSystemMetrics (int indexnum) LIBRARY "User32. DLL
"//IP is obtained by domain name
The Function string GetIp (string name) Library "GetNet. DLL" alias for "GetIp; Ansi
"//get the machine IP address
The Function string GetLocalIp () Library "GetNet. DLL" alias for "GetLocalIp; Ansi
"//domain is obtained by IP
IP Function string GetName (string) Library "GetNet. DLL" alias for "GetName. Ansi
"//get the machine domain name
The Function string GetLocalName () Library "GetNet. DLL" alias for "GetLocalName; Ansi
"//get in LAN computer name
The Function string GetLanComputers () Library "GetNet. DLL" alias for "GetLanComputers; Ansi
"//get calculation in LAN MAC
IP Function string GetMac (string) Library "GetNet. DLL" alias for "GetMac; Ansi
"//get the calculation of the native MAC
The Function string GetLocalMac () Library "GetNet. DLL" alias for "GetLocalMac; Ansi"

CodePudding user response:

You all write very well, isn't it?

CodePudding user response:

GetLocalMac () can only get a MAC, wireless access

CodePudding user response:

The Function Long GetMACAddress (Long Lana, Ref Long addr [6]) Library "GetMAC. DLL
"The Function Long GetLanaID (Ref Long Lana [254]) Library "GetMAC. DLL
"
Long ll_mac [6]
Long ll_lana [254], ll_lananum
The integer ll_nub
String ls_mac ls_login_mac, ls_macs [6]
Long ll_numb ll_login, ll_ms
Ll_login=1
Ll_lananum=GetLanaID (ll_lana)
If ll_lananum & gt; 0 then
For ll_numb=1 to ll_lananum
If GetMacAddress (ll_lana [ll_numb], ll_mac)=0 then
For ll_ms=1 to 6
Ls_macs [ll_ms]=trim (inv_numberical_reg of_tohex (ll_mac [ll_ms]))
If ll_mac [ll_ms] <10 then
Ls_macs [ll_ms]='0' + ls_macs [ll_ms]
End the if
Next
Ls_mac=ls_macs [1] + '-' + ls_macs [2] + '-' + ls_macs [3] + '-' + ls_macs [4] + '-' + ls_macs [5] + '-' + ls_macs [6]
The exit
The else
Ls_mac='1234567890' + ls_user_id
End the if
Next
The else
Ls_mac='1234567890' + ls_user_id
end if

CodePudding user response:

The most awkward, and the method of simple
Execute the batch command produces to the open file to the part of the deleted file

The run (" ipconfig/all & gt; Aaaa ")//you can also generate somewhere for
Then parse the file, and finally don't forget to delete it
May need to perform post way, that is put in a queue at last, the system for the run is not yet performed, parse the file immediately, may not exist
  • Related