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. Hardware & Devices
  4. NO. of Ethernet port and No.of configured NIC

NO. of Ethernet port and No.of configured NIC

Scheduled Pinned Locked Moved Hardware & Devices
jsonhelptutorialquestion
12 Posts 4 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.
  • S Offline
    S Offline
    Sonani Prakash
    wrote on last edited by
    #1

    Hi Anybody having idea how to detect the no. of ethernet port and no. of configured NIC cards in to computer. any api calls help ? Please write your views on this.

    sonani prakash

    O 1 Reply Last reply
    0
    • S Sonani Prakash

      Hi Anybody having idea how to detect the no. of ethernet port and no. of configured NIC cards in to computer. any api calls help ? Please write your views on this.

      sonani prakash

      O Offline
      O Offline
      originSH
      wrote on last edited by
      #2

      WMI is always good for retriving this sort of stuff.

      S 1 Reply Last reply
      0
      • O originSH

        WMI is always good for retriving this sort of stuff.

        S Offline
        S Offline
        Sonani Prakash
        wrote on last edited by
        #3

        Thanks for pointing out. But currenlty I am thing i can first get the adaptor information and then can see if it is ethernet adaptor or not.. but how to find whether it' is ethernet adapter or wirless adaptor or any other.. Is there any way to get from this adaptor that it is 802.3 standard adaptor or 802.11 for wirless. Thanks in advance.

        sonani prakash

        D 1 Reply Last reply
        0
        • S Sonani Prakash

          Thanks for pointing out. But currenlty I am thing i can first get the adaptor information and then can see if it is ethernet adaptor or not.. but how to find whether it' is ethernet adapter or wirless adaptor or any other.. Is there any way to get from this adaptor that it is 802.3 standard adaptor or 802.11 for wirless. Thanks in advance.

          sonani prakash

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Again, WMI and the Win32_NetworkAdapter class. You can get the configurations with the Win32_NetworkAdapterConfiguration class. Search for those two classes on MSDN.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          S 1 Reply Last reply
          0
          • D Dave Kreskowiak

            Again, WMI and the Win32_NetworkAdapter class. You can get the configurations with the Win32_NetworkAdapterConfiguration class. Search for those two classes on MSDN.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007

            S Offline
            S Offline
            Sonani Prakash
            wrote on last edited by
            #5

            Thanks, Yes I have been working on this still it does not say media type.. I want to find out specific difference between ehternet adapter card and wirless ethernet card... mean to say in my machin if i have lot's of types of adapter installed and I want only ethernet specific adaptors. I am looking into currently DeviceIoControl..

            sonani prakash

            D 1 Reply Last reply
            0
            • S Sonani Prakash

              Thanks, Yes I have been working on this still it does not say media type.. I want to find out specific difference between ehternet adapter card and wirless ethernet card... mean to say in my machin if i have lot's of types of adapter installed and I want only ethernet specific adaptors. I am looking into currently DeviceIoControl..

              sonani prakash

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              Sonani Prakash wrote:

              Yes I have been working on this still it does not say media type.. I want to find out specific difference between ehternet adapter card and wirless ethernet card...

              Apparently "MediaType" is all you looked for. It's the AdapterType field in the Win32_NetworkAdapter class.

              Sonani Prakash wrote:

              I am looking into currently DeviceIoControl..

              You're wasting your time.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007

              O S 3 Replies Last reply
              0
              • D Dave Kreskowiak

                Sonani Prakash wrote:

                Yes I have been working on this still it does not say media type.. I want to find out specific difference between ehternet adapter card and wirless ethernet card...

                Apparently "MediaType" is all you looked for. It's the AdapterType field in the Win32_NetworkAdapter class.

                Sonani Prakash wrote:

                I am looking into currently DeviceIoControl..

                You're wasting your time.

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                     2006, 2007

                O Offline
                O Offline
                originSH
                wrote on last edited by
                #7

                It's amazing how people don't even take the time to do a little investigation :O It'd take a couple of minutes at most to find out what was needed even from my threadbare answer of 'WMI' :/

                D 1 Reply Last reply
                0
                • D Dave Kreskowiak

                  Sonani Prakash wrote:

                  Yes I have been working on this still it does not say media type.. I want to find out specific difference between ehternet adapter card and wirless ethernet card...

                  Apparently "MediaType" is all you looked for. It's the AdapterType field in the Win32_NetworkAdapter class.

                  Sonani Prakash wrote:

                  I am looking into currently DeviceIoControl..

                  You're wasting your time.

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                       2006, 2007

                  S Offline
                  S Offline
                  Sonani Prakash
                  wrote on last edited by
                  #8

                  See the problem is AdapterType field is not showing me seperation of wirless card and ethernet network adatper card. second thing is Media type into registry is only supported for XP OS it's not there even for vista also... That's y still struggling in finding no. of ehternet network card adapter(this should not be wirless ethernet card or dialup card or any othercard..) I want it should support 802.3 stadards..

                  sonani prakash

                  D 1 Reply Last reply
                  0
                  • D Dave Kreskowiak

                    Sonani Prakash wrote:

                    Yes I have been working on this still it does not say media type.. I want to find out specific difference between ehternet adapter card and wirless ethernet card...

                    Apparently "MediaType" is all you looked for. It's the AdapterType field in the Win32_NetworkAdapter class.

                    Sonani Prakash wrote:

                    I am looking into currently DeviceIoControl..

                    You're wasting your time.

                    A guide to posting questions on CodeProject[^]
                    Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                         2006, 2007

                    S Offline
                    S Offline
                    Sonani Prakash
                    wrote on last edited by
                    #9

                    Medea type is only suported for xp and second thing adapter type does not give any seperation for wirless and ethernet network adapter card. so i want only no. of ehternet network cards.

                    sonani prakash

                    Z 1 Reply Last reply
                    0
                    • S Sonani Prakash

                      See the problem is AdapterType field is not showing me seperation of wirless card and ethernet network adatper card. second thing is Media type into registry is only supported for XP OS it's not there even for vista also... That's y still struggling in finding no. of ehternet network card adapter(this should not be wirless ethernet card or dialup card or any othercard..) I want it should support 802.3 stadards..

                      sonani prakash

                      D Offline
                      D Offline
                      Dave Kreskowiak
                      wrote on last edited by
                      #10

                      Sonani Prakash wrote:

                      See the problem is AdapterType field is not showing me seperation of wirless card and ethernet network adatper card.

                      Yes, it does. The possible values for AdapterType are (taken straight out of the documentation!): "Ethernet 802.3" "Token Ring 802.5" "Fiber Distributed Data Interface (FDDI)" "Wide Area Network (WAN)" "LocalTalk" "Ethernet using DIX header format" "ARCNET" "ARCNET (878.2)" "ATM" "Wireless" "Infrared Wireless" "Bpc" "CoWan" "1394" Now, if your network adapter does NOT put the correct adapter type into the WMI Provider, it's the fault of your cards manufacturer.

                      A guide to posting questions on CodeProject[^]
                      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                           2006, 2007

                      1 Reply Last reply
                      0
                      • O originSH

                        It's amazing how people don't even take the time to do a little investigation :O It'd take a couple of minutes at most to find out what was needed even from my threadbare answer of 'WMI' :/

                        D Offline
                        D Offline
                        Dave Kreskowiak
                        wrote on last edited by
                        #11

                        <shrug>I know! :confused:</shrug>

                        A guide to posting questions on CodeProject[^]
                        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                             2006, 2007

                        1 Reply Last reply
                        0
                        • S Sonani Prakash

                          Medea type is only suported for xp and second thing adapter type does not give any seperation for wirless and ethernet network adapter card. so i want only no. of ehternet network cards.

                          sonani prakash

                          Z Offline
                          Z Offline
                          Zoltan Balazs
                          wrote on last edited by
                          #12

                          Search for the IP Helper Api's.

                          Network integrated solutions A practical use of the MVC pattern

                          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