IP Helper API Programming [VC++]

This page illustrates how to use the IP Helper API by showing simple sample codes. IP Helper API is an API for writing networking related codes on Windows platform. Using IP Helper API, you can get information about network interfaces, get network statistics, setup IP address, etc.

Please be ware that the data transmission itself is out of scope of IP Helper API. It is done by winsock.

Preparing IPHLPAPI(IP Helper API)

To use IP Helper API, you would have to install the Platform SDK. You can download Platform SDK from microsoft site.

After you downloaded Platform SDK, you need two more steps to compile IP Helper API codes. First, you would have to include iphlpapi.h somewhere in your code. Next, you would have to link two libraries, WS2_32.lib (winsock2) and iphlpapi.lib.

After you finished preparing, you can start writing your code.


Programming using IPHLPAPI

Getting Interface Information

IP address information from network interface

DNS information

ARP information

writing a ping program

IP address change notification

RTT and Hop Count

Getting IP statistics

Getting TCP statistics

Getting UDP statistics

Getting TCP state list

Getting UDP state list

Releasing DHCP oriented IP address

Renewing IP address using DHCP

Changing default IP TTL


IP Helper API functions


Related Information

winsock programming
Winsock API enables you to write a networking code on Windows. This page illustrates winsock programming using simple sample codes.

  

Copyright (C) GeekPage.JP. All rights reserved.