Determinig a machine's Physical Address (MAC Address) 
Author Message
 Determinig a machine's Physical Address (MAC Address)

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?.



Sat, 26 Apr 2003 03:00:00 GMT  
 Determinig a machine's Physical Address (MAC Address)
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?.



Sat, 26 Apr 2003 03:00:00 GMT  
 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?.

.



Mon, 28 Apr 2003 03:00:00 GMT  
 Determinig a machine's Physical Address (MAC Address)
You may want to try a different newsgroup for this question.
This newsgroup is for questions about language or syntax.
Thanks!
Susan Huffaker
Microsoft Developer Support


Fri, 09 May 2003 03:00:00 GMT  
 Determinig a machine's Physical Address (MAC Address)
Doug:

I apologize for the answer taking so long. To improve response times in the
future, questions regarding the Win32 API's should be placed in the
PlatformSDK group, and networking questions such as this one should be
placed in the Networking subgroup.

While there are several ways to obtain the MAC address of a local machine,
the NetBIOS method is actually the most reliable. It is also the only
method that works against a remote machine as well. The exact same code
used in Q118623 works to obtain the MAC address of a remote machine. Simply
replace the "*" with the NetBIOS name of the remote server.
--------------------
| Content-Class: urn:content-classes:message


| Subject: Determinig a machine's Physical Address (MAC Address)
| Date: Tue, 7 Nov 2000 14:28:49 -0800
| Lines: 24

| MIME-Version: 1.0
| Content-Type: text/plain;
|       charset="iso-8859-1"
| Content-Transfer-Encoding: quoted-printable
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
| Thread-Index: AcBJChnbYeJbkJUuRQuXupiQjOaCEw==
| Newsgroups: microsoft.public.vc.language
| NNTP-Posting-Host: cpmsftngxa03 127.0.0.1
| Path: cppssbbsa01.microsoft.com!cpmsftngxa01!cpmsftngxa03
| Xref: cppssbbsa01.microsoft.com microsoft.public.vc.language:119466
| X-Tomcat-NG: microsoft.public.vc.language
|
| 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?.
|



Fri, 16 May 2003 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Finding a machine's Physical Address

2. Obtaining physical memory address from virtual memory address?

3. How to get MAC address from IP Address

4. convert mac address to ip address

5. How can i get MAC Address by IP address in SCO UNIX C

6. IP address and Mac Address help!!!

7. MAC ADDRESS ie Ethernet Card Address

8. MAC Address from IP Address

9. Getting your machine's internet address

10. How can I use a function to get current machine's IP address

11. Q: How to get host machine's IP address

12. Physical Address

 

 
Powered by phpBB® Forum Software