Microsoft KB Archive/199749

{|
 * width="100%"|

INFO: AddIPAddress and DeleteIPAddress in IP Helper APIs

 * }

Q199749

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK)
 * Microsoft Windows NT Server version 4.0
 * Microsoft Windows NT Workstation version 4.0

-

SUMMARY
As stated in the documentation of Microsoft Platform SDK for Windows NT 5.0 Beta 2 Edition, AddIPAddress and DeleteIPAddress of the IP Helper APIs are available on Windows NT 5.0 or later. However, these two APIs also work on Windows NT 4.0 with Service Pack 4 or later as long as the Routing and Remote Access Service is not running. If Routing and Remote Access Service is running on Windows NT 4.0 with Service Pack 4, AddIPAddress and DeleteIPAddress return ERROR_NOT_SUPPORT.

MORE INFORMATION
You can use the following steps to add or delete an IP address to an adapter interface:


 * 1) Use GetIfTable to get the index of the adapter interface.
 * 2) Use AddIPAddress to add your IP address to your interested interface index. A context number associated with this added entry is returned in one of the out parameters.
 * 3) Use DeleteIPAddress and the returned context number to delete the added IP address entry.

However, it should be noted that you cannot use DeleteIPAddress to delete the original IP address assigned to an adapter interface under Windows NT 4.0 with Service Pack 4. This is because the context number associated with the original IP address can only be retrieved by GetAdaptersInfo API and this API is not supported on Windows NT 4.0.

Additional query words: IP Helper ERROR_NOT_SUPPORTED GetIfTable AddIPAddress DeleteIPAddress

Keywords : kbOSWinNT400 kbSDKPlatform

Issue type : kbinfo

Technology : kbWinNTsearch kbWinNTWsearch kbWinNTW400 kbWinNTW400search kbWinNT400xsearch kbWinNTSsearch kbWinNTS400xsearch kbWinNTS400 kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch