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