Skip to content

Latest commit

 

History

History
153 lines (110 loc) · 5.19 KB

nf-iphlpapi-lookuppersistentudpportreservation.md

File metadata and controls

153 lines (110 loc) · 5.19 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:iphlpapi.LookupPersistentUdpPortReservation
LookupPersistentUdpPortReservation function (iphlpapi.h)
Looks up the token for a persistent UDP port reservation for a consecutive block of TCP ports on the local computer.
LookupPersistentUdpPortReservation
LookupPersistentUdpPortReservation function [IP Helper]
iphlp.lookuppersistentudpportreservation
iphlpapi/LookupPersistentUdpPortReservation
iphlp\lookuppersistentudpportreservation.htm
IpHlp
621C732E-9A42-455C-A1A8-F1997D6EF0D7
12/05/2018
LookupPersistentUdpPortReservation, LookupPersistentUdpPortReservation function [IP Helper], iphlp.lookuppersistentudpportreservation, iphlpapi/LookupPersistentUdpPortReservation
iphlpapi.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
Iphlpapi.lib
Iphlpapi.dll
Windows
19H1
LookupPersistentUdpPortReservation
iphlpapi/LookupPersistentUdpPortReservation
c++
APIRef
kbSyntax
DllExport
Iphlpapi.dll
LookupPersistentUdpPortReservation

LookupPersistentUdpPortReservation function

-description

The LookupPersistentUdpPortReservation function looks up the token for a persistent UDP port reservation for a consecutive block of TCP ports on the local computer.

-parameters

-param StartPort [in]

The starting UDP port number in network byte order.

-param NumberOfPorts [in]

The number of UDP port numbers that were reserved.

-param Token [out]

A pointer to a port reservation token that is returned if the function succeeds.

-returns

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

Return code Description
ERROR_INVALID_PARAMETER
An invalid parameter was passed to the function. This error is returned if zero is passed in the StartPort or NumberOfPorts parameters.
ERROR_NOT_FOUND
The element was not found. This error is returned if persistent port block specified by the StartPort and NumberOfPorts parameters could not be found.
Other
Use FormatMessage to obtain the message string for the returned error.

-remarks

The LookupPersistentUdpPortReservation function is defined on Windows Vista and later.

The LookupPersistentUdpPortReservation function is used to lookup the token for a persistent reservation for a block of UDP ports.

A persistent reservation for a block of UDP ports is created by a call to the CreatePersistentUdpPortReservation function. The StartPort or NumberOfPorts parameters passed to the LookupPersistentUdpPortReservation function must match the values used when the persistent reservation for a block of TCP ports was created by the CreatePersistentUdpPortReservation function.

If the LookupPersistentUdpPortReservation function succeeds, the Token parameter returned will point to the token for the persistent port reservation for the block of UDP ports. Note that the token for a given persistent reservation for a block of TCP ports may change each time the system is restarted.

An application can request port assignments from the UDP port reservation by opening a UDP socket, then calling the WSAIoctl function specifying the SIO_ASSOCIATE_PORT_RESERVATION IOCTL and passing the reservation token before issuing a call to the bind function on the socket.

-see-also

CreatePersistentTcpPortReservation

CreatePersistentUdpPortReservation

DeletePersistentTcpPortReservation

DeletePersistentUdpPortReservation

LookupPersistentTcpPortReservation

SIO_ASSOCIATE_PORT_RESERVATION