Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Identifying real MAC address

Identifying real MAC address

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminhardwarejsontutorialquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nishad S
    wrote on last edited by
    #1

    Hi, How can we identify the valid hardware MAC address from the list obtained by GetAdaptersInfo API? For example, in my machine there is a real Network Adapter and a Microsoft Loopback Adapter. I need to get the MAC address of the real Network Adapter. Thanks in advance!

    - ns ami -

    L A 2 Replies Last reply
    0
    • N Nishad S

      Hi, How can we identify the valid hardware MAC address from the list obtained by GetAdaptersInfo API? For example, in my machine there is a real Network Adapter and a Microsoft Loopback Adapter. I need to get the MAC address of the real Network Adapter. Thanks in advance!

      - ns ami -

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      The documentation here[^] will explain it to you.

      txtspeak is the realm of 9 year old children, not developers. Christian Graus

      N 1 Reply Last reply
      0
      • N Nishad S

        Hi, How can we identify the valid hardware MAC address from the list obtained by GetAdaptersInfo API? For example, in my machine there is a real Network Adapter and a Microsoft Loopback Adapter. I need to get the MAC address of the real Network Adapter. Thanks in advance!

        - ns ami -

        A Offline
        A Offline
        Adam Roderick J
        wrote on last edited by
        #3

        I think you need NetWkstaTransportEnum([^]), it will out the MAC address buffer.

        Величие не Бога может быть недооценена.

        1 Reply Last reply
        0
        • L Lost User

          The documentation here[^] will explain it to you.

          txtspeak is the realm of 9 year old children, not developers. Christian Graus

          N Offline
          N Offline
          Nishad S
          wrote on last edited by
          #4

          Did I miss something??? :confused: If you mentioned about MIB_IF_TYPE_ETHERNET, it is coming same for both real hardware and microsoft loopback. Could you please clarify?

          - ns ami -

          L 1 Reply Last reply
          0
          • N Nishad S

            Did I miss something??? :confused: If you mentioned about MIB_IF_TYPE_ETHERNET, it is coming same for both real hardware and microsoft loopback. Could you please clarify?

            - ns ami -

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            What about MIB_IF_TYPE_LOOPBACK ?

            txtspeak is the realm of 9 year old children, not developers. Christian Graus

            N 1 Reply Last reply
            0
            • L Lost User

              What about MIB_IF_TYPE_LOOPBACK ?

              txtspeak is the realm of 9 year old children, not developers. Christian Graus

              N Offline
              N Offline
              Nishad S
              wrote on last edited by
              #6

              For both hardware adapter and Microsoft Loopback adapter, the type obtained is MIB_IF_TYPE_ETHERNET. Not MIB_IF_TYPE_LOOPBACK for Microsoft Loopback adapter. So I cannot distinguish which is the hardware adapter.

              - ns ami -

              L 1 Reply Last reply
              0
              • N Nishad S

                For both hardware adapter and Microsoft Loopback adapter, the type obtained is MIB_IF_TYPE_ETHERNET. Not MIB_IF_TYPE_LOOPBACK for Microsoft Loopback adapter. So I cannot distinguish which is the hardware adapter.

                - ns ami -

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                OK, I guess you will have to try something else. Sorry, a long time since I used this in anger.

                txtspeak is the realm of 9 year old children, not developers. Christian Graus

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups