mxc-sdk 1.0.0

Importable library for starting MXC sandboxes in-process, with streaming stdio.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
/* automatically generated by rust-bindgen 0.72.1 */

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
//
// @generated by scripts/generate-wslc-bindings.ps1 from the WSLC SDK header
// (Microsoft.WSL.Containers wslcsdk.h). DO NOT EDIT BY HAND -- re-run the
// script after bumping WSLC_SDK_VERSION in build/build_wslc_common.rs
// and commit the result.
#![allow(
    non_snake_case,
    non_camel_case_types,
    non_upper_case_globals,
    dead_code
)]
#![allow(clippy::all)]

pub const WSLC_E_BASE: u32 = 1536;
pub const WSLC_SESSION_OPTIONS_SIZE: u32 = 72;
pub const WSLC_SESSION_OPTIONS_ALIGNMENT: u32 = 8;
pub const WSLC_CONTAINER_OPTIONS_SIZE: u32 = 104;
pub const WSLC_CONTAINER_OPTIONS_ALIGNMENT: u32 = 8;
pub const WSLC_CONTAINER_PROCESS_OPTIONS_SIZE: u32 = 72;
pub const WSLC_CONTAINER_PROCESS_OPTIONS_ALIGNMENT: u32 = 8;
pub const WSLC_CONTAINER_ID_BUFFER_SIZE: u32 = 65;
pub const WSLC_IMAGE_NAME_LENGTH: u32 = 256;
pub type wchar_t = ::std::os::raw::c_ushort;
pub type USHORT = ::std::os::raw::c_ushort;
pub type BOOL = ::std::os::raw::c_int;
pub type BYTE = ::std::os::raw::c_uchar;
pub type INT32 = ::std::os::raw::c_int;
pub type PINT32 = *mut ::std::os::raw::c_int;
pub type PVOID = *mut ::std::os::raw::c_void;
pub type CHAR = ::std::os::raw::c_char;
pub type WCHAR = wchar_t;
pub type PWSTR = *mut WCHAR;
pub type PCWSTR = *const WCHAR;
pub type PSTR = *mut CHAR;
pub type PCSTR = *const CHAR;
pub type HANDLE = *mut ::std::os::raw::c_void;
pub type HRESULT = ::std::os::raw::c_long;
pub type ADDRESS_FAMILY = USHORT;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sockaddr_storage {
    pub ss_family: ADDRESS_FAMILY,
    pub __ss_pad1: [CHAR; 6usize],
    pub __ss_align: ::std::os::raw::c_longlong,
    pub __ss_pad2: [CHAR; 112usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of sockaddr_storage"][::std::mem::size_of::<sockaddr_storage>() - 128usize];
    ["Alignment of sockaddr_storage"][::std::mem::align_of::<sockaddr_storage>() - 8usize];
    ["Offset of field: sockaddr_storage::ss_family"]
        [::std::mem::offset_of!(sockaddr_storage, ss_family) - 0usize];
    ["Offset of field: sockaddr_storage::__ss_pad1"]
        [::std::mem::offset_of!(sockaddr_storage, __ss_pad1) - 2usize];
    ["Offset of field: sockaddr_storage::__ss_align"]
        [::std::mem::offset_of!(sockaddr_storage, __ss_align) - 8usize];
    ["Offset of field: sockaddr_storage::__ss_pad2"]
        [::std::mem::offset_of!(sockaddr_storage, __ss_pad2) - 16usize];
};
#[repr(C)]
#[repr(align(8))]
#[derive(Debug, Copy, Clone)]
pub struct WslcSessionSettings {
    pub _opaque: [BYTE; 72usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcSessionSettings"][::std::mem::size_of::<WslcSessionSettings>() - 72usize];
    ["Alignment of WslcSessionSettings"][::std::mem::align_of::<WslcSessionSettings>() - 8usize];
    ["Offset of field: WslcSessionSettings::_opaque"]
        [::std::mem::offset_of!(WslcSessionSettings, _opaque) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcSession__ {
    pub unused: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcSession__"][::std::mem::size_of::<WslcSession__>() - 4usize];
    ["Alignment of WslcSession__"][::std::mem::align_of::<WslcSession__>() - 4usize];
    ["Offset of field: WslcSession__::unused"]
        [::std::mem::offset_of!(WslcSession__, unused) - 0usize];
};
pub type WslcSession = *mut WslcSession__;
#[repr(C)]
#[repr(align(8))]
#[derive(Debug, Copy, Clone)]
pub struct WslcContainerSettings {
    pub _opaque: [BYTE; 104usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcContainerSettings"][::std::mem::size_of::<WslcContainerSettings>() - 104usize];
    ["Alignment of WslcContainerSettings"]
        [::std::mem::align_of::<WslcContainerSettings>() - 8usize];
    ["Offset of field: WslcContainerSettings::_opaque"]
        [::std::mem::offset_of!(WslcContainerSettings, _opaque) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcContainer__ {
    pub unused: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcContainer__"][::std::mem::size_of::<WslcContainer__>() - 4usize];
    ["Alignment of WslcContainer__"][::std::mem::align_of::<WslcContainer__>() - 4usize];
    ["Offset of field: WslcContainer__::unused"]
        [::std::mem::offset_of!(WslcContainer__, unused) - 0usize];
};
pub type WslcContainer = *mut WslcContainer__;
#[repr(C)]
#[repr(align(8))]
#[derive(Debug, Copy, Clone)]
pub struct WslcProcessSettings {
    pub _opaque: [BYTE; 72usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcProcessSettings"][::std::mem::size_of::<WslcProcessSettings>() - 72usize];
    ["Alignment of WslcProcessSettings"][::std::mem::align_of::<WslcProcessSettings>() - 8usize];
    ["Offset of field: WslcProcessSettings::_opaque"]
        [::std::mem::offset_of!(WslcProcessSettings, _opaque) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcProcess__ {
    pub unused: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcProcess__"][::std::mem::size_of::<WslcProcess__>() - 4usize];
    ["Alignment of WslcProcess__"][::std::mem::align_of::<WslcProcess__>() - 4usize];
    ["Offset of field: WslcProcess__::unused"]
        [::std::mem::offset_of!(WslcProcess__, unused) - 0usize];
};
pub type WslcProcess = *mut WslcProcess__;
impl WslcContainerNetworkingMode {
    pub const WSLC_CONTAINER_NETWORKING_MODE_NONE: WslcContainerNetworkingMode =
        WslcContainerNetworkingMode(0);
    pub const WSLC_CONTAINER_NETWORKING_MODE_BRIDGED: WslcContainerNetworkingMode =
        WslcContainerNetworkingMode(1);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct WslcContainerNetworkingMode(pub ::std::os::raw::c_int);
impl WslcVhdType {
    pub const WSLC_VHD_TYPE_DYNAMIC: WslcVhdType = WslcVhdType(0);
    pub const WSLC_VHD_TYPE_FIXED: WslcVhdType = WslcVhdType(1);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct WslcVhdType(pub ::std::os::raw::c_int);
impl WslcVhdRequirementsFlags {
    pub const WSLC_VHD_REQ_FLAG_NONE: WslcVhdRequirementsFlags = WslcVhdRequirementsFlags(0);
    pub const WSLC_VHD_REQ_FLAG_OWNER: WslcVhdRequirementsFlags = WslcVhdRequirementsFlags(1);
}
impl ::std::ops::BitOr<WslcVhdRequirementsFlags> for WslcVhdRequirementsFlags {
    type Output = Self;
    #[inline]
    fn bitor(self, other: Self) -> Self {
        WslcVhdRequirementsFlags(self.0 | other.0)
    }
}
impl ::std::ops::BitOrAssign for WslcVhdRequirementsFlags {
    #[inline]
    fn bitor_assign(&mut self, rhs: WslcVhdRequirementsFlags) {
        self.0 |= rhs.0;
    }
}
impl ::std::ops::BitAnd<WslcVhdRequirementsFlags> for WslcVhdRequirementsFlags {
    type Output = Self;
    #[inline]
    fn bitand(self, other: Self) -> Self {
        WslcVhdRequirementsFlags(self.0 & other.0)
    }
}
impl ::std::ops::BitAndAssign for WslcVhdRequirementsFlags {
    #[inline]
    fn bitand_assign(&mut self, rhs: WslcVhdRequirementsFlags) {
        self.0 &= rhs.0;
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct WslcVhdRequirementsFlags(pub ::std::os::raw::c_int);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcVhdRequirements {
    pub name: PCSTR,
    pub sizeBytes: u64,
    pub type_: WslcVhdType,
    pub flags: WslcVhdRequirementsFlags,
    pub uid: u32,
    pub gid: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcVhdRequirements"][::std::mem::size_of::<WslcVhdRequirements>() - 32usize];
    ["Alignment of WslcVhdRequirements"][::std::mem::align_of::<WslcVhdRequirements>() - 8usize];
    ["Offset of field: WslcVhdRequirements::name"]
        [::std::mem::offset_of!(WslcVhdRequirements, name) - 0usize];
    ["Offset of field: WslcVhdRequirements::sizeBytes"]
        [::std::mem::offset_of!(WslcVhdRequirements, sizeBytes) - 8usize];
    ["Offset of field: WslcVhdRequirements::type_"]
        [::std::mem::offset_of!(WslcVhdRequirements, type_) - 16usize];
    ["Offset of field: WslcVhdRequirements::flags"]
        [::std::mem::offset_of!(WslcVhdRequirements, flags) - 20usize];
    ["Offset of field: WslcVhdRequirements::uid"]
        [::std::mem::offset_of!(WslcVhdRequirements, uid) - 24usize];
    ["Offset of field: WslcVhdRequirements::gid"]
        [::std::mem::offset_of!(WslcVhdRequirements, gid) - 28usize];
};
impl WslcSessionFeatureFlags {
    pub const WSLC_SESSION_FEATURE_FLAG_NONE: WslcSessionFeatureFlags = WslcSessionFeatureFlags(0);
    pub const WSLC_SESSION_FEATURE_FLAG_ENABLE_GPU: WslcSessionFeatureFlags =
        WslcSessionFeatureFlags(4);
}
impl ::std::ops::BitOr<WslcSessionFeatureFlags> for WslcSessionFeatureFlags {
    type Output = Self;
    #[inline]
    fn bitor(self, other: Self) -> Self {
        WslcSessionFeatureFlags(self.0 | other.0)
    }
}
impl ::std::ops::BitOrAssign for WslcSessionFeatureFlags {
    #[inline]
    fn bitor_assign(&mut self, rhs: WslcSessionFeatureFlags) {
        self.0 |= rhs.0;
    }
}
impl ::std::ops::BitAnd<WslcSessionFeatureFlags> for WslcSessionFeatureFlags {
    type Output = Self;
    #[inline]
    fn bitand(self, other: Self) -> Self {
        WslcSessionFeatureFlags(self.0 & other.0)
    }
}
impl ::std::ops::BitAndAssign for WslcSessionFeatureFlags {
    #[inline]
    fn bitand_assign(&mut self, rhs: WslcSessionFeatureFlags) {
        self.0 &= rhs.0;
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct WslcSessionFeatureFlags(pub ::std::os::raw::c_int);
impl WslcSessionTerminationReason {
    pub const WSLC_SESSION_TERMINATION_REASON_UNKNOWN: WslcSessionTerminationReason =
        WslcSessionTerminationReason(0);
    pub const WSLC_SESSION_TERMINATION_REASON_SHUTDOWN: WslcSessionTerminationReason =
        WslcSessionTerminationReason(1);
    pub const WSLC_SESSION_TERMINATION_REASON_CRASHED: WslcSessionTerminationReason =
        WslcSessionTerminationReason(2);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct WslcSessionTerminationReason(pub ::std::os::raw::c_int);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcSessionCrashDumpInfo {
    pub dumpPath: PCWSTR,
    pub processName: PCSTR,
    pub pid: u32,
    pub signal: u32,
    pub timestamp: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcSessionCrashDumpInfo"]
        [::std::mem::size_of::<WslcSessionCrashDumpInfo>() - 32usize];
    ["Alignment of WslcSessionCrashDumpInfo"]
        [::std::mem::align_of::<WslcSessionCrashDumpInfo>() - 8usize];
    ["Offset of field: WslcSessionCrashDumpInfo::dumpPath"]
        [::std::mem::offset_of!(WslcSessionCrashDumpInfo, dumpPath) - 0usize];
    ["Offset of field: WslcSessionCrashDumpInfo::processName"]
        [::std::mem::offset_of!(WslcSessionCrashDumpInfo, processName) - 8usize];
    ["Offset of field: WslcSessionCrashDumpInfo::pid"]
        [::std::mem::offset_of!(WslcSessionCrashDumpInfo, pid) - 16usize];
    ["Offset of field: WslcSessionCrashDumpInfo::signal"]
        [::std::mem::offset_of!(WslcSessionCrashDumpInfo, signal) - 20usize];
    ["Offset of field: WslcSessionCrashDumpInfo::timestamp"]
        [::std::mem::offset_of!(WslcSessionCrashDumpInfo, timestamp) - 24usize];
};
pub type WslcSessionCrashDumpCallback = ::std::option::Option<
    unsafe extern "C" fn(info: *const WslcSessionCrashDumpInfo, context: PVOID),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcCrashDumpSubscription__ {
    pub unused: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcCrashDumpSubscription__"]
        [::std::mem::size_of::<WslcCrashDumpSubscription__>() - 4usize];
    ["Alignment of WslcCrashDumpSubscription__"]
        [::std::mem::align_of::<WslcCrashDumpSubscription__>() - 4usize];
    ["Offset of field: WslcCrashDumpSubscription__::unused"]
        [::std::mem::offset_of!(WslcCrashDumpSubscription__, unused) - 0usize];
};
pub type WslcCrashDumpSubscription = *mut WslcCrashDumpSubscription__;
impl WslcPortProtocol {
    pub const WSLC_PORT_PROTOCOL_TCP: WslcPortProtocol = WslcPortProtocol(0);
    pub const WSLC_PORT_PROTOCOL_UDP: WslcPortProtocol = WslcPortProtocol(1);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct WslcPortProtocol(pub ::std::os::raw::c_int);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcContainerPortMapping {
    pub windowsPort: u16,
    pub containerPort: u16,
    pub protocol: WslcPortProtocol,
    pub windowsAddress: *mut sockaddr_storage,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcContainerPortMapping"]
        [::std::mem::size_of::<WslcContainerPortMapping>() - 16usize];
    ["Alignment of WslcContainerPortMapping"]
        [::std::mem::align_of::<WslcContainerPortMapping>() - 8usize];
    ["Offset of field: WslcContainerPortMapping::windowsPort"]
        [::std::mem::offset_of!(WslcContainerPortMapping, windowsPort) - 0usize];
    ["Offset of field: WslcContainerPortMapping::containerPort"]
        [::std::mem::offset_of!(WslcContainerPortMapping, containerPort) - 2usize];
    ["Offset of field: WslcContainerPortMapping::protocol"]
        [::std::mem::offset_of!(WslcContainerPortMapping, protocol) - 4usize];
    ["Offset of field: WslcContainerPortMapping::windowsAddress"]
        [::std::mem::offset_of!(WslcContainerPortMapping, windowsAddress) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcContainerVolume {
    pub windowsPath: PCWSTR,
    pub containerPath: PCSTR,
    pub readOnly: BOOL,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcContainerVolume"][::std::mem::size_of::<WslcContainerVolume>() - 24usize];
    ["Alignment of WslcContainerVolume"][::std::mem::align_of::<WslcContainerVolume>() - 8usize];
    ["Offset of field: WslcContainerVolume::windowsPath"]
        [::std::mem::offset_of!(WslcContainerVolume, windowsPath) - 0usize];
    ["Offset of field: WslcContainerVolume::containerPath"]
        [::std::mem::offset_of!(WslcContainerVolume, containerPath) - 8usize];
    ["Offset of field: WslcContainerVolume::readOnly"]
        [::std::mem::offset_of!(WslcContainerVolume, readOnly) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcContainerNamedVolume {
    pub name: PCSTR,
    pub containerPath: PCSTR,
    pub readOnly: BOOL,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcContainerNamedVolume"]
        [::std::mem::size_of::<WslcContainerNamedVolume>() - 24usize];
    ["Alignment of WslcContainerNamedVolume"]
        [::std::mem::align_of::<WslcContainerNamedVolume>() - 8usize];
    ["Offset of field: WslcContainerNamedVolume::name"]
        [::std::mem::offset_of!(WslcContainerNamedVolume, name) - 0usize];
    ["Offset of field: WslcContainerNamedVolume::containerPath"]
        [::std::mem::offset_of!(WslcContainerNamedVolume, containerPath) - 8usize];
    ["Offset of field: WslcContainerNamedVolume::readOnly"]
        [::std::mem::offset_of!(WslcContainerNamedVolume, readOnly) - 16usize];
};
impl WslcContainerFlags {
    pub const WSLC_CONTAINER_FLAG_NONE: WslcContainerFlags = WslcContainerFlags(0);
    pub const WSLC_CONTAINER_FLAG_AUTO_REMOVE: WslcContainerFlags = WslcContainerFlags(1);
    pub const WSLC_CONTAINER_FLAG_ENABLE_GPU: WslcContainerFlags = WslcContainerFlags(2);
    pub const WSLC_CONTAINER_FLAG_PRIVILEGED: WslcContainerFlags = WslcContainerFlags(4);
}
impl ::std::ops::BitOr<WslcContainerFlags> for WslcContainerFlags {
    type Output = Self;
    #[inline]
    fn bitor(self, other: Self) -> Self {
        WslcContainerFlags(self.0 | other.0)
    }
}
impl ::std::ops::BitOrAssign for WslcContainerFlags {
    #[inline]
    fn bitor_assign(&mut self, rhs: WslcContainerFlags) {
        self.0 |= rhs.0;
    }
}
impl ::std::ops::BitAnd<WslcContainerFlags> for WslcContainerFlags {
    type Output = Self;
    #[inline]
    fn bitand(self, other: Self) -> Self {
        WslcContainerFlags(self.0 & other.0)
    }
}
impl ::std::ops::BitAndAssign for WslcContainerFlags {
    #[inline]
    fn bitand_assign(&mut self, rhs: WslcContainerFlags) {
        self.0 &= rhs.0;
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct WslcContainerFlags(pub ::std::os::raw::c_int);
impl WslcContainerStartFlags {
    pub const WSLC_CONTAINER_START_FLAG_NONE: WslcContainerStartFlags = WslcContainerStartFlags(0);
    pub const WSLC_CONTAINER_START_FLAG_ATTACH: WslcContainerStartFlags =
        WslcContainerStartFlags(1);
}
impl ::std::ops::BitOr<WslcContainerStartFlags> for WslcContainerStartFlags {
    type Output = Self;
    #[inline]
    fn bitor(self, other: Self) -> Self {
        WslcContainerStartFlags(self.0 | other.0)
    }
}
impl ::std::ops::BitOrAssign for WslcContainerStartFlags {
    #[inline]
    fn bitor_assign(&mut self, rhs: WslcContainerStartFlags) {
        self.0 |= rhs.0;
    }
}
impl ::std::ops::BitAnd<WslcContainerStartFlags> for WslcContainerStartFlags {
    type Output = Self;
    #[inline]
    fn bitand(self, other: Self) -> Self {
        WslcContainerStartFlags(self.0 & other.0)
    }
}
impl ::std::ops::BitAndAssign for WslcContainerStartFlags {
    #[inline]
    fn bitand_assign(&mut self, rhs: WslcContainerStartFlags) {
        self.0 &= rhs.0;
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct WslcContainerStartFlags(pub ::std::os::raw::c_int);
impl WslcContainerState {
    pub const WSLC_CONTAINER_STATE_INVALID: WslcContainerState = WslcContainerState(0);
    pub const WSLC_CONTAINER_STATE_CREATED: WslcContainerState = WslcContainerState(1);
    pub const WSLC_CONTAINER_STATE_RUNNING: WslcContainerState = WslcContainerState(2);
    pub const WSLC_CONTAINER_STATE_EXITED: WslcContainerState = WslcContainerState(3);
    pub const WSLC_CONTAINER_STATE_DELETED: WslcContainerState = WslcContainerState(4);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct WslcContainerState(pub ::std::os::raw::c_int);
impl WslcSignal {
    pub const WSLC_SIGNAL_NONE: WslcSignal = WslcSignal(0);
    pub const WSLC_SIGNAL_SIGHUP: WslcSignal = WslcSignal(1);
    pub const WSLC_SIGNAL_SIGINT: WslcSignal = WslcSignal(2);
    pub const WSLC_SIGNAL_SIGQUIT: WslcSignal = WslcSignal(3);
    pub const WSLC_SIGNAL_SIGKILL: WslcSignal = WslcSignal(9);
    pub const WSLC_SIGNAL_SIGTERM: WslcSignal = WslcSignal(15);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct WslcSignal(pub ::std::os::raw::c_int);
impl WslcDeleteContainerFlags {
    pub const WSLC_DELETE_CONTAINER_FLAG_NONE: WslcDeleteContainerFlags =
        WslcDeleteContainerFlags(0);
    pub const WSLC_DELETE_CONTAINER_FLAG_FORCE: WslcDeleteContainerFlags =
        WslcDeleteContainerFlags(1);
}
impl ::std::ops::BitOr<WslcDeleteContainerFlags> for WslcDeleteContainerFlags {
    type Output = Self;
    #[inline]
    fn bitor(self, other: Self) -> Self {
        WslcDeleteContainerFlags(self.0 | other.0)
    }
}
impl ::std::ops::BitOrAssign for WslcDeleteContainerFlags {
    #[inline]
    fn bitor_assign(&mut self, rhs: WslcDeleteContainerFlags) {
        self.0 |= rhs.0;
    }
}
impl ::std::ops::BitAnd<WslcDeleteContainerFlags> for WslcDeleteContainerFlags {
    type Output = Self;
    #[inline]
    fn bitand(self, other: Self) -> Self {
        WslcDeleteContainerFlags(self.0 & other.0)
    }
}
impl ::std::ops::BitAndAssign for WslcDeleteContainerFlags {
    #[inline]
    fn bitand_assign(&mut self, rhs: WslcDeleteContainerFlags) {
        self.0 &= rhs.0;
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct WslcDeleteContainerFlags(pub ::std::os::raw::c_int);
impl WslcProcessIOHandle {
    pub const WSLC_PROCESS_IO_HANDLE_STDIN: WslcProcessIOHandle = WslcProcessIOHandle(0);
    pub const WSLC_PROCESS_IO_HANDLE_STDOUT: WslcProcessIOHandle = WslcProcessIOHandle(1);
    pub const WSLC_PROCESS_IO_HANDLE_STDERR: WslcProcessIOHandle = WslcProcessIOHandle(2);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct WslcProcessIOHandle(pub ::std::os::raw::c_int);
pub type WslcStdIOCallback = ::std::option::Option<
    unsafe extern "C" fn(
        ioHandle: WslcProcessIOHandle,
        data: *const BYTE,
        dataBytes: u32,
        context: PVOID,
    ),
>;
pub type WslcProcessExitCallback =
    ::std::option::Option<unsafe extern "C" fn(exitCode: INT32, context: PVOID)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcProcessCallbacks {
    pub onStdOut: WslcStdIOCallback,
    pub onStdErr: WslcStdIOCallback,
    pub onExit: WslcProcessExitCallback,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcProcessCallbacks"][::std::mem::size_of::<WslcProcessCallbacks>() - 24usize];
    ["Alignment of WslcProcessCallbacks"][::std::mem::align_of::<WslcProcessCallbacks>() - 8usize];
    ["Offset of field: WslcProcessCallbacks::onStdOut"]
        [::std::mem::offset_of!(WslcProcessCallbacks, onStdOut) - 0usize];
    ["Offset of field: WslcProcessCallbacks::onStdErr"]
        [::std::mem::offset_of!(WslcProcessCallbacks, onStdErr) - 8usize];
    ["Offset of field: WslcProcessCallbacks::onExit"]
        [::std::mem::offset_of!(WslcProcessCallbacks, onExit) - 16usize];
};
impl WslcProcessState {
    pub const WSLC_PROCESS_STATE_UNKNOWN: WslcProcessState = WslcProcessState(0);
    pub const WSLC_PROCESS_STATE_RUNNING: WslcProcessState = WslcProcessState(1);
    pub const WSLC_PROCESS_STATE_EXITED: WslcProcessState = WslcProcessState(2);
    pub const WSLC_PROCESS_STATE_SIGNALLED: WslcProcessState = WslcProcessState(3);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct WslcProcessState(pub ::std::os::raw::c_int);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcImageProgressDetail {
    pub currentBytes: u64,
    pub totalBytes: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcImageProgressDetail"][::std::mem::size_of::<WslcImageProgressDetail>() - 16usize];
    ["Alignment of WslcImageProgressDetail"]
        [::std::mem::align_of::<WslcImageProgressDetail>() - 8usize];
    ["Offset of field: WslcImageProgressDetail::currentBytes"]
        [::std::mem::offset_of!(WslcImageProgressDetail, currentBytes) - 0usize];
    ["Offset of field: WslcImageProgressDetail::totalBytes"]
        [::std::mem::offset_of!(WslcImageProgressDetail, totalBytes) - 8usize];
};
impl WslcImageProgressStatus {
    pub const WSLC_IMAGE_PROGRESS_STATUS_UNKNOWN: WslcImageProgressStatus =
        WslcImageProgressStatus(0);
    pub const WSLC_IMAGE_PROGRESS_STATUS_PULLING: WslcImageProgressStatus =
        WslcImageProgressStatus(1);
    pub const WSLC_IMAGE_PROGRESS_STATUS_WAITING: WslcImageProgressStatus =
        WslcImageProgressStatus(2);
    pub const WSLC_IMAGE_PROGRESS_STATUS_DOWNLOADING: WslcImageProgressStatus =
        WslcImageProgressStatus(3);
    pub const WSLC_IMAGE_PROGRESS_STATUS_VERIFYING: WslcImageProgressStatus =
        WslcImageProgressStatus(4);
    pub const WSLC_IMAGE_PROGRESS_STATUS_EXTRACTING: WslcImageProgressStatus =
        WslcImageProgressStatus(5);
    pub const WSLC_IMAGE_PROGRESS_STATUS_COMPLETE: WslcImageProgressStatus =
        WslcImageProgressStatus(6);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct WslcImageProgressStatus(pub ::std::os::raw::c_int);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcImageProgressMessage {
    pub id: PCSTR,
    pub status: WslcImageProgressStatus,
    pub detail: WslcImageProgressDetail,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcImageProgressMessage"]
        [::std::mem::size_of::<WslcImageProgressMessage>() - 32usize];
    ["Alignment of WslcImageProgressMessage"]
        [::std::mem::align_of::<WslcImageProgressMessage>() - 8usize];
    ["Offset of field: WslcImageProgressMessage::id"]
        [::std::mem::offset_of!(WslcImageProgressMessage, id) - 0usize];
    ["Offset of field: WslcImageProgressMessage::status"]
        [::std::mem::offset_of!(WslcImageProgressMessage, status) - 8usize];
    ["Offset of field: WslcImageProgressMessage::detail"]
        [::std::mem::offset_of!(WslcImageProgressMessage, detail) - 16usize];
};
pub type WslcContainerImageProgressCallback = ::std::option::Option<
    unsafe extern "C" fn(progress: *const WslcImageProgressMessage, context: PVOID) -> HRESULT,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcPullImageOptions {
    pub uri: PCSTR,
    pub progressCallback: WslcContainerImageProgressCallback,
    pub progressCallbackContext: PVOID,
    pub registryAuth: PCSTR,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcPullImageOptions"][::std::mem::size_of::<WslcPullImageOptions>() - 32usize];
    ["Alignment of WslcPullImageOptions"][::std::mem::align_of::<WslcPullImageOptions>() - 8usize];
    ["Offset of field: WslcPullImageOptions::uri"]
        [::std::mem::offset_of!(WslcPullImageOptions, uri) - 0usize];
    ["Offset of field: WslcPullImageOptions::progressCallback"]
        [::std::mem::offset_of!(WslcPullImageOptions, progressCallback) - 8usize];
    ["Offset of field: WslcPullImageOptions::progressCallbackContext"]
        [::std::mem::offset_of!(WslcPullImageOptions, progressCallbackContext) - 16usize];
    ["Offset of field: WslcPullImageOptions::registryAuth"]
        [::std::mem::offset_of!(WslcPullImageOptions, registryAuth) - 24usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcImportImageOptions {
    pub progressCallback: WslcContainerImageProgressCallback,
    pub progressCallbackContext: PVOID,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcImportImageOptions"][::std::mem::size_of::<WslcImportImageOptions>() - 16usize];
    ["Alignment of WslcImportImageOptions"]
        [::std::mem::align_of::<WslcImportImageOptions>() - 8usize];
    ["Offset of field: WslcImportImageOptions::progressCallback"]
        [::std::mem::offset_of!(WslcImportImageOptions, progressCallback) - 0usize];
    ["Offset of field: WslcImportImageOptions::progressCallbackContext"]
        [::std::mem::offset_of!(WslcImportImageOptions, progressCallbackContext) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcLoadImageOptions {
    pub progressCallback: WslcContainerImageProgressCallback,
    pub progressCallbackContext: PVOID,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcLoadImageOptions"][::std::mem::size_of::<WslcLoadImageOptions>() - 16usize];
    ["Alignment of WslcLoadImageOptions"][::std::mem::align_of::<WslcLoadImageOptions>() - 8usize];
    ["Offset of field: WslcLoadImageOptions::progressCallback"]
        [::std::mem::offset_of!(WslcLoadImageOptions, progressCallback) - 0usize];
    ["Offset of field: WslcLoadImageOptions::progressCallbackContext"]
        [::std::mem::offset_of!(WslcLoadImageOptions, progressCallbackContext) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcImageInfo {
    pub name: [CHAR; 256usize],
    pub sha256: [u8; 32usize],
    pub sizeBytes: i64,
    pub createdUnixTime: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcImageInfo"][::std::mem::size_of::<WslcImageInfo>() - 304usize];
    ["Alignment of WslcImageInfo"][::std::mem::align_of::<WslcImageInfo>() - 8usize];
    ["Offset of field: WslcImageInfo::name"][::std::mem::offset_of!(WslcImageInfo, name) - 0usize];
    ["Offset of field: WslcImageInfo::sha256"]
        [::std::mem::offset_of!(WslcImageInfo, sha256) - 256usize];
    ["Offset of field: WslcImageInfo::sizeBytes"]
        [::std::mem::offset_of!(WslcImageInfo, sizeBytes) - 288usize];
    ["Offset of field: WslcImageInfo::createdUnixTime"]
        [::std::mem::offset_of!(WslcImageInfo, createdUnixTime) - 296usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcTagImageOptions {
    pub image: PCSTR,
    pub repo: PCSTR,
    pub tag: PCSTR,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcTagImageOptions"][::std::mem::size_of::<WslcTagImageOptions>() - 24usize];
    ["Alignment of WslcTagImageOptions"][::std::mem::align_of::<WslcTagImageOptions>() - 8usize];
    ["Offset of field: WslcTagImageOptions::image"]
        [::std::mem::offset_of!(WslcTagImageOptions, image) - 0usize];
    ["Offset of field: WslcTagImageOptions::repo"]
        [::std::mem::offset_of!(WslcTagImageOptions, repo) - 8usize];
    ["Offset of field: WslcTagImageOptions::tag"]
        [::std::mem::offset_of!(WslcTagImageOptions, tag) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcPushImageOptions {
    pub image: PCSTR,
    pub registryAuth: PCSTR,
    pub progressCallback: WslcContainerImageProgressCallback,
    pub progressCallbackContext: PVOID,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcPushImageOptions"][::std::mem::size_of::<WslcPushImageOptions>() - 32usize];
    ["Alignment of WslcPushImageOptions"][::std::mem::align_of::<WslcPushImageOptions>() - 8usize];
    ["Offset of field: WslcPushImageOptions::image"]
        [::std::mem::offset_of!(WslcPushImageOptions, image) - 0usize];
    ["Offset of field: WslcPushImageOptions::registryAuth"]
        [::std::mem::offset_of!(WslcPushImageOptions, registryAuth) - 8usize];
    ["Offset of field: WslcPushImageOptions::progressCallback"]
        [::std::mem::offset_of!(WslcPushImageOptions, progressCallback) - 16usize];
    ["Offset of field: WslcPushImageOptions::progressCallbackContext"]
        [::std::mem::offset_of!(WslcPushImageOptions, progressCallbackContext) - 24usize];
};
pub const WslcIdentityTokenType_WSLC_IDENTITY_TOKEN_TYPE_UNKNOWN: WslcIdentityTokenType = 0;
pub const WslcIdentityTokenType_WSLC_IDENTITY_TOKEN_TYPE_TOKEN: WslcIdentityTokenType = 1;
pub const WslcIdentityTokenType_WSLC_IDENTITY_TOKEN_TYPE_CREDENTIALS: WslcIdentityTokenType = 2;
pub type WslcIdentityTokenType = ::std::os::raw::c_int;
impl WslcComponentFlags {
    pub const WSLC_COMPONENT_FLAG_NONE: WslcComponentFlags = WslcComponentFlags(0);
    pub const WSLC_COMPONENT_FLAG_VIRTUAL_MACHINE_PLATFORM: WslcComponentFlags =
        WslcComponentFlags(1);
    pub const WSLC_COMPONENT_FLAG_WSL_PACKAGE: WslcComponentFlags = WslcComponentFlags(2);
    pub const WSLC_COMPONENT_FLAG_SDK_NEEDS_UPDATE: WslcComponentFlags = WslcComponentFlags(4);
}
impl ::std::ops::BitOr<WslcComponentFlags> for WslcComponentFlags {
    type Output = Self;
    #[inline]
    fn bitor(self, other: Self) -> Self {
        WslcComponentFlags(self.0 | other.0)
    }
}
impl ::std::ops::BitOrAssign for WslcComponentFlags {
    #[inline]
    fn bitor_assign(&mut self, rhs: WslcComponentFlags) {
        self.0 |= rhs.0;
    }
}
impl ::std::ops::BitAnd<WslcComponentFlags> for WslcComponentFlags {
    type Output = Self;
    #[inline]
    fn bitand(self, other: Self) -> Self {
        WslcComponentFlags(self.0 & other.0)
    }
}
impl ::std::ops::BitAndAssign for WslcComponentFlags {
    #[inline]
    fn bitand_assign(&mut self, rhs: WslcComponentFlags) {
        self.0 &= rhs.0;
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct WslcComponentFlags(pub ::std::os::raw::c_int);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct WslcVersion {
    pub major: u32,
    pub minor: u32,
    pub revision: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of WslcVersion"][::std::mem::size_of::<WslcVersion>() - 12usize];
    ["Alignment of WslcVersion"][::std::mem::align_of::<WslcVersion>() - 4usize];
    ["Offset of field: WslcVersion::major"][::std::mem::offset_of!(WslcVersion, major) - 0usize];
    ["Offset of field: WslcVersion::minor"][::std::mem::offset_of!(WslcVersion, minor) - 4usize];
    ["Offset of field: WslcVersion::revision"]
        [::std::mem::offset_of!(WslcVersion, revision) - 8usize];
};
pub type WslcInstallCallback = ::std::option::Option<
    unsafe extern "C" fn(
        component: WslcComponentFlags,
        progressSteps: u32,
        totalSteps: u32,
        context: PVOID,
    ),
>;
pub const WslcInstallOptions_WSLC_INSTALL_OPTION_NONE: WslcInstallOptions = 0;
pub const WslcInstallOptions_WSLC_INSTALL_OPTION_REPAIR: WslcInstallOptions = 1;
pub type WslcInstallOptions = ::std::os::raw::c_int;
pub struct WslcSdk {
    __library: ::libloading::Library,
    pub WslcInitSessionSettings: Result<
        unsafe extern "C" fn(
            name: PCWSTR,
            storagePath: PCWSTR,
            sessionSettings: *mut WslcSessionSettings,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcCreateSession: Result<
        unsafe extern "C" fn(
            sessionSettings: *mut WslcSessionSettings,
            session: *mut WslcSession,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetSessionSettingsCpuCount: Result<
        unsafe extern "C" fn(sessionSettings: *mut WslcSessionSettings, cpuCount: u32) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetSessionSettingsMemory: Result<
        unsafe extern "C" fn(sessionSettings: *mut WslcSessionSettings, memoryMB: u32) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetSessionSettingsTimeout: Result<
        unsafe extern "C" fn(sessionSettings: *mut WslcSessionSettings, timeoutMS: u32) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetSessionSettingsVhd: Result<
        unsafe extern "C" fn(
            sessionSettings: *mut WslcSessionSettings,
            vhdRequirements: *const WslcVhdRequirements,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetSessionSettingsFeatureFlags: Result<
        unsafe extern "C" fn(
            sessionSettings: *mut WslcSessionSettings,
            flags: WslcSessionFeatureFlags,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcGetSessionTerminationEvent: Result<
        unsafe extern "C" fn(session: WslcSession, terminationEvent: *mut HANDLE) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcGetSessionTerminationReason: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            reason: *mut WslcSessionTerminationReason,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcTerminateSession:
        Result<unsafe extern "C" fn(session: WslcSession) -> HRESULT, ::libloading::Error>,
    pub WslcReleaseSession:
        Result<unsafe extern "C" fn(session: WslcSession) -> HRESULT, ::libloading::Error>,
    pub WslcRegisterSessionCrashDumpCallback: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            crashDumpCallback: WslcSessionCrashDumpCallback,
            crashDumpContext: PVOID,
            subscription: *mut WslcCrashDumpSubscription,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcReleaseCrashDumpSubscription: Result<
        unsafe extern "C" fn(subscription: WslcCrashDumpSubscription) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcInitContainerSettings: Result<
        unsafe extern "C" fn(
            imageName: PCSTR,
            containerSettings: *mut WslcContainerSettings,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcCreateContainer: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            containerSettings: *const WslcContainerSettings,
            container: *mut WslcContainer,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcOpenContainer: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            nameOrId: PCSTR,
            container: *mut WslcContainer,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcStartContainer: Result<
        unsafe extern "C" fn(
            container: WslcContainer,
            flags: WslcContainerStartFlags,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetContainerSettingsName: Result<
        unsafe extern "C" fn(containerSettings: *mut WslcContainerSettings, name: PCSTR) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetContainerSettingsInitProcess: Result<
        unsafe extern "C" fn(
            containerSettings: *mut WslcContainerSettings,
            initProcess: *mut WslcProcessSettings,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetContainerSettingsNetworkingMode: Result<
        unsafe extern "C" fn(
            containerSettings: *mut WslcContainerSettings,
            networkingMode: WslcContainerNetworkingMode,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetContainerSettingsHostName: Result<
        unsafe extern "C" fn(
            containerSettings: *mut WslcContainerSettings,
            hostName: PCSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetContainerSettingsDomainName: Result<
        unsafe extern "C" fn(
            containerSettings: *mut WslcContainerSettings,
            domainName: PCSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetContainerSettingsFlags: Result<
        unsafe extern "C" fn(
            containerSettings: *mut WslcContainerSettings,
            flags: WslcContainerFlags,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetContainerSettingsPortMappings: Result<
        unsafe extern "C" fn(
            containerSettings: *mut WslcContainerSettings,
            portMappings: *const WslcContainerPortMapping,
            portMappingCount: u32,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetContainerSettingsVolumes: Result<
        unsafe extern "C" fn(
            containerSettings: *mut WslcContainerSettings,
            volumes: *const WslcContainerVolume,
            volumeCount: u32,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetContainerSettingsNamedVolumes: Result<
        unsafe extern "C" fn(
            containerSettings: *mut WslcContainerSettings,
            namedVolumes: *const WslcContainerNamedVolume,
            namedVolumeCount: u32,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcCreateContainerProcess: Result<
        unsafe extern "C" fn(
            container: WslcContainer,
            newProcessSettings: *mut WslcProcessSettings,
            newProcess: *mut WslcProcess,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcReleaseContainer:
        Result<unsafe extern "C" fn(container: WslcContainer) -> HRESULT, ::libloading::Error>,
    pub WslcGetContainerID: Result<
        unsafe extern "C" fn(container: WslcContainer, containerID: *mut CHAR) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcGetContainerInitProcess: Result<
        unsafe extern "C" fn(container: WslcContainer, initProcess: *mut WslcProcess) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcInspectContainer: Result<
        unsafe extern "C" fn(container: WslcContainer, inspectData: *mut PSTR) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcGetContainerState: Result<
        unsafe extern "C" fn(container: WslcContainer, state: *mut WslcContainerState) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcStopContainer: Result<
        unsafe extern "C" fn(
            container: WslcContainer,
            signal: WslcSignal,
            timeoutSeconds: u32,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcDeleteContainer: Result<
        unsafe extern "C" fn(
            container: WslcContainer,
            flags: WslcDeleteContainerFlags,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcInitProcessSettings: Result<
        unsafe extern "C" fn(processSettings: *mut WslcProcessSettings) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetProcessSettingsWorkingDirectory: Result<
        unsafe extern "C" fn(
            processSettings: *mut WslcProcessSettings,
            workingDirectory: PCSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetProcessSettingsCmdLine: Result<
        unsafe extern "C" fn(
            processSettings: *mut WslcProcessSettings,
            argv: *const PCSTR,
            argc: usize,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetProcessSettingsEnvVariables: Result<
        unsafe extern "C" fn(
            processSettings: *mut WslcProcessSettings,
            key_value: *const PCSTR,
            argc: usize,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetProcessSettingsCallbacks: Result<
        unsafe extern "C" fn(
            processSettings: *mut WslcProcessSettings,
            callbacks: *const WslcProcessCallbacks,
            context: PVOID,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSetContainerInitProcessIOCallbacks: Result<
        unsafe extern "C" fn(
            container: WslcContainer,
            callbacks: *const WslcProcessCallbacks,
            context: PVOID,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcGetProcessPid: Result<
        unsafe extern "C" fn(process: WslcProcess, pid: *mut u32) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcGetProcessExitEvent: Result<
        unsafe extern "C" fn(process: WslcProcess, exitEvent: *mut HANDLE) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcGetProcessState: Result<
        unsafe extern "C" fn(process: WslcProcess, state: *mut WslcProcessState) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcGetProcessExitCode: Result<
        unsafe extern "C" fn(process: WslcProcess, exitCode: PINT32) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSignalProcess: Result<
        unsafe extern "C" fn(process: WslcProcess, signal: WslcSignal) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcGetProcessIOHandle: Result<
        unsafe extern "C" fn(
            process: WslcProcess,
            ioHandle: WslcProcessIOHandle,
            handle: *mut HANDLE,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcReleaseProcess:
        Result<unsafe extern "C" fn(process: WslcProcess) -> HRESULT, ::libloading::Error>,
    pub WslcPullSessionImage: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            options: *const WslcPullImageOptions,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcImportSessionImage: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            imageName: PCSTR,
            imageContent: HANDLE,
            imageContentBytes: u64,
            options: *const WslcImportImageOptions,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcImportSessionImageFromFile: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            imageName: PCSTR,
            path: PCWSTR,
            options: *const WslcImportImageOptions,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcLoadSessionImage: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            imageContent: HANDLE,
            imageContentBytes: u64,
            options: *const WslcLoadImageOptions,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcLoadSessionImageFromFile: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            path: PCWSTR,
            options: *const WslcLoadImageOptions,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcDeleteSessionImage: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            nameOrID: PCSTR,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcTagSessionImage: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            options: *const WslcTagImageOptions,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcPushSessionImage: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            options: *const WslcPushImageOptions,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcSessionAuthenticate: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            serverAddress: PCSTR,
            username: PCSTR,
            password: PCSTR,
            identityToken: *mut PSTR,
            tokenType: *mut WslcIdentityTokenType,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcListSessionImages: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            images: *mut *mut WslcImageInfo,
            count: *mut u32,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcCreateSessionVhdVolume: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            options: *const WslcVhdRequirements,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcDeleteSessionVhdVolume: Result<
        unsafe extern "C" fn(
            session: WslcSession,
            name: PCSTR,
            errorMessage: *mut PWSTR,
        ) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcGetMissingComponents: Result<
        unsafe extern "C" fn(missingComponents: *mut WslcComponentFlags) -> HRESULT,
        ::libloading::Error,
    >,
    pub WslcGetVersion:
        Result<unsafe extern "C" fn(version: *mut WslcVersion) -> HRESULT, ::libloading::Error>,
    pub WslcInstallWithDependencies: Result<
        unsafe extern "C" fn(
            components: WslcComponentFlags,
            options: WslcInstallOptions,
            progressCallback: WslcInstallCallback,
            context: PVOID,
        ) -> HRESULT,
        ::libloading::Error,
    >,
}
impl WslcSdk {
    pub unsafe fn new<P>(path: P) -> Result<Self, ::libloading::Error>
    where
        P: AsRef<::std::ffi::OsStr>,
    {
        let library = ::libloading::Library::new(path)?;
        Self::from_library(library)
    }
    pub unsafe fn from_library<L>(library: L) -> Result<Self, ::libloading::Error>
    where
        L: Into<::libloading::Library>,
    {
        let __library = library.into();
        let WslcInitSessionSettings = __library.get(b"WslcInitSessionSettings\0").map(|sym| *sym);
        let WslcCreateSession = __library.get(b"WslcCreateSession\0").map(|sym| *sym);
        let WslcSetSessionSettingsCpuCount = __library
            .get(b"WslcSetSessionSettingsCpuCount\0")
            .map(|sym| *sym);
        let WslcSetSessionSettingsMemory = __library
            .get(b"WslcSetSessionSettingsMemory\0")
            .map(|sym| *sym);
        let WslcSetSessionSettingsTimeout = __library
            .get(b"WslcSetSessionSettingsTimeout\0")
            .map(|sym| *sym);
        let WslcSetSessionSettingsVhd = __library
            .get(b"WslcSetSessionSettingsVhd\0")
            .map(|sym| *sym);
        let WslcSetSessionSettingsFeatureFlags = __library
            .get(b"WslcSetSessionSettingsFeatureFlags\0")
            .map(|sym| *sym);
        let WslcGetSessionTerminationEvent = __library
            .get(b"WslcGetSessionTerminationEvent\0")
            .map(|sym| *sym);
        let WslcGetSessionTerminationReason = __library
            .get(b"WslcGetSessionTerminationReason\0")
            .map(|sym| *sym);
        let WslcTerminateSession = __library.get(b"WslcTerminateSession\0").map(|sym| *sym);
        let WslcReleaseSession = __library.get(b"WslcReleaseSession\0").map(|sym| *sym);
        let WslcRegisterSessionCrashDumpCallback = __library
            .get(b"WslcRegisterSessionCrashDumpCallback\0")
            .map(|sym| *sym);
        let WslcReleaseCrashDumpSubscription = __library
            .get(b"WslcReleaseCrashDumpSubscription\0")
            .map(|sym| *sym);
        let WslcInitContainerSettings = __library
            .get(b"WslcInitContainerSettings\0")
            .map(|sym| *sym);
        let WslcCreateContainer = __library.get(b"WslcCreateContainer\0").map(|sym| *sym);
        let WslcOpenContainer = __library.get(b"WslcOpenContainer\0").map(|sym| *sym);
        let WslcStartContainer = __library.get(b"WslcStartContainer\0").map(|sym| *sym);
        let WslcSetContainerSettingsName = __library
            .get(b"WslcSetContainerSettingsName\0")
            .map(|sym| *sym);
        let WslcSetContainerSettingsInitProcess = __library
            .get(b"WslcSetContainerSettingsInitProcess\0")
            .map(|sym| *sym);
        let WslcSetContainerSettingsNetworkingMode = __library
            .get(b"WslcSetContainerSettingsNetworkingMode\0")
            .map(|sym| *sym);
        let WslcSetContainerSettingsHostName = __library
            .get(b"WslcSetContainerSettingsHostName\0")
            .map(|sym| *sym);
        let WslcSetContainerSettingsDomainName = __library
            .get(b"WslcSetContainerSettingsDomainName\0")
            .map(|sym| *sym);
        let WslcSetContainerSettingsFlags = __library
            .get(b"WslcSetContainerSettingsFlags\0")
            .map(|sym| *sym);
        let WslcSetContainerSettingsPortMappings = __library
            .get(b"WslcSetContainerSettingsPortMappings\0")
            .map(|sym| *sym);
        let WslcSetContainerSettingsVolumes = __library
            .get(b"WslcSetContainerSettingsVolumes\0")
            .map(|sym| *sym);
        let WslcSetContainerSettingsNamedVolumes = __library
            .get(b"WslcSetContainerSettingsNamedVolumes\0")
            .map(|sym| *sym);
        let WslcCreateContainerProcess = __library
            .get(b"WslcCreateContainerProcess\0")
            .map(|sym| *sym);
        let WslcReleaseContainer = __library.get(b"WslcReleaseContainer\0").map(|sym| *sym);
        let WslcGetContainerID = __library.get(b"WslcGetContainerID\0").map(|sym| *sym);
        let WslcGetContainerInitProcess = __library
            .get(b"WslcGetContainerInitProcess\0")
            .map(|sym| *sym);
        let WslcInspectContainer = __library.get(b"WslcInspectContainer\0").map(|sym| *sym);
        let WslcGetContainerState = __library.get(b"WslcGetContainerState\0").map(|sym| *sym);
        let WslcStopContainer = __library.get(b"WslcStopContainer\0").map(|sym| *sym);
        let WslcDeleteContainer = __library.get(b"WslcDeleteContainer\0").map(|sym| *sym);
        let WslcInitProcessSettings = __library.get(b"WslcInitProcessSettings\0").map(|sym| *sym);
        let WslcSetProcessSettingsWorkingDirectory = __library
            .get(b"WslcSetProcessSettingsWorkingDirectory\0")
            .map(|sym| *sym);
        let WslcSetProcessSettingsCmdLine = __library
            .get(b"WslcSetProcessSettingsCmdLine\0")
            .map(|sym| *sym);
        let WslcSetProcessSettingsEnvVariables = __library
            .get(b"WslcSetProcessSettingsEnvVariables\0")
            .map(|sym| *sym);
        let WslcSetProcessSettingsCallbacks = __library
            .get(b"WslcSetProcessSettingsCallbacks\0")
            .map(|sym| *sym);
        let WslcSetContainerInitProcessIOCallbacks = __library
            .get(b"WslcSetContainerInitProcessIOCallbacks\0")
            .map(|sym| *sym);
        let WslcGetProcessPid = __library.get(b"WslcGetProcessPid\0").map(|sym| *sym);
        let WslcGetProcessExitEvent = __library.get(b"WslcGetProcessExitEvent\0").map(|sym| *sym);
        let WslcGetProcessState = __library.get(b"WslcGetProcessState\0").map(|sym| *sym);
        let WslcGetProcessExitCode = __library.get(b"WslcGetProcessExitCode\0").map(|sym| *sym);
        let WslcSignalProcess = __library.get(b"WslcSignalProcess\0").map(|sym| *sym);
        let WslcGetProcessIOHandle = __library.get(b"WslcGetProcessIOHandle\0").map(|sym| *sym);
        let WslcReleaseProcess = __library.get(b"WslcReleaseProcess\0").map(|sym| *sym);
        let WslcPullSessionImage = __library.get(b"WslcPullSessionImage\0").map(|sym| *sym);
        let WslcImportSessionImage = __library.get(b"WslcImportSessionImage\0").map(|sym| *sym);
        let WslcImportSessionImageFromFile = __library
            .get(b"WslcImportSessionImageFromFile\0")
            .map(|sym| *sym);
        let WslcLoadSessionImage = __library.get(b"WslcLoadSessionImage\0").map(|sym| *sym);
        let WslcLoadSessionImageFromFile = __library
            .get(b"WslcLoadSessionImageFromFile\0")
            .map(|sym| *sym);
        let WslcDeleteSessionImage = __library.get(b"WslcDeleteSessionImage\0").map(|sym| *sym);
        let WslcTagSessionImage = __library.get(b"WslcTagSessionImage\0").map(|sym| *sym);
        let WslcPushSessionImage = __library.get(b"WslcPushSessionImage\0").map(|sym| *sym);
        let WslcSessionAuthenticate = __library.get(b"WslcSessionAuthenticate\0").map(|sym| *sym);
        let WslcListSessionImages = __library.get(b"WslcListSessionImages\0").map(|sym| *sym);
        let WslcCreateSessionVhdVolume = __library
            .get(b"WslcCreateSessionVhdVolume\0")
            .map(|sym| *sym);
        let WslcDeleteSessionVhdVolume = __library
            .get(b"WslcDeleteSessionVhdVolume\0")
            .map(|sym| *sym);
        let WslcGetMissingComponents = __library.get(b"WslcGetMissingComponents\0").map(|sym| *sym);
        let WslcGetVersion = __library.get(b"WslcGetVersion\0").map(|sym| *sym);
        let WslcInstallWithDependencies = __library
            .get(b"WslcInstallWithDependencies\0")
            .map(|sym| *sym);
        Ok(WslcSdk {
            __library,
            WslcInitSessionSettings,
            WslcCreateSession,
            WslcSetSessionSettingsCpuCount,
            WslcSetSessionSettingsMemory,
            WslcSetSessionSettingsTimeout,
            WslcSetSessionSettingsVhd,
            WslcSetSessionSettingsFeatureFlags,
            WslcGetSessionTerminationEvent,
            WslcGetSessionTerminationReason,
            WslcTerminateSession,
            WslcReleaseSession,
            WslcRegisterSessionCrashDumpCallback,
            WslcReleaseCrashDumpSubscription,
            WslcInitContainerSettings,
            WslcCreateContainer,
            WslcOpenContainer,
            WslcStartContainer,
            WslcSetContainerSettingsName,
            WslcSetContainerSettingsInitProcess,
            WslcSetContainerSettingsNetworkingMode,
            WslcSetContainerSettingsHostName,
            WslcSetContainerSettingsDomainName,
            WslcSetContainerSettingsFlags,
            WslcSetContainerSettingsPortMappings,
            WslcSetContainerSettingsVolumes,
            WslcSetContainerSettingsNamedVolumes,
            WslcCreateContainerProcess,
            WslcReleaseContainer,
            WslcGetContainerID,
            WslcGetContainerInitProcess,
            WslcInspectContainer,
            WslcGetContainerState,
            WslcStopContainer,
            WslcDeleteContainer,
            WslcInitProcessSettings,
            WslcSetProcessSettingsWorkingDirectory,
            WslcSetProcessSettingsCmdLine,
            WslcSetProcessSettingsEnvVariables,
            WslcSetProcessSettingsCallbacks,
            WslcSetContainerInitProcessIOCallbacks,
            WslcGetProcessPid,
            WslcGetProcessExitEvent,
            WslcGetProcessState,
            WslcGetProcessExitCode,
            WslcSignalProcess,
            WslcGetProcessIOHandle,
            WslcReleaseProcess,
            WslcPullSessionImage,
            WslcImportSessionImage,
            WslcImportSessionImageFromFile,
            WslcLoadSessionImage,
            WslcLoadSessionImageFromFile,
            WslcDeleteSessionImage,
            WslcTagSessionImage,
            WslcPushSessionImage,
            WslcSessionAuthenticate,
            WslcListSessionImages,
            WslcCreateSessionVhdVolume,
            WslcDeleteSessionVhdVolume,
            WslcGetMissingComponents,
            WslcGetVersion,
            WslcInstallWithDependencies,
        })
    }
    pub unsafe fn WslcInitSessionSettings(
        &self,
        name: PCWSTR,
        storagePath: PCWSTR,
        sessionSettings: *mut WslcSessionSettings,
    ) -> HRESULT {
        (self
            .WslcInitSessionSettings
            .as_ref()
            .expect("Expected function, got error."))(name, storagePath, sessionSettings)
    }
    pub unsafe fn WslcCreateSession(
        &self,
        sessionSettings: *mut WslcSessionSettings,
        session: *mut WslcSession,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcCreateSession
            .as_ref()
            .expect("Expected function, got error."))(sessionSettings, session, errorMessage)
    }
    pub unsafe fn WslcSetSessionSettingsCpuCount(
        &self,
        sessionSettings: *mut WslcSessionSettings,
        cpuCount: u32,
    ) -> HRESULT {
        (self
            .WslcSetSessionSettingsCpuCount
            .as_ref()
            .expect("Expected function, got error."))(sessionSettings, cpuCount)
    }
    pub unsafe fn WslcSetSessionSettingsMemory(
        &self,
        sessionSettings: *mut WslcSessionSettings,
        memoryMB: u32,
    ) -> HRESULT {
        (self
            .WslcSetSessionSettingsMemory
            .as_ref()
            .expect("Expected function, got error."))(sessionSettings, memoryMB)
    }
    pub unsafe fn WslcSetSessionSettingsTimeout(
        &self,
        sessionSettings: *mut WslcSessionSettings,
        timeoutMS: u32,
    ) -> HRESULT {
        (self
            .WslcSetSessionSettingsTimeout
            .as_ref()
            .expect("Expected function, got error."))(sessionSettings, timeoutMS)
    }
    pub unsafe fn WslcSetSessionSettingsVhd(
        &self,
        sessionSettings: *mut WslcSessionSettings,
        vhdRequirements: *const WslcVhdRequirements,
    ) -> HRESULT {
        (self
            .WslcSetSessionSettingsVhd
            .as_ref()
            .expect("Expected function, got error."))(sessionSettings, vhdRequirements)
    }
    pub unsafe fn WslcSetSessionSettingsFeatureFlags(
        &self,
        sessionSettings: *mut WslcSessionSettings,
        flags: WslcSessionFeatureFlags,
    ) -> HRESULT {
        (self
            .WslcSetSessionSettingsFeatureFlags
            .as_ref()
            .expect("Expected function, got error."))(sessionSettings, flags)
    }
    pub unsafe fn WslcGetSessionTerminationEvent(
        &self,
        session: WslcSession,
        terminationEvent: *mut HANDLE,
    ) -> HRESULT {
        (self
            .WslcGetSessionTerminationEvent
            .as_ref()
            .expect("Expected function, got error."))(session, terminationEvent)
    }
    pub unsafe fn WslcGetSessionTerminationReason(
        &self,
        session: WslcSession,
        reason: *mut WslcSessionTerminationReason,
    ) -> HRESULT {
        (self
            .WslcGetSessionTerminationReason
            .as_ref()
            .expect("Expected function, got error."))(session, reason)
    }
    pub unsafe fn WslcTerminateSession(&self, session: WslcSession) -> HRESULT {
        (self
            .WslcTerminateSession
            .as_ref()
            .expect("Expected function, got error."))(session)
    }
    pub unsafe fn WslcReleaseSession(&self, session: WslcSession) -> HRESULT {
        (self
            .WslcReleaseSession
            .as_ref()
            .expect("Expected function, got error."))(session)
    }
    pub unsafe fn WslcRegisterSessionCrashDumpCallback(
        &self,
        session: WslcSession,
        crashDumpCallback: WslcSessionCrashDumpCallback,
        crashDumpContext: PVOID,
        subscription: *mut WslcCrashDumpSubscription,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcRegisterSessionCrashDumpCallback
            .as_ref()
            .expect("Expected function, got error."))(
            session,
            crashDumpCallback,
            crashDumpContext,
            subscription,
            errorMessage,
        )
    }
    pub unsafe fn WslcReleaseCrashDumpSubscription(
        &self,
        subscription: WslcCrashDumpSubscription,
    ) -> HRESULT {
        (self
            .WslcReleaseCrashDumpSubscription
            .as_ref()
            .expect("Expected function, got error."))(subscription)
    }
    pub unsafe fn WslcInitContainerSettings(
        &self,
        imageName: PCSTR,
        containerSettings: *mut WslcContainerSettings,
    ) -> HRESULT {
        (self
            .WslcInitContainerSettings
            .as_ref()
            .expect("Expected function, got error."))(imageName, containerSettings)
    }
    pub unsafe fn WslcCreateContainer(
        &self,
        session: WslcSession,
        containerSettings: *const WslcContainerSettings,
        container: *mut WslcContainer,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcCreateContainer
            .as_ref()
            .expect("Expected function, got error."))(
            session,
            containerSettings,
            container,
            errorMessage,
        )
    }
    pub unsafe fn WslcOpenContainer(
        &self,
        session: WslcSession,
        nameOrId: PCSTR,
        container: *mut WslcContainer,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcOpenContainer
            .as_ref()
            .expect("Expected function, got error."))(
            session, nameOrId, container, errorMessage
        )
    }
    pub unsafe fn WslcStartContainer(
        &self,
        container: WslcContainer,
        flags: WslcContainerStartFlags,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcStartContainer
            .as_ref()
            .expect("Expected function, got error."))(container, flags, errorMessage)
    }
    pub unsafe fn WslcSetContainerSettingsName(
        &self,
        containerSettings: *mut WslcContainerSettings,
        name: PCSTR,
    ) -> HRESULT {
        (self
            .WslcSetContainerSettingsName
            .as_ref()
            .expect("Expected function, got error."))(containerSettings, name)
    }
    pub unsafe fn WslcSetContainerSettingsInitProcess(
        &self,
        containerSettings: *mut WslcContainerSettings,
        initProcess: *mut WslcProcessSettings,
    ) -> HRESULT {
        (self
            .WslcSetContainerSettingsInitProcess
            .as_ref()
            .expect("Expected function, got error."))(containerSettings, initProcess)
    }
    pub unsafe fn WslcSetContainerSettingsNetworkingMode(
        &self,
        containerSettings: *mut WslcContainerSettings,
        networkingMode: WslcContainerNetworkingMode,
    ) -> HRESULT {
        (self
            .WslcSetContainerSettingsNetworkingMode
            .as_ref()
            .expect("Expected function, got error."))(containerSettings, networkingMode)
    }
    pub unsafe fn WslcSetContainerSettingsHostName(
        &self,
        containerSettings: *mut WslcContainerSettings,
        hostName: PCSTR,
    ) -> HRESULT {
        (self
            .WslcSetContainerSettingsHostName
            .as_ref()
            .expect("Expected function, got error."))(containerSettings, hostName)
    }
    pub unsafe fn WslcSetContainerSettingsDomainName(
        &self,
        containerSettings: *mut WslcContainerSettings,
        domainName: PCSTR,
    ) -> HRESULT {
        (self
            .WslcSetContainerSettingsDomainName
            .as_ref()
            .expect("Expected function, got error."))(containerSettings, domainName)
    }
    pub unsafe fn WslcSetContainerSettingsFlags(
        &self,
        containerSettings: *mut WslcContainerSettings,
        flags: WslcContainerFlags,
    ) -> HRESULT {
        (self
            .WslcSetContainerSettingsFlags
            .as_ref()
            .expect("Expected function, got error."))(containerSettings, flags)
    }
    pub unsafe fn WslcSetContainerSettingsPortMappings(
        &self,
        containerSettings: *mut WslcContainerSettings,
        portMappings: *const WslcContainerPortMapping,
        portMappingCount: u32,
    ) -> HRESULT {
        (self
            .WslcSetContainerSettingsPortMappings
            .as_ref()
            .expect("Expected function, got error."))(
            containerSettings,
            portMappings,
            portMappingCount,
        )
    }
    pub unsafe fn WslcSetContainerSettingsVolumes(
        &self,
        containerSettings: *mut WslcContainerSettings,
        volumes: *const WslcContainerVolume,
        volumeCount: u32,
    ) -> HRESULT {
        (self
            .WslcSetContainerSettingsVolumes
            .as_ref()
            .expect("Expected function, got error."))(
            containerSettings, volumes, volumeCount
        )
    }
    pub unsafe fn WslcSetContainerSettingsNamedVolumes(
        &self,
        containerSettings: *mut WslcContainerSettings,
        namedVolumes: *const WslcContainerNamedVolume,
        namedVolumeCount: u32,
    ) -> HRESULT {
        (self
            .WslcSetContainerSettingsNamedVolumes
            .as_ref()
            .expect("Expected function, got error."))(
            containerSettings,
            namedVolumes,
            namedVolumeCount,
        )
    }
    pub unsafe fn WslcCreateContainerProcess(
        &self,
        container: WslcContainer,
        newProcessSettings: *mut WslcProcessSettings,
        newProcess: *mut WslcProcess,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcCreateContainerProcess
            .as_ref()
            .expect("Expected function, got error."))(
            container,
            newProcessSettings,
            newProcess,
            errorMessage,
        )
    }
    pub unsafe fn WslcReleaseContainer(&self, container: WslcContainer) -> HRESULT {
        (self
            .WslcReleaseContainer
            .as_ref()
            .expect("Expected function, got error."))(container)
    }
    pub unsafe fn WslcGetContainerID(
        &self,
        container: WslcContainer,
        containerID: *mut CHAR,
    ) -> HRESULT {
        (self
            .WslcGetContainerID
            .as_ref()
            .expect("Expected function, got error."))(container, containerID)
    }
    pub unsafe fn WslcGetContainerInitProcess(
        &self,
        container: WslcContainer,
        initProcess: *mut WslcProcess,
    ) -> HRESULT {
        (self
            .WslcGetContainerInitProcess
            .as_ref()
            .expect("Expected function, got error."))(container, initProcess)
    }
    pub unsafe fn WslcInspectContainer(
        &self,
        container: WslcContainer,
        inspectData: *mut PSTR,
    ) -> HRESULT {
        (self
            .WslcInspectContainer
            .as_ref()
            .expect("Expected function, got error."))(container, inspectData)
    }
    pub unsafe fn WslcGetContainerState(
        &self,
        container: WslcContainer,
        state: *mut WslcContainerState,
    ) -> HRESULT {
        (self
            .WslcGetContainerState
            .as_ref()
            .expect("Expected function, got error."))(container, state)
    }
    pub unsafe fn WslcStopContainer(
        &self,
        container: WslcContainer,
        signal: WslcSignal,
        timeoutSeconds: u32,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcStopContainer
            .as_ref()
            .expect("Expected function, got error."))(
            container,
            signal,
            timeoutSeconds,
            errorMessage,
        )
    }
    pub unsafe fn WslcDeleteContainer(
        &self,
        container: WslcContainer,
        flags: WslcDeleteContainerFlags,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcDeleteContainer
            .as_ref()
            .expect("Expected function, got error."))(container, flags, errorMessage)
    }
    pub unsafe fn WslcInitProcessSettings(
        &self,
        processSettings: *mut WslcProcessSettings,
    ) -> HRESULT {
        (self
            .WslcInitProcessSettings
            .as_ref()
            .expect("Expected function, got error."))(processSettings)
    }
    pub unsafe fn WslcSetProcessSettingsWorkingDirectory(
        &self,
        processSettings: *mut WslcProcessSettings,
        workingDirectory: PCSTR,
    ) -> HRESULT {
        (self
            .WslcSetProcessSettingsWorkingDirectory
            .as_ref()
            .expect("Expected function, got error."))(processSettings, workingDirectory)
    }
    pub unsafe fn WslcSetProcessSettingsCmdLine(
        &self,
        processSettings: *mut WslcProcessSettings,
        argv: *const PCSTR,
        argc: usize,
    ) -> HRESULT {
        (self
            .WslcSetProcessSettingsCmdLine
            .as_ref()
            .expect("Expected function, got error."))(processSettings, argv, argc)
    }
    pub unsafe fn WslcSetProcessSettingsEnvVariables(
        &self,
        processSettings: *mut WslcProcessSettings,
        key_value: *const PCSTR,
        argc: usize,
    ) -> HRESULT {
        (self
            .WslcSetProcessSettingsEnvVariables
            .as_ref()
            .expect("Expected function, got error."))(processSettings, key_value, argc)
    }
    pub unsafe fn WslcSetProcessSettingsCallbacks(
        &self,
        processSettings: *mut WslcProcessSettings,
        callbacks: *const WslcProcessCallbacks,
        context: PVOID,
    ) -> HRESULT {
        (self
            .WslcSetProcessSettingsCallbacks
            .as_ref()
            .expect("Expected function, got error."))(processSettings, callbacks, context)
    }
    pub unsafe fn WslcSetContainerInitProcessIOCallbacks(
        &self,
        container: WslcContainer,
        callbacks: *const WslcProcessCallbacks,
        context: PVOID,
    ) -> HRESULT {
        (self
            .WslcSetContainerInitProcessIOCallbacks
            .as_ref()
            .expect("Expected function, got error."))(container, callbacks, context)
    }
    pub unsafe fn WslcGetProcessPid(&self, process: WslcProcess, pid: *mut u32) -> HRESULT {
        (self
            .WslcGetProcessPid
            .as_ref()
            .expect("Expected function, got error."))(process, pid)
    }
    pub unsafe fn WslcGetProcessExitEvent(
        &self,
        process: WslcProcess,
        exitEvent: *mut HANDLE,
    ) -> HRESULT {
        (self
            .WslcGetProcessExitEvent
            .as_ref()
            .expect("Expected function, got error."))(process, exitEvent)
    }
    pub unsafe fn WslcGetProcessState(
        &self,
        process: WslcProcess,
        state: *mut WslcProcessState,
    ) -> HRESULT {
        (self
            .WslcGetProcessState
            .as_ref()
            .expect("Expected function, got error."))(process, state)
    }
    pub unsafe fn WslcGetProcessExitCode(&self, process: WslcProcess, exitCode: PINT32) -> HRESULT {
        (self
            .WslcGetProcessExitCode
            .as_ref()
            .expect("Expected function, got error."))(process, exitCode)
    }
    pub unsafe fn WslcSignalProcess(&self, process: WslcProcess, signal: WslcSignal) -> HRESULT {
        (self
            .WslcSignalProcess
            .as_ref()
            .expect("Expected function, got error."))(process, signal)
    }
    pub unsafe fn WslcGetProcessIOHandle(
        &self,
        process: WslcProcess,
        ioHandle: WslcProcessIOHandle,
        handle: *mut HANDLE,
    ) -> HRESULT {
        (self
            .WslcGetProcessIOHandle
            .as_ref()
            .expect("Expected function, got error."))(process, ioHandle, handle)
    }
    pub unsafe fn WslcReleaseProcess(&self, process: WslcProcess) -> HRESULT {
        (self
            .WslcReleaseProcess
            .as_ref()
            .expect("Expected function, got error."))(process)
    }
    pub unsafe fn WslcPullSessionImage(
        &self,
        session: WslcSession,
        options: *const WslcPullImageOptions,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcPullSessionImage
            .as_ref()
            .expect("Expected function, got error."))(session, options, errorMessage)
    }
    pub unsafe fn WslcImportSessionImage(
        &self,
        session: WslcSession,
        imageName: PCSTR,
        imageContent: HANDLE,
        imageContentBytes: u64,
        options: *const WslcImportImageOptions,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcImportSessionImage
            .as_ref()
            .expect("Expected function, got error."))(
            session,
            imageName,
            imageContent,
            imageContentBytes,
            options,
            errorMessage,
        )
    }
    pub unsafe fn WslcImportSessionImageFromFile(
        &self,
        session: WslcSession,
        imageName: PCSTR,
        path: PCWSTR,
        options: *const WslcImportImageOptions,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcImportSessionImageFromFile
            .as_ref()
            .expect("Expected function, got error."))(
            session,
            imageName,
            path,
            options,
            errorMessage,
        )
    }
    pub unsafe fn WslcLoadSessionImage(
        &self,
        session: WslcSession,
        imageContent: HANDLE,
        imageContentBytes: u64,
        options: *const WslcLoadImageOptions,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcLoadSessionImage
            .as_ref()
            .expect("Expected function, got error."))(
            session,
            imageContent,
            imageContentBytes,
            options,
            errorMessage,
        )
    }
    pub unsafe fn WslcLoadSessionImageFromFile(
        &self,
        session: WslcSession,
        path: PCWSTR,
        options: *const WslcLoadImageOptions,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcLoadSessionImageFromFile
            .as_ref()
            .expect("Expected function, got error."))(session, path, options, errorMessage)
    }
    pub unsafe fn WslcDeleteSessionImage(
        &self,
        session: WslcSession,
        nameOrID: PCSTR,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcDeleteSessionImage
            .as_ref()
            .expect("Expected function, got error."))(session, nameOrID, errorMessage)
    }
    pub unsafe fn WslcTagSessionImage(
        &self,
        session: WslcSession,
        options: *const WslcTagImageOptions,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcTagSessionImage
            .as_ref()
            .expect("Expected function, got error."))(session, options, errorMessage)
    }
    pub unsafe fn WslcPushSessionImage(
        &self,
        session: WslcSession,
        options: *const WslcPushImageOptions,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcPushSessionImage
            .as_ref()
            .expect("Expected function, got error."))(session, options, errorMessage)
    }
    pub unsafe fn WslcSessionAuthenticate(
        &self,
        session: WslcSession,
        serverAddress: PCSTR,
        username: PCSTR,
        password: PCSTR,
        identityToken: *mut PSTR,
        tokenType: *mut WslcIdentityTokenType,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcSessionAuthenticate
            .as_ref()
            .expect("Expected function, got error."))(
            session,
            serverAddress,
            username,
            password,
            identityToken,
            tokenType,
            errorMessage,
        )
    }
    pub unsafe fn WslcListSessionImages(
        &self,
        session: WslcSession,
        images: *mut *mut WslcImageInfo,
        count: *mut u32,
    ) -> HRESULT {
        (self
            .WslcListSessionImages
            .as_ref()
            .expect("Expected function, got error."))(session, images, count)
    }
    pub unsafe fn WslcCreateSessionVhdVolume(
        &self,
        session: WslcSession,
        options: *const WslcVhdRequirements,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcCreateSessionVhdVolume
            .as_ref()
            .expect("Expected function, got error."))(session, options, errorMessage)
    }
    pub unsafe fn WslcDeleteSessionVhdVolume(
        &self,
        session: WslcSession,
        name: PCSTR,
        errorMessage: *mut PWSTR,
    ) -> HRESULT {
        (self
            .WslcDeleteSessionVhdVolume
            .as_ref()
            .expect("Expected function, got error."))(session, name, errorMessage)
    }
    pub unsafe fn WslcGetMissingComponents(
        &self,
        missingComponents: *mut WslcComponentFlags,
    ) -> HRESULT {
        (self
            .WslcGetMissingComponents
            .as_ref()
            .expect("Expected function, got error."))(missingComponents)
    }
    pub unsafe fn WslcGetVersion(&self, version: *mut WslcVersion) -> HRESULT {
        (self
            .WslcGetVersion
            .as_ref()
            .expect("Expected function, got error."))(version)
    }
    pub unsafe fn WslcInstallWithDependencies(
        &self,
        components: WslcComponentFlags,
        options: WslcInstallOptions,
        progressCallback: WslcInstallCallback,
        context: PVOID,
    ) -> HRESULT {
        (self
            .WslcInstallWithDependencies
            .as_ref()
            .expect("Expected function, got error."))(
            components,
            options,
            progressCallback,
            context,
        )
    }
}