Back to Wsl

WslcInstallWithDependencies

doc/docs/api-reference/c/install-and-version-apis/wslcinstallwithdependencies.md

2.9.4865 B
Original Source

WslcInstallWithDependencies

c
STDAPI WslcInstallWithDependencies(_In_opt_ WslcInstallCallback progressCallback, _In_opt_ PVOID context);
ParameterTypeDirection
progressCallbackWslcInstallCallbackin, optional
contextPVOIDin, optional

Return value: HRESULT.

Header note: callbacks are only made for components actively installed by this call. That list can be acquired beforehand with WslcGetMissingComponents.

Example:

c
void CALLBACK OnInstallProgress(
    WslcComponentFlags component,
    uint32_t progressSteps,
    uint32_t totalSteps,
    PVOID context)
{
    UNREFERENCED_PARAMETER(context);
    printf("component=%u %u/%u\n", (unsigned)component, progressSteps, totalSteps);
}

HRESULT hr = WslcInstallWithDependencies(OnInstallProgress, NULL);