
Determinig a machine's Physical Address (MAC Address)
Thanks for the reply to use Q118623. It suggests using Netbios. The Dev Studio
documentation on Netbios says:
"The Netbios function is provided primarily for applications that were written
for the NetBIOS interface and need to be ported to Win32. Applications not
requiring compatibility with NetBIOS should use other interfaces, such as
mailslots, named pipes, RPC, or distributed COM to accomplish tasks similar to
those supported by NetBIOS. These other interfaces are more flexible and
portable."
In another place I found it said that the call was not very reliable. I did try
the code and it seems to work on my machine. It still does not address the
second part of my question:
Question 2: What API call can I use to determine the Physical Address of a
server that I cam connected to?
Any other ideas?
Quote:
-----Original Message-----
Look up article "Q118623" in MSDN.
Nick
--
Compiler: Dev Studio 5.0
Language: C (not C++)
Target OS: Win '95, '98, 'NT, 2000, & ME
Topic: Determining a MAC Address. (I think that this is also referred to as
Physical Address or Hardware Address.) In DOS if I type C:> IPCONFIG /ALL,
I get
this information.
Question 1: What API call can I use to determine the Physical Address of the
machine that I am currently on?. In one place I found some sample code that
referred to 'Netbios'. The article said that it was not a very reliable
call.
Question 2: What API call can I use to determine the Physical Address of a
server
that I cam connected to?.
.