I've been unable to find any way to reliably get the current Adapter address. While under NT I find it appears in the registry (although it's not straight forward), the technique doesn't work under Win 95/98.
e.g.
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\N1001\Parameters]
"ProposeQNFTAddress"="0008C7DF8B6E"
While I could run IPCONFIG.EXE /ALL > c:\IPCONFIG.TXT in a DOS window and parse out the information, this seems like a quite inelegant solution, and this code is obviously getting it from somewhere.
It was suggested that I create a GUID, and parse off the end. Unfortunately the GUID uses what's known as the Default User ID, which is the MAC address for the Network card when the registry is first created. If you switch network cards (or are working with a "ghosted" machine), the GUID includes the original address rather than the current one (which is of course what I need!).
Rick
e.g.
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\N1001\Parameters]
"ProposeQNFTAddress"="0008C7DF8B6E"
While I could run IPCONFIG.EXE /ALL > c:\IPCONFIG.TXT in a DOS window and parse out the information, this seems like a quite inelegant solution, and this code is obviously getting it from somewhere.
It was suggested that I create a GUID, and parse off the end. Unfortunately the GUID uses what's known as the Default User ID, which is the MAC address for the Network card when the registry is first created. If you switch network cards (or are working with a "ghosted" machine), the GUID includes the original address rather than the current one (which is of course what I need!).
Rick