View Adapter Information using GetAdaptersInfo

Environment: VC6, Windows NT SP 4 or later, Win 98 SE or later

Some applications being installed on a computer need a way to retrieve the unique information that globally identify the computer. I created a function to do this. My method is based on the MAC address of the network adapter as the computer identifier. The GetAdaptersInfo API function is used to get information from the network adapter. You'll need Microsoft Platform SDK to compile. Read MSDN to know how to install Platform SDK . The executable is included in the zip file.


Download source - 16 Kb


  • Delete instead of free ???

    Posted by FlyboyBart on 08/23/2005 03:23am

    Good article. Help me way ahead. Although, a little fault ? Change delete (pinfo) into free (pinfo) in function CViewAdapterInfoDlg::GetInfo(). This works much better.

  • How can i get url from client?

    Posted by nwadmin on 01/20/2005 10:25pm

    I have a Lan.I want to build a small program installing on the server(proxy server).It can catch all url (On web browser)from client when they surf web.What can i do ?(Using Java).

  • Cannot find Iphlapi.h ...

    Posted by Legacy on 02/23/2004 12:00am

    Originally posted by: Bdk

    Please can you mail me Iphlapi.h. If you have please mail me...

    Thank You

    • aa

      Posted by tarek1305 on 05/18/2005 01:07pm


  • Hi, install microsoft SDK and recomments code, it will work !

    Posted by Legacy on 12/23/2003 12:00am

    Originally posted by: mathabu

    in Iphlpapi.h

    // DWORD
    // WINAPI
    // GetIcmpStatisticsEx(
    // OUT PMIB_ICMP_EX pStats,
    // IN DWORD dwFamily
    // );

  • How can i get the virtual user-interface under win XP with MFC?

    Posted by Legacy on 12/18/2003 12:00am

    Originally posted by: mathabu

    like vmnet1 mnet8 oder other from mobile ip applikation

  • Needed Iphlpapi.h and Iphlpapi.lib files

    Posted by Legacy on 11/21/2003 12:00am

    Originally posted by: Abhijit

    I have downloaded the file but after compilation it asks for Iphlpapi.h and Iphlpapi.lib files.
    If u have got these files then can u please send it to me to my mail account.

  • Iphlpapi.h???

    Posted by Legacy on 06/12/2003 12:00am

    Originally posted by: vishwanath


    fatal error C1083: Cannot open include file: 'Iphlpapi.h': No such file or directory

  • How can see if network adapter is disabled ?

    Posted by Legacy on 05/22/2003 12:00am

    Originally posted by: Korven

    I want to detect if network adapter is enabled or disabled. How can i do this ??

  • Needed iphlpapi.h,batclass.h

    Posted by Legacy on 04/16/2003 12:00am

    Originally posted by: dileeprb

    need header files

  • ip address altered when cable disconnect,why?

    Posted by Legacy on 04/14/2003 12:00am

    Originally posted by: Hai

    ip address altered to when i pull rj45 out from the adapter ?but my Ip is fixed .

  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Moving from an on-premises environment to Office 365 does not remove the need to plan for disruptions or reduce the business risk requirements for protecting email services. If anything, some risks increase with a move to the cloud. Read how to ease the transition every business faces if considering or already migrating to cloud email. This white paper discusses: Setting expectations when migrating to Office 365 Understanding the implications of relying solely on Exchange Online security Necessary archiving …

  • Anthony Christie, the Chief Marketing Officer for Level Communications, is responsible for customer experience, worldwide marketing and product management. In this informative asset, he shares his insights into why a private network connection to cloud-bases applications is the right decision for your enterprise. Download now to find out more.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date