MAC/physical address?

Discussion in 'ASP .Net Security' started by SJ, Jan 7, 2006.

  1. SJ

    SJ Guest

    I know I can use System.Management library, but it returns like 6 different
    values all
    of which look like MAC addresses. Which one do I pick and how do I identify
    it?
    ManagementClass oMClass = new ManagementClass
    ("Win32_NetworkAdapterConfiguration");

    ManagementObjectCollection colMObj = oMClass.GetInstances();

    foreach(ManagementObject objMO in colMObj)

    {

    if(objMO["MacAddress"] != null)

    MACAddress += objMO["MacAddress"].ToString();

    }
     
    SJ, Jan 7, 2006
    #1
    1. Advertising

  2. hi,

    i wrote a tool to configure your network adapter from the command line -
    this shows you how to retrieve the MAC address

    http://www.leastprivilege.com/UPDATEDIfconfigForWindows21.aspx

    ---------------------------------------
    Dominick Baier - DevelopMentor
    http://www.leastprivilege.com

    > I know I can use System.Management library, but it returns like 6
    > different
    > values all
    > of which look like MAC addresses. Which one do I pick and how do I
    > identify
    > it?
    > ManagementClass oMClass = new ManagementClass
    > ("Win32_NetworkAdapterConfiguration");
    > ManagementObjectCollection colMObj = oMClass.GetInstances();
    >
    > foreach(ManagementObject objMO in colMObj)
    >
    > {
    >
    > if(objMO["MacAddress"] != null)
    >
    > MACAddress += objMO["MacAddress"].ToString();
    >
    > }
    >
     
    Dominick Baier [DevelopMentor], Jan 7, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Verde

    Physical Location of IP Address

    Verde, Apr 10, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    3,341
    Steven Berkovitz
    Apr 10, 2005
  2. SJ

    MAC Address/Physical Address?

    SJ, Jan 7, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    552
  3. Krishna Sagiraju

    convert virtual address to physical address

    Krishna Sagiraju, Jul 10, 2004, in forum: C Programming
    Replies:
    3
    Views:
    1,246
    Malcolm
    Jul 10, 2004
  4. sushant

    virtual address or physical address?

    sushant, Feb 18, 2005, in forum: C Programming
    Replies:
    9
    Views:
    1,032
    CBFalconer
    Feb 18, 2005
  5. henry
    Replies:
    10
    Views:
    1,130
    Ben Bacarisse
    Feb 28, 2009
Loading...

Share This Page