Skip to content

Latest commit

 

History

History
85 lines (68 loc) · 1.7 KB

nf-isolatedapplauncher-iisolatedprocesslauncher-getcontainerguid.md

File metadata and controls

85 lines (68 loc) · 1.7 KB
UID tech.root title ms.date targetos description prerelease req.assembly req.construct-type req.ddi-compliance req.dll req.header req.idl req.include-header req.irql req.kmdf-ver req.lib req.max-support req.namespace req.redist req.target-min-winverclnt req.target-min-winversvr req.target-type req.type-library req.umdf-ver req.unicode-ansi topic_type api_type api_location api_name f1_keywords dev_langs helpviewer_keywords
NF:isolatedapplauncher.IIsolatedProcessLauncher.GetContainerGuid
winprog
IIsolatedProcessLauncher::GetContainerGuid (isolatedapplauncher.h)
07/24/2023
Windows
Returns the container/VM ID.
false
function
isolatedapplauncher.h
apiref
COM
isolatedapplauncher.h
IIsolatedProcessLauncher::GetContainerGuid
IIsolatedProcessLauncher::GetContainerGuid
isolatedapplauncher/IIsolatedProcessLauncher::GetContainerGuid
c++
GetContainerGuid

-description

Returns the container/VM Id.

-parameters

-param guid

The container/VM Id.

-returns

Returns an HRESULT success or error code.

-remarks

Warning

This is a deprecated API.

The guid (container Id) is a parameter needed to open hvsocket communication from host to container.

This call will fail if the container hasn't been created yet.

Examples

The following example shows how to use the GetContainerGuid method.

wil::com_ptr<IIsolatedProcessLauncher> isolatedProcessLauncher;

THROW_IF_FAILED(CoCreateInstance(
    CLSID_IsolatedAppLauncher,
    NULL,
    CLSCTX_LOCAL_SERVER,
    IID_PPV_ARGS(&isolatedProcessLauncher)));

GUID containerId;
THROW_IF_FAILED(isolatedProcessLauncher->GetContainerGuid(&containerId));

-see-also