473,471 Members | 1,905 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Retrieving the MAC address?

We currently use a method for retrieving a MAC address in which we use
the "SendARP" method from the "iphlpapi.dll" library.

As we have understod it, this method is actually deprecated, and
unstable. So the question is:

How do we retrieve the MAC address for any or all NIC on a PC?
And do we make sure that it is correct?
How do we make it work, even if disconnected from a network?

If there isn't a NIC available, there is of course no MAC address, but
any modern computer has a NIC as default, so we're not worried about
not having a NIC available.

We are currently using C# 1.1, but will switch to 2.0 when released.

TYI

--
Thomas Due
Posted with XanaNews version 1.17.5.9

"The visionary lies to himself, the liar only to others."
-- Friedrich Nietzsche
Nov 17 '05 #1
1 2100
Hi Thomas.

(1) How do we retrieve the MAC address for any or all NIC on a PC?
http://www.codeproject.com/csharp/Ho...in_Network.asp - for all NIC
on a PC and Network
http://msdn2.microsoft.com/library/x...us,vs.80).aspx -Supported in
Framework 2.0 [ MSDN2 - for VS 2005 beta]

(2) And do we make sure that it is correct?
Through Network command...
Run > cmd > type ipconfig/all [ this you can use it for checking or
verification]

(3) How do we make it work, even if disconnected from a network?
I tried and checked its not working....i mean i disabled my LAN and tried
IPCONFIG /All - so no idea about this more

Reply me if you want anything specifically in MAC.

Maheshkumar.R
http://spaces.msn.com/members/cyberiafreak

"Thomas Due" <tdue@mail_remove_.dk> wrote in message
news:uI**************@TK2MSFTNGP12.phx.gbl...
We currently use a method for retrieving a MAC address in which we use
the "SendARP" method from the "iphlpapi.dll" library.

As we have understod it, this method is actually deprecated, and
unstable. So the question is:

How do we retrieve the MAC address for any or all NIC on a PC?
And do we make sure that it is correct?
How do we make it work, even if disconnected from a network?

If there isn't a NIC available, there is of course no MAC address, but
any modern computer has a NIC as default, so we're not worried about
not having a NIC available.

We are currently using C# 1.1, but will switch to 2.0 when released.

TYI

--
Thomas Due
Posted with XanaNews version 1.17.5.9

"The visionary lies to himself, the liar only to others."
-- Friedrich Nietzsche

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: codewarr2000 | last post by:
Having problem with retrieving a class instance item from a Vector. This is the result of the code below. Also a weird note: If I dont declare as: TYPE_VECTOR_BANKED_MEMORY_DATA...
4
by: Andy | last post by:
Hi all, In a recent intranet project, I want to limit the access to my mobile asp.net appl only to a set of authorized MAC addresses by determining client's MAC address. Is there any way to...
2
by: Sven Wynsberghe | last post by:
Like the topic states, is there any way I can get the ip-adress of my computer with a vb.net application? thanks for the help :)
3
by: Navodit | last post by:
Hi I have a very basic question regd retrieving information from website using a scripting language: Basically I am working on the development of a database where a user enters an address...
2
by: 4Ankit | last post by:
hello all, i am having some difficulty retrieving information from my form. I want to add content in my table but the content i want to add to the table is what the user inputs in my form. ...
6
by: Nicolas Noakes | last post by:
Hello, I would like to convert to following process to code. Any advice is welcome. I have a hardware device which requires the this procedure to set it's IP address. First create an static...
9
ADezii
by: ADezii | last post by:
One question which pops up frequently here at TheScripts is: 'How do I retrieve data from a Recordset once I've created it?' One very efficient, and not that often used approach, is the GetRows()...
3
ADezii
by: ADezii | last post by:
Last Tip, we demonstrated the technique for retrieving data from a DAO Recordset, and placing it into a 2-dimensional Array using the GetRows() Method. This week, we will cover the same exact Method...
34
by: vpriya6 | last post by:
Hi guys, I am new to Ajax, xml and javascript. I want to know how can I retrieve data from xml and display in the html page? please help me out. suppose my xml file is customer.xml the code...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.