Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MAC Address Changes
Message
From
09/08/2016 17:06:08
 
 
To
09/08/2016 16:57:49
General information
Forum:
Hardware
Category:
Computer cards
Miscellaneous
Thread ID:
01639275
Message ID:
01639284
Views:
55
>>Hi,
>>
>>I use some code to generate a number based on a PC's hard disk serial number and the MAC address. Recently, I have one client out of a couple hundred that this number changes on sporadically. I wrote a program to display what the serial number and MAC address are and the MAC address has changed from a couple weeks ago. The client says the NIC has not been changed.
>>
>>I thought the MAC address was tied to the NIC. What could cause this to change?
>
>How are you fetching the MAC address?

VFP code:
DECLARE INTEGER GetAdaptersInfo IN iphlpapi ; 
STRING @pAdapterInfo, LONG @pOutBufLen 

LOCAL lcBuffer, lnBufsize 
lnBufsize = 0 
lcBuffer = "" 
= GetAdaptersInfo(@lcBuffer, @lnBufsize) 
lcBuffer = Repli(Chr(0), lnBufsize) 

IF GetAdaptersInfo(@lcBuffer, @lnBufsize) <> 0 && ERROR_SUCCESS 
* =MESSAGEBOX('MSI Card Not Found',64)
ENDIF 

LOCAL lnAddrlen, lcAddress, ii
lnAddrlen = Asc(SUBSTR(lcBuffer, 401, 1)) 
lcAddress = SUBSTR(lcBuffer, 405, lnAddrlen) 
lcThisID = ''
lcThisHex = ''

FOR ii = 1 TO lnAddrLen
	lcThisID = lcThisID + ;
			IIF(ii>1, ',' ,'') + ;
			ALLTRIM(STR(ASC(SUBSTR(lcAddress,ii,1))))
	
	lcThisHex = lcThisHex + ;
			IIF(ii>1,':','') + ;
			RIGHT(TRANSFORM(ASC(SUBSTR(lcAddress,ii,1)),'@0'),2)
ENDFOR
 
RETURN lcThisHex
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform