| 1 | # WslcCreateContainer |
| 2 | |
| 3 | ```c |
| 4 | STDAPI WslcCreateContainer(_In_ WslcSession session, _In_ const WslcContainerSettings* containerSettings, _Out_ WslcContainer* container, _Outptr_opt_result_z_ PWSTR* errorMessage); |
| 5 | ``` |
| 6 | |
| 7 | | Parameter | Type | Direction | |
| 8 | |---|---|---| |
| 9 | | `session` | `WslcSession` | in | |
| 10 | | `containerSettings` | `const WslcContainerSettings*` | in | |
| 11 | | `container` | `WslcContainer*` | out | |
| 12 | | `errorMessage` | `PWSTR*` | out, optional | |
| 13 | |
| 14 | Return value: `HRESULT`. |
| 15 | |
| 16 | Example: |
| 17 | |
| 18 | ```c |
| 19 | WslcContainer container = NULL; |
| 20 | HRESULT hr = WslcCreateContainer(session, &containerSettings, &container, NULL); |
| 21 | ``` |