Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Description
Creates a network.
Syntax
HRESULT
WINAPI
HcnCreateNetwork(
_In_ REFGUID Id,
_In_ PCWSTR Settings,
_Out_ PHCN_NETWORK Network,
_Outptr_opt_ PWSTR* ErrorRecord
);
Parameters
Network
Network for the new network.
Id
Id for the new network.
Settings
JSON document specifying the settings of the HostComputeNetwork.
Network
Receives a handle to the newly created network. It is the responsibility of the caller to release the handle using HcnCloseNetwork 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 |