>>I could but that is too messy and I don't like the COMMAND window flash across the screen. The OCX from CompuServer that Rick Bean alerted me to does the trick flawlessly.
>
>Based on original solution (the MAC address is only part of the GUID):
>
>function GetMAC
>local lcStrucGUID, lcMAC, lnLoop
>declare integer CoCreateGuid in Ole32.dll string @lcGUIDStruc
>
>lcStrucGUID=space(16)
>
>if CoCreateGuid(@lcStrucGUID) # 0 then
> return ""
>endif
>lcMAC = ""
>for lnLoop=11 to 16
> lcMAC = lcMAC+right(transform(asc(substr(lcStrucGUID,lnLoop,1)),"@0"),2)+"-"
>endfor
>
>return left(lcMAC,len(lcMAC)-1)
>
>
>It works in my system (got my NIC MAC perfectly).
>
>bye
It can be reliable on some machines, but I have already demonstrated on several computers that it is very unreliable. I ran that code on my PC over 20 times in a loop and inserted the entire return value strings in a table. No part of the string was ever duplicated in other records and not 1 had any semblance of my MAC Address.
Mark McCasland
Midlothian, TX USA