大网数据广告活动
网络与域名解析

Getting Started with IP Helper

· 52CE 我爱测

The following is a step-by-step guide to getting started programming using the IP Helper application programming interface (API). It is designed to provide an understanding of basic IP Helper functions and data structures, and how they work together.

The following is a step-by-step guide to getting started programming using the IP Helper application programming interface (API). It is designed to provide an understanding of basic IP Helper functions and data structures, and how they work together.

The application that is used for illustration is a very basic IP Helper application. More advanced code examples are included in the samples included with the Microsoft Windows Software Development Kit (SDK).

The first step is the same for most IP Helper applications.

The following sections describe the remaining steps for creating this basic IP Helper application.

The complete source code for this basic IP Helper example.

Advanced IP Helper Samples

Several more advanced IP Helper samples are included with the Microsoft Windows Software Development Kit (SDK). By default, the IP Helper sample source code is installed by the Windows SDK released for Windows 7 in the following directory:

C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\NetDs\IPHelp

The more advanced samples listed below are found in the following directories:

  • EnableRouter

    This directory contains a sample that demonstrates how to use the EnableRouter and UnenableRouter IP Helper functions to enable and disable IPv4 forwarding on the local computer.

  • iparp

    This directory contains a sample program that demonstrates how to use the IP Helper functions to display and manipulate entries in the IPv4 ARP table on the local computer.

  • ipchange

    This directory contains a sample program that demonstrates how to use IP Helper functions to programmatically change an IP address for a specific network adapter on your machine. This program also demonstrates how to retrieve existing network adapter IP configuration information.

  • IPConfig

    This directory contains a sample program that demonstrates how to programmatically retrieve IPv4 configuration information similar to the IPCONFIG.EXE utility. It demonstrates how to use the GetNetworkParams and GetAdaptersInfo functions. Note that the GetAdaptersInfo function only retrieves IPv4 information.

  • IPRenew

    This directory contains a sample program that demonstrates how to programmatically release and renew IPv4 addresses obtained through DHCP. This program also demonstrates how to retrieve existing network adapter configuration information.

  • IPRoute

    This directory contains a sample program that demonstrates how to use the IP Helper functions to manipulate the IPv4 routing table.

  • ipstat

    This directory contains a sample program that demonstrates how to use the IP Helper functions to show IPv4 connections for a protocol. By default, statistics are shown for IP, ICMP, TCP and UDP.

  • Netinfo

    This directory contains a sample program that demonstrates how to the use the new IP Helper APIs introduced on Windows Vista and later to display/change address and interface information for IPv4 and IPv6.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。