AddIPAddress (Windows CE 5.0)

Send Feedback

This function adds the specified IP address to the specified adapter.

DWORD AddIPAddress(IPAddr Address,IPMask IpMask,DWORD IfIndex,PULONG NTEContext,PULONG NTEInstance);

Parameters

  • Address
    [in] The IP address to add to the adapter.
  • IpMask
    [in] The subnet mask for the IP address.
  • IfIndex
    [in] The adapter to which to add the address.
  • NTEContext
    [out] Pointer to the Net Table Entry (NTE) context for this IP address. The caller can later use this context in a call to DeleteIPAddress.
  • NTEInstance
    [out] Pointer to the NTE instance for this IP address.

Return Values

Returns NO_ERROR if successful. If the function fails, it returns an error code. For a complete list of error codes, see Error Values or the SDK header file Winerror.h.

Remarks

To convert the IPAddr value to the a.b.c.d string form of an IP address, map the high-order byte to a, the low-order byte to d, and so on. IPMask uses the same format as IPAddr.

The IP address and the subnet mask values are in big endian format.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Iphlpapi.h.
Link Library: Iphlpapi.lib.

See Also

IP Helper Functions | DeleteIPAddress | GetAdapterIndex

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.