次の方法で共有


CreateIpNetEntry (Compact 2013)

3/26/2014

This function creates an Address Resolution Protocol (ARP) entry in the ARP table on the local device.

Syntax

DWORD CreateIpNetEntry(
  PMIB_IPNETROW pArpEntry
);

Parameters

  • pArpEntry
    [in] Pointer to a MIB_IPNETROW structure that specifies information for the new entry. The caller must specify values for all members of this structure.

Return Value

Return code

Description

NO_ERROR (zero)

The function is successful.

ERROR_ACCESS_DENIED

Access is denied.

ERROR_INVALID_PARAMETER

An input parameter is invalid, no action was taken. This error is returned if the pArpEntry parameter is NULL, the dwPhysAddrLen member of MIB_IPNETROW is set to zero or a value greater than 8, the >dwAddr member of the MIB_IPNETROW structure is invalid, or one of the other members of the MIB_IPNETROW structure is invalid.

ERROR_NOT_SUPPORTED

The IPv4 transport is not configured on the local device.

Other

Use FormatMessage to obtain the message string for the returned error.

Remarks

To modify an existing ARP entry, use the SetIpNetEntry function. To retrieve the ARP table, call the GetIpNetTable function. To delete an existing ARP entry, call the DeleteIpNetEntry.

Requirements

Header

iphlpapi.h

Library

Iphlpapi.lib

See Also

Reference

IP Helper Functions
CreateProxyArpEntry
DeleteProxyArpEntry
FlushIpNetTable
GetIpNetTable
DeleteIpNetEntry
MIB_IPNETROW
SetIpNetEntry

Other Resources

IP Helper