| 1 | # WslcInstallWithDependencies |
| 2 | |
| 3 | ```c |
| 4 | STDAPI WslcInstallWithDependencies(_In_opt_ WslcInstallCallback progressCallback, _In_opt_ PVOID context); |
| 5 | ``` |
| 6 | |
| 7 | | Parameter | Type | Direction | |
| 8 | |---|---|---| |
| 9 | | `progressCallback` | `WslcInstallCallback` | in, optional | |
| 10 | | `context` | `PVOID` | in, optional | |
| 11 | |
| 12 | Return value: `HRESULT`. |
| 13 | |
| 14 | Header note: callbacks are only made for components actively installed by this call. That list can be acquired beforehand with [`WslcGetMissingComponents`](wslcgetmissingcomponents.md). |
| 15 | |
| 16 | Example: |
| 17 | |
| 18 | ```c |
| 19 | void CALLBACK OnInstallProgress( |
| 20 | WslcComponentFlags component, |
| 21 | uint32_t progressSteps, |
| 22 | uint32_t totalSteps, |
| 23 | PVOID context) |
| 24 | { |
| 25 | UNREFERENCED_PARAMETER(context); |
| 26 | printf("component=%u %u/%u\n", (unsigned)component, progressSteps, totalSteps); |
| 27 | } |
| 28 | |
| 29 | HRESULT hr = WslcInstallWithDependencies(OnInstallProgress, NULL); |
| 30 | ``` |
| 31 | |
| 32 | --- |