Description
Reserves a single port.
Syntax
HRESULT
WINAPI
HcnReserveGuestNetworkServicePort(
_In_ HCN_GUESTNETWORKSERVICE GuestNetworkService,
_In_ HCN_PORT_PROTOCOL Protocol,
_In_ HCN_PORT_ACCESS Access,
_In_ USHORT Port,
_Out_ HANDLE* PortReservationHandle
);
Parameters
GuestNetworkService
The HCN_GUESTNETWORKSERVICE for the reservation.
Protocol
The HCN_PORT_PROTOCOL for the reservation.
Access
The HCN_PORT_ACCESS for the reservation.
Port
The port for the reservation.
PortReservationHandle
Receives a handle. It is the responsibility of the caller to release the handle using HcnReleaseGuestNetworkServicePortReservationHandle once it is no longer in use.
Return Values
The function returns HRESULT.
Requirements
| Parameter | Description |
|---|---|
| Minimum supported client | Windows 10, version 1809 |
| Minimum supported server | Windows Server 2019 |
| Target Platform | Windows |
| Header | ComputeNetwork.h |
| Library | ComputeNetwork.lib |
| Dll | ComputeNetwork.dll |