Back to Wsl

WslcGetContainerID

doc/docs/api-reference/c/container-apis/wslcgetcontainerid.md

2.9.4491 B
Original Source

WslcGetContainerID

c
STDAPI WslcGetContainerID(_In_ WslcContainer container, _Out_writes_(WSLC_CONTAINER_ID_BUFFER_SIZE) CHAR containerID[WSLC_CONTAINER_ID_BUFFER_SIZE]);
ParameterTypeDirection
containerWslcContainerin
containerIDCHAR[WSLC_CONTAINER_ID_BUFFER_SIZE]out

Return value: HRESULT.

Example:

c
CHAR containerID[WSLC_CONTAINER_ID_BUFFER_SIZE] = { 0 };
HRESULT hr = WslcGetContainerID(container, containerID);