Edit

HcnCreateLoadBalancer

Description

Creates a load balancer.

Syntax

HRESULT
WINAPI
HcnCreateLoadBalancer(
    _In_ REFGUID Id,
    _In_ PCWSTR Settings,
    _Out_ PHCN_LOADBALANCER LoadBalancer,
    _Outptr_opt_ PWSTR* ErrorRecord
    );

Parameters

Id

Id for the new load balancer.

Settings

JSON document specifying the settings of the load balancer.

LoadBalancer

Receives a handle to the newly created load balancer. It is the responsibility of the caller to release the handle using HcnCloseLoadBalancer once it is no longer in use.

ErrorRecord

Receives a JSON document with extended errorCode information. The caller must release the buffer using CoTaskMemFree.

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