| 1 | # WslcSetContainerSettingsVolumes |
| 2 | |
| 3 | ```c |
| 4 | STDAPI WslcSetContainerSettingsVolumes( |
| 5 | _In_ WslcContainerSettings* containerSettings, _In_reads_opt_(volumeCount) const WslcContainerVolume* volumes, _In_ uint32_t volumeCount); |
| 6 | ``` |
| 7 | |
| 8 | | Parameter | Type | Direction | |
| 9 | |---|---|---| |
| 10 | | `containerSettings` | `WslcContainerSettings*` | in | |
| 11 | | `volumes` | `const WslcContainerVolume*` | in, optional | |
| 12 | | `volumeCount` | `uint32_t` | in | |
| 13 | |
| 14 | Return value: `HRESULT`. |
| 15 | |
| 16 | Example: |
| 17 | |
| 18 | ```c |
| 19 | WslcContainerVolume volumes[1] = { 0 }; |
| 20 | volumes[0].windowsPath = L"C:\\data"; |
| 21 | volumes[0].containerPath = "/mnt/data"; |
| 22 | volumes[0].readOnly = FALSE; |
| 23 | |
| 24 | HRESULT hr = WslcSetContainerSettingsVolumes( |
| 25 | &containerSettings, |
| 26 | volumes, |
| 27 | (uint32_t)_countof(volumes)); |
| 28 | ``` |