InitializeUnicastIpAddressEntry function
The InitializeUnicastIpAddressEntry function initializes a MIB_UNICASTIPADDRESS_ROW structure with default values for a unicast IP address entry on a local computer.
Syntax
VOID NETIOAPI_API_ InitializeUnicastIpAddressEntry(
_Out_ PMIB_UNICASTIPADDRESS_ROW Row
);
Parameters
- Row [out]
On entry, a pointer to a MIB_UNICASTIPADDRESS_ROW structure entry for a unicast IP address entry. On return, the MIB_UNICASTIPADDRESS_ROW structure that this parameter points to is initialized with default values for a unicast IP address.
Return value
None
Remarks
Your driver must use the InitializeUnicastIpAddressEntry function to initialize the members of a MIB_UNICASTIPADDRESS_ROW structure entry with default values for a unicast IP address for later use with the CreateUnicastIpAddressEntry function.
On input, your driver must pass InitializeUnicastIpAddressEntry a new MIB_UNICASTIPADDRESS_ROW structure to initialize.
On output, the members of the MIB_UNICASTIPADDRESS_ROW structure that the Row parameter points to are initialized as follows.
PrefixOrigin
Set to the IpPrefixOriginUnchanged value of the NL_PREFIX_ORIGIN enumeration.SuffixOrigin
Set to the IpSuffixOriginUnchanged value of the NL_PREFIX_ORIGIN enumeration.OnLinkPrefixLength
Set to an illegal value.PreferredLifetime and ValidLifetime
Set to infinite values.SkipAsSource
Set to FALSE.All other members
Set to zero.
After a driver calls InitializeUnicastIpAddressEntry, the driver can then change the members in the MIB_UNICASTIPADDRESS_ROW entry that it wants to modify, and then call the CreateUnicastIpAddressEntry to add the new unicast IP address to the local computer.
Requirements
Target platform |
Universal |
Version |
Available in Windows Vista and later versions of the Windows operating systems. |
Header |
Netioapi.h (include Netioapi.h) |
Library |
Netio.lib |
IRQL |
< DISPATCH_LEVEL |