File: err.h

package info (click to toggle)
virtualbox 4.3.18-dfsg-3
  • links: PTS, VCS
  • area: contrib
  • in suites: jessie-kfreebsd
  • size: 285,036 kB
  • sloc: ansic: 1,607,177; cpp: 1,163,026; python: 92,971; asm: 69,935; xml: 67,705; sh: 18,853; makefile: 8,648; perl: 3,177; objc: 2,425; java: 2,112; php: 893; pascal: 489; sed: 442; cs: 226
file content (2441 lines) | stat: -rw-r--r-- 103,934 bytes parent folder | download
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
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
/** @file
 * IPRT - Status Codes.
 */

/*
 * Copyright (C) 2006-2013 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 *
 * The contents of this file may alternatively be used under the terms
 * of the Common Development and Distribution License Version 1.0
 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
 * VirtualBox OSE distribution, in which case the provisions of the
 * CDDL are applicable instead of those of the GPL.
 *
 * You may elect to license modified versions of this file under the
 * terms and conditions of either the GPL or the CDDL or both.
 */

#ifndef ___iprt_err_h
#define ___iprt_err_h

#include <iprt/cdefs.h>
#include <iprt/types.h>
#include <iprt/stdarg.h>


/** @defgroup grp_rt_err            RTErr - Status Codes
 * @ingroup grp_rt
 *
 * The IPRT status codes are in two ranges: {0..999} and {22000..32766}.  The
 * IPRT users are free to use the range {1000..21999}.  See RTERR_RANGE1_FIRST,
 * RTERR_RANGE1_LAST, RTERR_RANGE2_FIRST, RTERR_RANGE2_LAST, RTERR_USER_FIRST
 * and RTERR_USER_LAST.
 *
 * @{
 */

/** @defgroup grp_rt_err_hlp        Status Code Helpers
 * @ingroup grp_rt_err
 * @{
 */

#ifdef __cplusplus
/**
 * Strict type validation class.
 *
 * This is only really useful for type checking the arguments to RT_SUCCESS,
 * RT_SUCCESS_NP, RT_FAILURE and RT_FAILURE_NP.  The RTErrStrictType2
 * constructor is for integration with external status code strictness regimes.
 */
class RTErrStrictType
{
protected:
    int32_t m_rc;

public:
    /**
     * Constructor for interaction with external status code strictness regimes.
     *
     * This is a special constructor for helping external return code validator
     * classes interact cleanly with RT_SUCCESS, RT_SUCCESS_NP, RT_FAILURE and
     * RT_FAILURE_NP while barring automatic cast to integer.
     *
     * @param   rcObj       IPRT status code object from an automatic cast.
     */
    RTErrStrictType(RTErrStrictType2 const rcObj)
        : m_rc(rcObj.getValue())
    {
    }

    /**
     * Integer constructor used by RT_SUCCESS_NP.
     *
     * @param   rc          IPRT style status code.
     */
    RTErrStrictType(int32_t rc)
        : m_rc(rc)
    {
    }

#if 0 /** @todo figure where int32_t is long instead of int. */
    /**
     * Integer constructor used by RT_SUCCESS_NP.
     *
     * @param   rc          IPRT style status code.
     */
    RTErrStrictType(signed int rc)
        : m_rc(rc)
    {
    }
#endif

    /**
     * Test for success.
     */
    bool success() const
    {
        return m_rc >= 0;
    }

private:
    /** @name Try ban a number of wrong types.
     * @{ */
    RTErrStrictType(uint8_t rc)         : m_rc(-999) { NOREF(rc); }
    RTErrStrictType(uint16_t rc)        : m_rc(-999) { NOREF(rc); }
    RTErrStrictType(uint32_t rc)        : m_rc(-999) { NOREF(rc); }
    RTErrStrictType(uint64_t rc)        : m_rc(-999) { NOREF(rc); }
    RTErrStrictType(int8_t rc)          : m_rc(-999) { NOREF(rc); }
    RTErrStrictType(int16_t rc)         : m_rc(-999) { NOREF(rc); }
    RTErrStrictType(int64_t rc)         : m_rc(-999) { NOREF(rc); }
    /** @todo fight long here - clashes with int32_t/int64_t on some platforms. */
    /** @} */
};
#endif /* __cplusplus */


/** @def RTERR_STRICT_RC
 * Indicates that RT_SUCCESS_NP, RT_SUCCESS, RT_FAILURE_NP and RT_FAILURE should
 * make type enforcing at compile time.
 *
 * @remarks     Only define this for C++ code.
 */
#if defined(__cplusplus) \
 && !defined(RTERR_STRICT_RC) \
 && (   defined(DOXYGEN_RUNNING) \
     || defined(DEBUG) \
     || defined(RT_STRICT) )
# define RTERR_STRICT_RC        1
#endif


/** @def RT_SUCCESS
 * Check for success. We expect success in normal cases, that is the code path depending on
 * this check is normally taken. To prevent any prediction use RT_SUCCESS_NP instead.
 *
 * @returns true if rc indicates success.
 * @returns false if rc indicates failure.
 *
 * @param   rc  The iprt status code to test.
 */
#define RT_SUCCESS(rc)      ( RT_LIKELY(RT_SUCCESS_NP(rc)) )

/** @def RT_SUCCESS_NP
 * Check for success. Don't predict the result.
 *
 * @returns true if rc indicates success.
 * @returns false if rc indicates failure.
 *
 * @param   rc  The iprt status code to test.
 */
#ifdef RTERR_STRICT_RC
# define RT_SUCCESS_NP(rc)   ( RTErrStrictType(rc).success() )
#else
# define RT_SUCCESS_NP(rc)   ( (int)(rc) >= VINF_SUCCESS )
#endif

/** @def RT_FAILURE
 * Check for failure. We don't expect in normal cases, that is the code path depending on
 * this check is normally NOT taken. To prevent any prediction use RT_FAILURE_NP instead.
 *
 * @returns true if rc indicates failure.
 * @returns false if rc indicates success.
 *
 * @param   rc  The iprt status code to test.
 */
#define RT_FAILURE(rc)      ( RT_UNLIKELY(!RT_SUCCESS_NP(rc)) )

/** @def RT_FAILURE_NP
 * Check for failure. Don't predict the result.
 *
 * @returns true if rc indicates failure.
 * @returns false if rc indicates success.
 *
 * @param   rc  The iprt status code to test.
 */
#define RT_FAILURE_NP(rc)   ( !RT_SUCCESS_NP(rc) )

RT_C_DECLS_BEGIN

/**
 * Converts a Darwin HRESULT error to an iprt status code.
 *
 * @returns iprt status code.
 * @param   iNativeCode    HRESULT error code.
 * @remark  Darwin ring-3 only.
 */
RTDECL(int)  RTErrConvertFromDarwinCOM(int32_t iNativeCode);

/**
 * Converts a Darwin IOReturn error to an iprt status code.
 *
 * @returns iprt status code.
 * @param   iNativeCode    IOReturn error code.
 * @remark  Darwin only.
 */
RTDECL(int)  RTErrConvertFromDarwinIO(int iNativeCode);

/**
 * Converts a Darwin kern_return_t error to an iprt status code.
 *
 * @returns iprt status code.
 * @param   iNativeCode    kern_return_t error code.
 * @remark  Darwin only.
 */
RTDECL(int)  RTErrConvertFromDarwinKern(int iNativeCode);

/**
 * Converts a Darwin error to an iprt status code.
 *
 * This will consult RTErrConvertFromDarwinKern, RTErrConvertFromDarwinIO
 * and RTErrConvertFromDarwinCOM in this order. The latter is ring-3 only as it
 * doesn't apply elsewhere.
 *
 * @returns iprt status code.
 * @param   iNativeCode    Darwin error code.
 * @remarks Darwin only.
 * @remarks This is recommended over RTErrConvertFromDarwinKern and RTErrConvertFromDarwinIO
 *          since these are really just subsets of the same error space.
 */
RTDECL(int)  RTErrConvertFromDarwin(int iNativeCode);

/**
 * Converts errno to iprt status code.
 *
 * @returns iprt status code.
 * @param   uNativeCode    errno code.
 */
RTDECL(int)  RTErrConvertFromErrno(unsigned uNativeCode);

/**
 * Converts a L4 errno to a iprt status code.
 *
 * @returns iprt status code.
 * @param   uNativeCode l4 errno.
 * @remark  L4 only.
 */
RTDECL(int)  RTErrConvertFromL4Errno(unsigned uNativeCode);

/**
 * Converts NT status code to iprt status code.
 *
 * Needless to say, this is only available on NT and winXX targets.
 *
 * @returns iprt status code.
 * @param   lNativeCode    NT status code.
 * @remark  Windows only.
 */
RTDECL(int)  RTErrConvertFromNtStatus(long lNativeCode);

/**
 * Converts OS/2 error code to iprt status code.
 *
 * @returns iprt status code.
 * @param   uNativeCode    OS/2 error code.
 * @remark  OS/2 only.
 */
RTDECL(int)  RTErrConvertFromOS2(unsigned uNativeCode);

/**
 * Converts Win32 error code to iprt status code.
 *
 * @returns iprt status code.
 * @param   uNativeCode    Win32 error code.
 * @remark  Windows only.
 */
RTDECL(int)  RTErrConvertFromWin32(unsigned uNativeCode);

/**
 * Converts an iprt status code to a errno status code.
 *
 * @returns errno status code.
 * @param   iErr    iprt status code.
 */
RTDECL(int)  RTErrConvertToErrno(int iErr);

#ifdef IN_RING3

/**
 * iprt status code message.
 */
typedef struct RTSTATUSMSG
{
    /** Pointer to the short message string. */
    const char *pszMsgShort;
    /** Pointer to the full message string. */
    const char *pszMsgFull;
    /** Pointer to the define string. */
    const char *pszDefine;
    /** Status code number. */
    int         iCode;
} RTSTATUSMSG;
/** Pointer to iprt status code message. */
typedef RTSTATUSMSG *PRTSTATUSMSG;
/** Pointer to const iprt status code message. */
typedef const RTSTATUSMSG *PCRTSTATUSMSG;

/**
 * Get the message structure corresponding to a given iprt status code.
 *
 * @returns Pointer to read-only message description.
 * @param   rc      The status code.
 */
RTDECL(PCRTSTATUSMSG) RTErrGet(int rc);

/**
 * Get the define corresponding to a given iprt status code.
 *
 * @returns Pointer to read-only string with the \#define identifier.
 * @param   rc      The status code.
 */
#define RTErrGetDefine(rc)      (RTErrGet(rc)->pszDefine)

/**
 * Get the short description corresponding to a given iprt status code.
 *
 * @returns Pointer to read-only string with the description.
 * @param   rc      The status code.
 */
#define RTErrGetShort(rc)       (RTErrGet(rc)->pszMsgShort)

/**
 * Get the full description corresponding to a given iprt status code.
 *
 * @returns Pointer to read-only string with the description.
 * @param   rc      The status code.
 */
#define RTErrGetFull(rc)        (RTErrGet(rc)->pszMsgFull)

#ifdef RT_OS_WINDOWS
/**
 * Windows error code message.
 */
typedef struct RTWINERRMSG
{
    /** Pointer to the full message string. */
    const char *pszMsgFull;
    /** Pointer to the define string. */
    const char *pszDefine;
    /** Error code number. */
    long        iCode;
} RTWINERRMSG;
/** Pointer to Windows error code message. */
typedef RTWINERRMSG *PRTWINERRMSG;
/** Pointer to const Windows error code message. */
typedef const RTWINERRMSG *PCRTWINERRMSG;

/**
 * Get the message structure corresponding to a given Windows error code.
 *
 * @returns Pointer to read-only message description.
 * @param   rc      The status code.
 */
RTDECL(PCRTWINERRMSG) RTErrWinGet(long rc);

/** On windows COM errors are part of the Windows error database. */
typedef RTWINERRMSG RTCOMERRMSG;

#else  /* !RT_OS_WINDOWS */

/**
 * COM/XPCOM error code message.
 */
typedef struct RTCOMERRMSG
{
    /** Pointer to the full message string. */
    const char *pszMsgFull;
    /** Pointer to the define string. */
    const char *pszDefine;
    /** Error code number. */
    uint32_t    iCode;
} RTCOMERRMSG;
#endif /* !RT_OS_WINDOWS */
/** Pointer to a XPCOM/COM error code message. */
typedef RTCOMERRMSG *PRTCOMERRMSG;
/** Pointer to const a XPCOM/COM error code message. */
typedef const RTCOMERRMSG *PCRTCOMERRMSG;

/**
 * Get the message structure corresponding to a given COM/XPCOM error code.
 *
 * @returns Pointer to read-only message description.
 * @param   rc      The status code.
 */
RTDECL(PCRTCOMERRMSG) RTErrCOMGet(uint32_t rc);

#endif /* IN_RING3 */

/** @defgroup RTERRINFO_FLAGS_XXX   RTERRINFO::fFlags
 * @{ */
/** Custom structure (the default). */
#define RTERRINFO_FLAGS_T_CUSTOM    UINT32_C(0)
/** Static structure (RTERRINFOSTATIC). */
#define RTERRINFO_FLAGS_T_STATIC    UINT32_C(1)
/** Allocated structure (RTErrInfoAlloc). */
#define RTERRINFO_FLAGS_T_ALLOC     UINT32_C(2)
/** Reserved type. */
#define RTERRINFO_FLAGS_T_RESERVED  UINT32_C(3)
/** Type mask. */
#define RTERRINFO_FLAGS_T_MASK      UINT32_C(3)
/** Error info is set. */
#define RTERRINFO_FLAGS_SET         RT_BIT_32(2)
/** Fixed flags (magic). */
#define RTERRINFO_FLAGS_MAGIC       UINT32_C(0xbabe0000)
/** The bit mask for the magic value. */
#define RTERRINFO_FLAGS_MAGIC_MASK  UINT32_C(0xffff0000)
/** @} */

/**
 * Initializes an error info structure.
 *
 * @returns @a pErrInfo.
 * @param   pErrInfo            The error info structure to init.
 * @param   pszMsg              The message buffer.  Must be at least one byte.
 * @param   cbMsg               The size of the message buffer.
 */
DECLINLINE(PRTERRINFO) RTErrInfoInit(PRTERRINFO pErrInfo, char *pszMsg, size_t cbMsg)
{
    *pszMsg = '\0';

    pErrInfo->fFlags         = RTERRINFO_FLAGS_T_CUSTOM | RTERRINFO_FLAGS_MAGIC;
    pErrInfo->rc             = /*VINF_SUCCESS*/ 0;
    pErrInfo->pszMsg         = pszMsg;
    pErrInfo->cbMsg          = cbMsg;
    pErrInfo->apvReserved[0] = NULL;
    pErrInfo->apvReserved[1] = NULL;

    return pErrInfo;
}

/**
 * Initialize a static error info structure.
 *
 * @returns Pointer to the core error info structure.
 * @param   pStaticErrInfo      The static error info structure to init.
 */
DECLINLINE(PRTERRINFO) RTErrInfoInitStatic(PRTERRINFOSTATIC pStaticErrInfo)
{
    RTErrInfoInit(&pStaticErrInfo->Core, pStaticErrInfo->szMsg, sizeof(pStaticErrInfo->szMsg));
    pStaticErrInfo->Core.fFlags = RTERRINFO_FLAGS_T_STATIC | RTERRINFO_FLAGS_MAGIC;
    return &pStaticErrInfo->Core;
}

/**
 * Allocates a error info structure with a buffer at least the given size.
 *
 * @returns Pointer to an error info structure on success, NULL on failure.
 *
 * @param   cbMsg               The minimum message buffer size.  Use 0 to get
 *                              the default buffer size.
 */
RTDECL(PRTERRINFO)  RTErrInfoAlloc(size_t cbMsg);

/**
 * Same as RTErrInfoAlloc, except that an IPRT status code is returned.
 *
 * @returns IPRT status code.
 *
 * @param   cbMsg               The minimum message buffer size.  Use 0 to get
 *                              the default buffer size.
 * @param   ppErrInfo           Where to store the pointer to the allocated
 *                              error info structure on success.  This is
 *                              always set to NULL.
 */
RTDECL(int)         RTErrInfoAllocEx(size_t cbMsg, PRTERRINFO *ppErrInfo);

/**
 * Frees an error info structure allocated by RTErrInfoAlloc or
 * RTErrInfoAllocEx.
 *
 * @param   pErrInfo            The error info structure.
 */
RTDECL(void)        RTErrInfoFree(PRTERRINFO pErrInfo);

/**
 * Fills in the error info details.
 *
 * @returns @a rc.
 *
 * @param   pErrInfo            The error info structure to fill in.
 * @param   rc                  The status code to return.
 * @param   pszMsg              The error message string.
 */
RTDECL(int)         RTErrInfoSet(PRTERRINFO pErrInfo, int rc, const char *pszMsg);

/**
 * Fills in the error info details, with a sprintf style message.
 *
 * @returns @a rc.
 *
 * @param   pErrInfo            The error info structure to fill in.
 * @param   rc                  The status code to return.
 * @param   pszFormat           The format string.
 * @param   ...                 The format arguments.
 */
RTDECL(int)         RTErrInfoSetF(PRTERRINFO pErrInfo, int rc, const char *pszFormat, ...);

/**
 * Fills in the error info details, with a vsprintf style message.
 *
 * @returns @a rc.
 *
 * @param   pErrInfo            The error info structure to fill in.
 * @param   rc                  The status code to return.
 * @param   pszFormat           The format string.
 * @param   va                  The format arguments.
 */
RTDECL(int)         RTErrInfoSetV(PRTERRINFO pErrInfo, int rc, const char *pszFormat, va_list va);

/**
 * Adds more error info details.
 *
 * @returns @a rc.
 *
 * @param   pErrInfo            The error info structure to fill in.
 * @param   rc                  The status code to return.
 * @param   pszMsg              The error message string to add.
 */
RTDECL(int)         RTErrInfoAdd(PRTERRINFO pErrInfo, int rc, const char *pszMsg);

/**
 * Adds more error info details, with a sprintf style message.
 *
 * @returns @a rc.
 *
 * @param   pErrInfo            The error info structure to fill in.
 * @param   rc                  The status code to return.
 * @param   pszFormat           The format string to add.
 * @param   ...                 The format arguments.
 */
RTDECL(int)         RTErrInfoAddF(PRTERRINFO pErrInfo, int rc, const char *pszFormat, ...);

/**
 * Adds more error info details, with a vsprintf style message.
 *
 * @returns @a rc.
 *
 * @param   pErrInfo            The error info structure to fill in.
 * @param   rc                  The status code to return.
 * @param   pszFormat           The format string to add.
 * @param   va                  The format arguments.
 */
RTDECL(int)         RTErrInfoAddV(PRTERRINFO pErrInfo, int rc, const char *pszFormat, va_list va);

/**
 * Checks if the error info is set.
 *
 * @returns true if set, false if not.
 * @param   pErrInfo            The error info structure. NULL is OK.
 */
DECLINLINE(bool)    RTErrInfoIsSet(PCRTERRINFO pErrInfo)
{
    if (!pErrInfo)
        return false;
    return (pErrInfo->fFlags & (RTERRINFO_FLAGS_MAGIC_MASK | RTERRINFO_FLAGS_SET))
        == (RTERRINFO_FLAGS_MAGIC | RTERRINFO_FLAGS_SET);
}

/**
 * Clears the error info structure.
 *
 * @param   pErrInfo            The error info structure. NULL is OK.
 */
DECLINLINE(void)    RTErrInfoClear(PRTERRINFO pErrInfo)
{
    if (pErrInfo)
    {
        pErrInfo->fFlags &= ~RTERRINFO_FLAGS_SET;
        pErrInfo->rc      = /*VINF_SUCCESS*/0;
        *pErrInfo->pszMsg = '\0';
    }
}

/**
 * Storage for error variables.
 *
 * @remarks Do NOT touch the members!  They are platform specific and what's
 *          where may change at any time!
 */
typedef union RTERRVARS
{
    int8_t  ai8Vars[32];
    int16_t ai16Vars[16];
    int32_t ai32Vars[8];
    int64_t ai64Vars[4];
} RTERRVARS;
/** Pointer to an error variable storage union.  */
typedef RTERRVARS *PRTERRVARS;
/** Pointer to a const error variable storage union.  */
typedef RTERRVARS const *PCRTERRVARS;

/**
 * Saves the error variables.
 *
 * @returns @a pVars.
 * @param   pVars       The variable storage union.
 */
RTDECL(PRTERRVARS) RTErrVarsSave(PRTERRVARS pVars);

/**
 * Restores the error variables.
 *
 * @param   pVars       The variable storage union.
 */
RTDECL(void) RTErrVarsRestore(PCRTERRVARS pVars);

/**
 * Checks if the first variable set equals the second.
 *
 * @returns true if they are equal, false if not.
 * @param   pVars1      The first variable storage union.
 * @param   pVars2      The second variable storage union.
 */
RTDECL(bool) RTErrVarsAreEqual(PCRTERRVARS pVars1, PCRTERRVARS pVars2);

/**
 * Checks if the (live) error variables have changed since we saved them.
 *
 * @returns @c true if they have changed, @c false if not.
 * @param   pVars       The saved variables to compare the current state
 *                      against.
 */
RTDECL(bool) RTErrVarsHaveChanged(PCRTERRVARS pVars);

RT_C_DECLS_END

/** @} */

/** @name Status Code Ranges
 * @{ */
/** The first status code in the primary IPRT range. */
#define RTERR_RANGE1_FIRST                  0
/** The last status code in the primary IPRT range. */
#define RTERR_RANGE1_LAST                   999

/** The first status code in the secondary IPRT range. */
#define RTERR_RANGE2_FIRST                  22000
/** The last status code in the secondary IPRT range. */
#define RTERR_RANGE2_LAST                   32766

/** The first status code in the user range. */
#define RTERR_USER_FIRST                    1000
/** The last status code in the user range. */
#define RTERR_USER_LAST                     21999
/** @}  */


/* SED-START */

/** @name Misc. Status Codes
 * @{
 */
/** Success. */
#define VINF_SUCCESS                        0

/** General failure - DON'T USE THIS!!! */
#define VERR_GENERAL_FAILURE                (-1)
/** Invalid parameter. */
#define VERR_INVALID_PARAMETER              (-2)
/** Invalid parameter. */
#define VWRN_INVALID_PARAMETER              2
/** Invalid magic or cookie. */
#define VERR_INVALID_MAGIC                  (-3)
/** Invalid magic or cookie. */
#define VWRN_INVALID_MAGIC                  3
/** Invalid loader handle. */
#define VERR_INVALID_HANDLE                 (-4)
/** Invalid loader handle. */
#define VWRN_INVALID_HANDLE                 4
/** Failed to lock the address range. */
#define VERR_LOCK_FAILED                    (-5)
/** Invalid memory pointer. */
#define VERR_INVALID_POINTER                (-6)
/** Failed to patch the IDT. */
#define VERR_IDT_FAILED                     (-7)
/** Memory allocation failed. */
#define VERR_NO_MEMORY                      (-8)
/** Already loaded. */
#define VERR_ALREADY_LOADED                 (-9)
/** Permission denied. */
#define VERR_PERMISSION_DENIED              (-10)
/** Permission denied. */
#define VINF_PERMISSION_DENIED              10
/** Version mismatch. */
#define VERR_VERSION_MISMATCH               (-11)
/** The request function is not implemented. */
#define VERR_NOT_IMPLEMENTED                (-12)
/** Invalid flags was given. */
#define VERR_INVALID_FLAGS                  (-13)

/** Not equal. */
#define VERR_NOT_EQUAL                      (-18)
/** The specified path does not point at a symbolic link. */
#define VERR_NOT_SYMLINK                    (-19)
/** Failed to allocate temporary memory. */
#define VERR_NO_TMP_MEMORY                  (-20)
/** Invalid file mode mask (RTFMODE). */
#define VERR_INVALID_FMODE                  (-21)
/** Incorrect call order. */
#define VERR_WRONG_ORDER                    (-22)
/** There is no TLS (thread local storage) available for storing the current thread. */
#define VERR_NO_TLS_FOR_SELF                (-23)
/** Failed to set the TLS (thread local storage) entry which points to our thread structure. */
#define VERR_FAILED_TO_SET_SELF_TLS         (-24)
/** Not able to allocate contiguous memory. */
#define VERR_NO_CONT_MEMORY                 (-26)
/** No memory available for page table or page directory. */
#define VERR_NO_PAGE_MEMORY                 (-27)
/** Already initialized. */
#define VINF_ALREADY_INITIALIZED            28
/** The specified thread is dead. */
#define VERR_THREAD_IS_DEAD                 (-29)
/** The specified thread is not waitable. */
#define VERR_THREAD_NOT_WAITABLE            (-30)
/** Pagetable not present. */
#define VERR_PAGE_TABLE_NOT_PRESENT         (-31)
/** Invalid context.
 * Typically an API was used by the wrong thread. */
#define VERR_INVALID_CONTEXT                (-32)
/** The per process timer is busy. */
#define VERR_TIMER_BUSY                     (-33)
/** Address conflict. */
#define VERR_ADDRESS_CONFLICT               (-34)
/** Unresolved (unknown) host platform error. */
#define VERR_UNRESOLVED_ERROR               (-35)
/** Invalid function. */
#define VERR_INVALID_FUNCTION               (-36)
/** Not supported. */
#define VERR_NOT_SUPPORTED                  (-37)
/** Not supported. */
#define VINF_NOT_SUPPORTED                  37
/** Access denied. */
#define VERR_ACCESS_DENIED                  (-38)
/** Call interrupted. */
#define VERR_INTERRUPTED                    (-39)
/** Call interrupted. */
#define VINF_INTERRUPTED                    39
/** Timeout. */
#define VERR_TIMEOUT                        (-40)
/** Timeout. */
#define VINF_TIMEOUT                        40
/** Buffer too small to save result. */
#define VERR_BUFFER_OVERFLOW                (-41)
/** Buffer too small to save result. */
#define VINF_BUFFER_OVERFLOW                41
/** Data size overflow. */
#define VERR_TOO_MUCH_DATA                  (-42)
/** Max threads number reached. */
#define VERR_MAX_THRDS_REACHED              (-43)
/** Max process number reached. */
#define VERR_MAX_PROCS_REACHED              (-44)
/** The recipient process has refused the signal. */
#define VERR_SIGNAL_REFUSED                 (-45)
/** A signal is already pending. */
#define VERR_SIGNAL_PENDING                 (-46)
/** The signal being posted is not correct. */
#define VERR_SIGNAL_INVALID                 (-47)
/** The state changed.
 * This is a generic error message and needs a context to make sense. */
#define VERR_STATE_CHANGED                  (-48)
/** Warning, the state changed.
 * This is a generic error message and needs a context to make sense. */
#define VWRN_STATE_CHANGED                  48
/** Error while parsing UUID string */
#define VERR_INVALID_UUID_FORMAT            (-49)
/** The specified process was not found. */
#define VERR_PROCESS_NOT_FOUND              (-50)
/** The process specified to a non-block wait had not exited. */
#define VERR_PROCESS_RUNNING                (-51)
/** Retry the operation. */
#define VERR_TRY_AGAIN                      (-52)
/** Retry the operation. */
#define VINF_TRY_AGAIN                      52
/** Generic parse error. */
#define VERR_PARSE_ERROR                    (-53)
/** Value out of range. */
#define VERR_OUT_OF_RANGE                   (-54)
/** A numeric conversion encountered a value which was too big for the target. */
#define VERR_NUMBER_TOO_BIG                 (-55)
/** A numeric conversion encountered a value which was too big for the target. */
#define VWRN_NUMBER_TOO_BIG                 55
/** The number begin converted (string) contained no digits. */
#define VERR_NO_DIGITS                      (-56)
/** The number begin converted (string) contained no digits. */
#define VWRN_NO_DIGITS                      56
/** Encountered a '-' during conversion to an unsigned value. */
#define VERR_NEGATIVE_UNSIGNED              (-57)
/** Encountered a '-' during conversion to an unsigned value. */
#define VWRN_NEGATIVE_UNSIGNED              57
/** Error while characters translation (unicode and so). */
#define VERR_NO_TRANSLATION                 (-58)
/** Error while characters translation (unicode and so). */
#define VWRN_NO_TRANSLATION                 58
/** Encountered unicode code point which is reserved for use as endian indicator (0xffff or 0xfffe). */
#define VERR_CODE_POINT_ENDIAN_INDICATOR    (-59)
/** Encountered unicode code point in the surrogate range (0xd800 to 0xdfff). */
#define VERR_CODE_POINT_SURROGATE           (-60)
/** A string claiming to be UTF-8 is incorrectly encoded. */
#define VERR_INVALID_UTF8_ENCODING          (-61)
/** Ad string claiming to be in UTF-16 is incorrectly encoded. */
#define VERR_INVALID_UTF16_ENCODING         (-62)
/** Encountered a unicode code point which cannot be represented as UTF-16. */
#define VERR_CANT_RECODE_AS_UTF16           (-63)
/** Got an out of memory condition trying to allocate a string. */
#define VERR_NO_STR_MEMORY                  (-64)
/** Got an out of memory condition trying to allocate a UTF-16 (/UCS-2) string. */
#define VERR_NO_UTF16_MEMORY                (-65)
/** Get an out of memory condition trying to allocate a code point array. */
#define VERR_NO_CODE_POINT_MEMORY           (-66)
/** Can't free the memory because it's used in mapping. */
#define VERR_MEMORY_BUSY                    (-67)
/** The timer can't be started because it's already active. */
#define VERR_TIMER_ACTIVE                   (-68)
/** The timer can't be stopped because i's already suspended. */
#define VERR_TIMER_SUSPENDED                (-69)
/** The operation was cancelled by the user (copy) or another thread (local ipc). */
#define VERR_CANCELLED                      (-70)
/** Failed to initialize a memory object.
 * Exactly what this means is OS specific. */
#define VERR_MEMOBJ_INIT_FAILED             (-71)
/** Out of memory condition when allocating memory with low physical backing. */
#define VERR_NO_LOW_MEMORY                  (-72)
/** Out of memory condition when allocating physical memory (without mapping). */
#define VERR_NO_PHYS_MEMORY                 (-73)
/** The address (virtual or physical) is too big. */
#define VERR_ADDRESS_TOO_BIG                (-74)
/** Failed to map a memory object. */
#define VERR_MAP_FAILED                     (-75)
/** Trailing characters. */
#define VERR_TRAILING_CHARS                 (-76)
/** Trailing characters. */
#define VWRN_TRAILING_CHARS                 76
/** Trailing spaces. */
#define VERR_TRAILING_SPACES                (-77)
/** Trailing spaces. */
#define VWRN_TRAILING_SPACES                77
/** Generic not found error. */
#define VERR_NOT_FOUND                      (-78)
/** Generic not found warning. */
#define VWRN_NOT_FOUND                      78
/** Generic invalid state error. */
#define VERR_INVALID_STATE                  (-79)
/** Generic invalid state warning. */
#define VWRN_INVALID_STATE                  79
/** Generic out of resources error. */
#define VERR_OUT_OF_RESOURCES               (-80)
/** Generic out of resources warning. */
#define VWRN_OUT_OF_RESOURCES               80
/** No more handles available, too many open handles. */
#define VERR_NO_MORE_HANDLES                (-81)
/** Preemption is disabled.
 * The requested operation can only be performed when preemption is enabled. */
#define VERR_PREEMPT_DISABLED               (-82)
/** End of string. */
#define VERR_END_OF_STRING                  (-83)
/** End of string. */
#define VINF_END_OF_STRING                  83
/** A page count is out of range. */
#define VERR_PAGE_COUNT_OUT_OF_RANGE        (-84)
/** Generic object destroyed status. */
#define VERR_OBJECT_DESTROYED               (-85)
/** Generic object was destroyed by the call status. */
#define VINF_OBJECT_DESTROYED               85
/** Generic dangling objects status. */
#define VERR_DANGLING_OBJECTS               (-86)
/** Generic dangling objects status. */
#define VWRN_DANGLING_OBJECTS               86
/** Invalid Base64 encoding. */
#define VERR_INVALID_BASE64_ENCODING        (-87)
/** Return instigated by a callback or similar. */
#define VERR_CALLBACK_RETURN                (-88)
/** Return instigated by a callback or similar. */
#define VINF_CALLBACK_RETURN                88
/** Authentication failure. */
#define VERR_AUTHENTICATION_FAILURE         (-89)
/** Not a power of two. */
#define VERR_NOT_POWER_OF_TWO               (-90)
/** Status code, typically given as a parameter, that isn't supposed to be used. */
#define VERR_IGNORED                        (-91)
/** Concurrent access to the object is not allowed. */
#define VERR_CONCURRENT_ACCESS              (-92)
/** The caller does not have a reference to the object.
 * This status is used when two threads is caught sharing the same object
 * reference. */
#define VERR_CALLER_NO_REFERENCE            (-93)
/** Generic no change error. */
#define VERR_NO_CHANGE                      (-95)
/** Generic no change info. */
#define VINF_NO_CHANGE                      95
/** Out of memory condition when allocating executable memory. */
#define VERR_NO_EXEC_MEMORY                 (-96)
/** The alignment is not supported. */
#define VERR_UNSUPPORTED_ALIGNMENT          (-97)
/** The alignment is not really supported, however we got lucky with this
 * allocation. */
#define VINF_UNSUPPORTED_ALIGNMENT          97
/** Duplicate something. */
#define VERR_DUPLICATE                      (-98)
/** Something is missing. */
#define VERR_MISSING                        (-99)
/** An unexpected (/unknown) exception was caught. */
#define VERR_UNEXPECTED_EXCEPTION           (-22400)
/** Buffer underflow. */
#define VERR_BUFFER_UNDERFLOW               (-22401)
/** Buffer underflow. */
#define VINF_BUFFER_UNDERFLOW               22401
/** Uneven input. */
#define VERR_UNEVEN_INPUT                   (-22402)
/** Something is not available or not working properly. */
#define VERR_NOT_AVAILABLE                  (-22403)
/** The RTPROC_FLAGS_DETACHED flag isn't supported. */
#define VERR_PROC_DETACH_NOT_SUPPORTED      (-22404)
/** An account is restricted in a certain way. */
#define VERR_ACCOUNT_RESTRICTED             (-22405)
/** An account is restricted in a certain way. */
#define VINF_ACCOUNT_RESTRICTED             22405
/** Not able satisfy all the requirements of the request. */
#define VERR_UNABLE_TO_SATISFY_REQUIREMENTS (-22406)
/** Not able satisfy all the requirements of the request. */
#define VWRN_UNABLE_TO_SATISFY_REQUIREMENTS 22406
/** The requested allocation is too big. */
#define VERR_ALLOCATION_TOO_BIG             (-22407)
/** @} */


/** @name Common File/Disk/Pipe/etc Status Codes
 * @{
 */
/** Unresolved (unknown) file i/o error. */
#define VERR_FILE_IO_ERROR                  (-100)
/** File/Device open failed. */
#define VERR_OPEN_FAILED                    (-101)
/** File not found. */
#define VERR_FILE_NOT_FOUND                 (-102)
/** Path not found. */
#define VERR_PATH_NOT_FOUND                 (-103)
/** Invalid (malformed) file/path name. */
#define VERR_INVALID_NAME                   (-104)
/** The object in question already exists. */
#define VERR_ALREADY_EXISTS                 (-105)
/** The object in question already exists. */
#define VWRN_ALREADY_EXISTS                 105
/** Too many open files. */
#define VERR_TOO_MANY_OPEN_FILES            (-106)
/** Seek error. */
#define VERR_SEEK                           (-107)
/** Seek below file start. */
#define VERR_NEGATIVE_SEEK                  (-108)
/** Trying to seek on device. */
#define VERR_SEEK_ON_DEVICE                 (-109)
/** Reached the end of the file. */
#define VERR_EOF                            (-110)
/** Reached the end of the file. */
#define VINF_EOF                            110
/** Generic file read error. */
#define VERR_READ_ERROR                     (-111)
/** Generic file write error. */
#define VERR_WRITE_ERROR                    (-112)
/** Write protect error. */
#define VERR_WRITE_PROTECT                  (-113)
/** Sharing violation, file is being used by another process. */
#define VERR_SHARING_VIOLATION              (-114)
/** Unable to lock a region of a file. */
#define VERR_FILE_LOCK_FAILED               (-115)
/** File access error, another process has locked a portion of the file. */
#define VERR_FILE_LOCK_VIOLATION            (-116)
/** File or directory can't be created. */
#define VERR_CANT_CREATE                    (-117)
/** Directory can't be deleted. */
#define VERR_CANT_DELETE_DIRECTORY          (-118)
/** Can't move file to another disk. */
#define VERR_NOT_SAME_DEVICE                (-119)
/** The filename or extension is too long. */
#define VERR_FILENAME_TOO_LONG              (-120)
/** Media not present in drive. */
#define VERR_MEDIA_NOT_PRESENT              (-121)
/** The type of media was not recognized. Not formatted? */
#define VERR_MEDIA_NOT_RECOGNIZED           (-122)
/** Can't unlock - region was not locked. */
#define VERR_FILE_NOT_LOCKED                (-123)
/** Unrecoverable error: lock was lost. */
#define VERR_FILE_LOCK_LOST                 (-124)
/** Can't delete directory with files. */
#define VERR_DIR_NOT_EMPTY                  (-125)
/** A directory operation was attempted on a non-directory object. */
#define VERR_NOT_A_DIRECTORY                (-126)
/** A non-directory operation was attempted on a directory object. */
#define VERR_IS_A_DIRECTORY                 (-127)
/** Tried to grow a file beyond the limit imposed by the process or the filesystem. */
#define VERR_FILE_TOO_BIG                   (-128)
/** No pending request the aio context has to wait for completion. */
#define VERR_FILE_AIO_NO_REQUEST            (-129)
/** The request could not be canceled or prepared for another transfer
 *  because it is still in progress. */
#define VERR_FILE_AIO_IN_PROGRESS           (-130)
/** The request could not be canceled because it already completed. */
#define VERR_FILE_AIO_COMPLETED             (-131)
/** The I/O context couldn't be destroyed because there are still pending requests. */
#define VERR_FILE_AIO_BUSY                  (-132)
/** The requests couldn't be submitted because that would exceed the capacity of the context. */
#define VERR_FILE_AIO_LIMIT_EXCEEDED        (-133)
/** The request was canceled. */
#define VERR_FILE_AIO_CANCELED              (-134)
/** The request wasn't submitted so it can't be canceled. */
#define VERR_FILE_AIO_NOT_SUBMITTED         (-135)
/** A request was not prepared and thus could not be submitted. */
#define VERR_FILE_AIO_NOT_PREPARED          (-136)
/** Not all requests could be submitted due to resource shortage. */
#define VERR_FILE_AIO_INSUFFICIENT_RESSOURCES (-137)
/** Device or resource is busy. */
#define VERR_RESOURCE_BUSY                  (-138)
/** A file operation was attempted on a non-file object. */
#define VERR_NOT_A_FILE                     (-139)
/** A non-file operation was attempted on a file object. */
#define VERR_IS_A_FILE                      (-140)
/** Unexpected filesystem object type. */
#define VERR_UNEXPECTED_FS_OBJ_TYPE         (-141)
/** A path does not start with a root specification. */
#define VERR_PATH_DOES_NOT_START_WITH_ROOT  (-142)
/** A path is relative, expected an absolute path. */
#define VERR_PATH_IS_RELATIVE               (-143)
/** A path is not relative (start with root), expected an relative path. */
#define VERR_PATH_IS_NOT_RELATIVE           (-144)
/** Zero length path. */
#define VERR_PATH_ZERO_LENGTH               (-145)
/** @} */


/** @name Generic Filesystem I/O Status Codes
 * @{
 */
/** Unresolved (unknown) disk i/o error.  */
#define VERR_DISK_IO_ERROR                  (-150)
/** Invalid drive number. */
#define VERR_INVALID_DRIVE                  (-151)
/** Disk is full. */
#define VERR_DISK_FULL                      (-152)
/** Disk was changed. */
#define VERR_DISK_CHANGE                    (-153)
/** Drive is locked. */
#define VERR_DRIVE_LOCKED                   (-154)
/** The specified disk or diskette cannot be accessed. */
#define VERR_DISK_INVALID_FORMAT            (-155)
/** Too many symbolic links. */
#define VERR_TOO_MANY_SYMLINKS              (-156)
/** The OS does not support setting the time stamps on a symbolic link. */
#define VERR_NS_SYMLINK_SET_TIME            (-157)
/** The OS does not support changing the owner of a symbolic link. */
#define VERR_NS_SYMLINK_CHANGE_OWNER        (-158)
/** @} */


/** @name Generic Directory Enumeration Status Codes
 * @{
 */
/** Unresolved (unknown) search error. */
#define VERR_SEARCH_ERROR                   (-200)
/** No more files found. */
#define VERR_NO_MORE_FILES                  (-201)
/** No more search handles available. */
#define VERR_NO_MORE_SEARCH_HANDLES         (-202)
/** RTDirReadEx() failed to retrieve the extra data which was requested. */
#define VWRN_NO_DIRENT_INFO                 203
/** @} */


/** @name Internal Processing Errors
 * @{
 */
/** Internal error - this should never happen.  */
#define VERR_INTERNAL_ERROR                 (-225)
/** Internal error no. 2. */
#define VERR_INTERNAL_ERROR_2               (-226)
/** Internal error no. 3. */
#define VERR_INTERNAL_ERROR_3               (-227)
/** Internal error no. 4. */
#define VERR_INTERNAL_ERROR_4               (-228)
/** Internal error no. 5. */
#define VERR_INTERNAL_ERROR_5               (-229)
/** Internal error: Unexpected status code. */
#define VERR_IPE_UNEXPECTED_STATUS          (-230)
/** Internal error: Unexpected status code. */
#define VERR_IPE_UNEXPECTED_INFO_STATUS     (-231)
/** Internal error: Unexpected status code. */
#define VERR_IPE_UNEXPECTED_ERROR_STATUS    (-232)
/** Internal error: Uninitialized status code.
 * @remarks This is used by value elsewhere.  */
#define VERR_IPE_UNINITIALIZED_STATUS       (-233)
/** Internal error: Supposedly unreachable default case in a switch. */
#define VERR_IPE_NOT_REACHED_DEFAULT_CASE   (-234)
/** @} */


/** @name Generic Device I/O Status Codes
 * @{
 */
/** Unresolved (unknown) device i/o error. */
#define VERR_DEV_IO_ERROR                   (-250)
/** Device i/o: Bad unit. */
#define VERR_IO_BAD_UNIT                    (-251)
/** Device i/o: Not ready. */
#define VERR_IO_NOT_READY                   (-252)
/** Device i/o: Bad command. */
#define VERR_IO_BAD_COMMAND                 (-253)
/** Device i/o: CRC error. */
#define VERR_IO_CRC                         (-254)
/** Device i/o: Bad length. */
#define VERR_IO_BAD_LENGTH                  (-255)
/** Device i/o: Sector not found. */
#define VERR_IO_SECTOR_NOT_FOUND            (-256)
/** Device i/o: General failure. */
#define VERR_IO_GEN_FAILURE                 (-257)
/** @} */


/** @name Generic Pipe I/O Status Codes
 * @{
 */
/** Unresolved (unknown) pipe i/o error. */
#define VERR_PIPE_IO_ERROR                  (-300)
/** Broken pipe. */
#define VERR_BROKEN_PIPE                    (-301)
/** Bad pipe. */
#define VERR_BAD_PIPE                       (-302)
/** Pipe is busy. */
#define VERR_PIPE_BUSY                      (-303)
/** No data in pipe. */
#define VERR_NO_DATA                        (-304)
/** Pipe is not connected. */
#define VERR_PIPE_NOT_CONNECTED             (-305)
/** More data available in pipe. */
#define VERR_MORE_DATA                      (-306)
/** Expected read pipe, got a write pipe instead. */
#define VERR_PIPE_NOT_READ                  (-307)
/** Expected write pipe, got a read pipe instead. */
#define VERR_PIPE_NOT_WRITE                 (-308)
/** @} */


/** @name Generic Semaphores Status Codes
 * @{
 */
/** Unresolved (unknown) semaphore error. */
#define VERR_SEM_ERROR                      (-350)
/** Too many semaphores. */
#define VERR_TOO_MANY_SEMAPHORES            (-351)
/** Exclusive semaphore is owned by another process. */
#define VERR_EXCL_SEM_ALREADY_OWNED         (-352)
/** The semaphore is set and cannot be closed. */
#define VERR_SEM_IS_SET                     (-353)
/** The semaphore cannot be set again. */
#define VERR_TOO_MANY_SEM_REQUESTS          (-354)
/** Attempt to release mutex not owned by caller. */
#define VERR_NOT_OWNER                      (-355)
/** The semaphore has been opened too many times. */
#define VERR_TOO_MANY_OPENS                 (-356)
/** The maximum posts for the event semaphore has been reached. */
#define VERR_TOO_MANY_POSTS                 (-357)
/** The event semaphore has already been posted. */
#define VERR_ALREADY_POSTED                 (-358)
/** The event semaphore has already been reset. */
#define VERR_ALREADY_RESET                  (-359)
/** The semaphore is in use. */
#define VERR_SEM_BUSY                       (-360)
/** The previous ownership of this semaphore has ended. */
#define VERR_SEM_OWNER_DIED                 (-361)
/** Failed to open semaphore by name - not found. */
#define VERR_SEM_NOT_FOUND                  (-362)
/** Semaphore destroyed while waiting. */
#define VERR_SEM_DESTROYED                  (-363)
/** Nested ownership requests are not permitted for this semaphore type. */
#define VERR_SEM_NESTED                     (-364)
/** The release call only release a semaphore nesting, i.e. the caller is still
 * holding the semaphore. */
#define VINF_SEM_NESTED                     (364)
/** Deadlock detected. */
#define VERR_DEADLOCK                       (-365)
/** Ping-Pong listen or speak out of turn error. */
#define VERR_SEM_OUT_OF_TURN                (-366)
/** Tried to take a semaphore in a bad context. */
#define VERR_SEM_BAD_CONTEXT                (-367)
/** Don't spin for the semaphore, but it is safe to try grab it. */
#define VINF_SEM_BAD_CONTEXT                (367)
/** Wrong locking order detected. */
#define VERR_SEM_LV_WRONG_ORDER             (-368)
/** Wrong release order detected. */
#define VERR_SEM_LV_WRONG_RELEASE_ORDER     (-369)
/** Attempt to recursively enter a non-recurisve lock. */
#define VERR_SEM_LV_NESTED                  (-370)
/** Invalid parameters passed to the lock validator. */
#define VERR_SEM_LV_INVALID_PARAMETER       (-371)
/** The lock validator detected a deadlock. */
#define VERR_SEM_LV_DEADLOCK                (-372)
/** The lock validator detected an existing deadlock.
 * The deadlock was not caused by the current operation, but existed already. */
#define VERR_SEM_LV_EXISTING_DEADLOCK       (-373)
/** Not the lock owner according our records. */
#define VERR_SEM_LV_NOT_OWNER               (-374)
/** An illegal lock upgrade was attempted. */
#define VERR_SEM_LV_ILLEGAL_UPGRADE         (-375)
/** The thread is not a valid signaller of the event. */
#define VERR_SEM_LV_NOT_SIGNALLER           (-376)
/** Internal error in the lock validator or related components. */
#define VERR_SEM_LV_INTERNAL_ERROR          (-377)
/** @} */


/** @name Generic Network I/O Status Codes
 * @{
 */
/** Unresolved (unknown) network error. */
#define VERR_NET_IO_ERROR                       (-400)
/** The network is busy or is out of resources. */
#define VERR_NET_OUT_OF_RESOURCES               (-401)
/** Net host name not found. */
#define VERR_NET_HOST_NOT_FOUND                 (-402)
/** Network path not found. */
#define VERR_NET_PATH_NOT_FOUND                 (-403)
/** General network printing error. */
#define VERR_NET_PRINT_ERROR                    (-404)
/** The machine is not on the network. */
#define VERR_NET_NO_NETWORK                     (-405)
/** Name is not unique on the network. */
#define VERR_NET_NOT_UNIQUE_NAME                (-406)

/* These are BSD networking error codes - numbers correspond, don't mess! */
/** Operation in progress. */
#define VERR_NET_IN_PROGRESS                    (-436)
/** Operation already in progress. */
#define VERR_NET_ALREADY_IN_PROGRESS            (-437)
/** Attempted socket operation with a non-socket handle.
 * (This includes closed handles.) */
#define VERR_NET_NOT_SOCKET                     (-438)
/** Destination address required. */
#define VERR_NET_DEST_ADDRESS_REQUIRED          (-439)
/** Message too long. */
#define VERR_NET_MSG_SIZE                       (-440)
/** Protocol wrong type for socket. */
#define VERR_NET_PROTOCOL_TYPE                  (-441)
/** Protocol not available. */
#define VERR_NET_PROTOCOL_NOT_AVAILABLE         (-442)
/** Protocol not supported. */
#define VERR_NET_PROTOCOL_NOT_SUPPORTED         (-443)
/** Socket type not supported. */
#define VERR_NET_SOCKET_TYPE_NOT_SUPPORTED      (-444)
/** Operation not supported. */
#define VERR_NET_OPERATION_NOT_SUPPORTED        (-445)
/** Protocol family not supported. */
#define VERR_NET_PROTOCOL_FAMILY_NOT_SUPPORTED  (-446)
/** Address family not supported by protocol family. */
#define VERR_NET_ADDRESS_FAMILY_NOT_SUPPORTED   (-447)
/** Address already in use. */
#define VERR_NET_ADDRESS_IN_USE                 (-448)
/** Can't assign requested address. */
#define VERR_NET_ADDRESS_NOT_AVAILABLE          (-449)
/** Network is down. */
#define VERR_NET_DOWN                           (-450)
/** Network is unreachable. */
#define VERR_NET_UNREACHABLE                    (-451)
/** Network dropped connection on reset. */
#define VERR_NET_CONNECTION_RESET               (-452)
/** Software caused connection abort. */
#define VERR_NET_CONNECTION_ABORTED             (-453)
/** Connection reset by peer. */
#define VERR_NET_CONNECTION_RESET_BY_PEER       (-454)
/** No buffer space available. */
#define VERR_NET_NO_BUFFER_SPACE                (-455)
/** Socket is already connected. */
#define VERR_NET_ALREADY_CONNECTED              (-456)
/** Socket is not connected. */
#define VERR_NET_NOT_CONNECTED                  (-457)
/** Can't send after socket shutdown. */
#define VERR_NET_SHUTDOWN                       (-458)
/** Too many references: can't splice. */
#define VERR_NET_TOO_MANY_REFERENCES            (-459)
/** Too many references: can't splice. */
#define VERR_NET_CONNECTION_TIMED_OUT           (-460)
/** Connection refused. */
#define VERR_NET_CONNECTION_REFUSED             (-461)
/* ELOOP is not net. */
/* ENAMETOOLONG is not net. */
/** Host is down. */
#define VERR_NET_HOST_DOWN                      (-464)
/** No route to host. */
#define VERR_NET_HOST_UNREACHABLE               (-465)
/** Protocol error. */
#define VERR_NET_PROTOCOL_ERROR                 (-466)
/** Incomplete packet was submitted by guest. */
#define VERR_NET_INCOMPLETE_TX_PACKET           (-467)
/** @} */


/** @name TCP Status Codes
 * @{
 */
/** Stop the TCP server. */
#define VERR_TCP_SERVER_STOP                    (-500)
/** The server was stopped. */
#define VINF_TCP_SERVER_STOP                    500
/** The TCP server was shut down using RTTcpServerShutdown. */
#define VERR_TCP_SERVER_SHUTDOWN                (-501)
/** The TCP server was destroyed. */
#define VERR_TCP_SERVER_DESTROYED               (-502)
/** The TCP server has no client associated with it. */
#define VINF_TCP_SERVER_NO_CLIENT               503
/** @} */


/** @name UDP Status Codes
 * @{
 */
/** Stop the UDP server. */
#define VERR_UDP_SERVER_STOP                    (-520)
/** The server was stopped. */
#define VINF_UDP_SERVER_STOP                    520
/** The UDP server was shut down using RTUdpServerShutdown. */
#define VERR_UDP_SERVER_SHUTDOWN                (-521)
/** The UDP server was destroyed. */
#define VERR_UDP_SERVER_DESTROYED               (-522)
/** The UDP server has no client associated with it. */
#define VINF_UDP_SERVER_NO_CLIENT               523
/** @} */


/** @name L4 Specific Status Codes
 * @{
 */
/** Invalid offset in an L4 dataspace */
#define VERR_L4_INVALID_DS_OFFSET               (-550)
/** IPC error */
#define VERR_IPC                                (-551)
/** Item already used */
#define VERR_RESOURCE_IN_USE                    (-552)
/** Source/destination not found */
#define VERR_IPC_PROCESS_NOT_FOUND              (-553)
/** Receive timeout */
#define VERR_IPC_RECEIVE_TIMEOUT                (-554)
/** Send timeout */
#define VERR_IPC_SEND_TIMEOUT                   (-555)
/** Receive cancelled */
#define VERR_IPC_RECEIVE_CANCELLED              (-556)
/** Send cancelled */
#define VERR_IPC_SEND_CANCELLED                 (-557)
/** Receive aborted */
#define VERR_IPC_RECEIVE_ABORTED                (-558)
/** Send aborted */
#define VERR_IPC_SEND_ABORTED                   (-559)
/** Couldn't map pages during receive */
#define VERR_IPC_RECEIVE_MAP_FAILED             (-560)
/** Couldn't map pages during send */
#define VERR_IPC_SEND_MAP_FAILED                (-561)
/** Send pagefault timeout in receive */
#define VERR_IPC_RECEIVE_SEND_PF_TIMEOUT        (-562)
/** Send pagefault timeout in send */
#define VERR_IPC_SEND_SEND_PF_TIMEOUT           (-563)
/** (One) receive buffer was too small, or too few buffers */
#define VINF_IPC_RECEIVE_MSG_CUT                564
/** (One) send buffer was too small, or too few buffers */
#define VINF_IPC_SEND_MSG_CUT                   565
/** Dataspace manager server not found */
#define VERR_L4_DS_MANAGER_NOT_FOUND            (-566)
/** @} */


/** @name Loader Status Codes.
 * @{
 */
/** Invalid executable signature. */
#define VERR_INVALID_EXE_SIGNATURE              (-600)
/** The iprt loader recognized a ELF image, but doesn't support loading it. */
#define VERR_ELF_EXE_NOT_SUPPORTED              (-601)
/** The iprt loader recognized a PE image, but doesn't support loading it. */
#define VERR_PE_EXE_NOT_SUPPORTED               (-602)
/** The iprt loader recognized a LX image, but doesn't support loading it. */
#define VERR_LX_EXE_NOT_SUPPORTED               (-603)
/** The iprt loader recognized a LE image, but doesn't support loading it. */
#define VERR_LE_EXE_NOT_SUPPORTED               (-604)
/** The iprt loader recognized a NE image, but doesn't support loading it. */
#define VERR_NE_EXE_NOT_SUPPORTED               (-605)
/** The iprt loader recognized a MZ image, but doesn't support loading it. */
#define VERR_MZ_EXE_NOT_SUPPORTED               (-606)
/** The iprt loader recognized an a.out image, but doesn't support loading it. */
#define VERR_AOUT_EXE_NOT_SUPPORTED             (-607)
/** Bad executable. */
#define VERR_BAD_EXE_FORMAT                     (-608)
/** Symbol (export) not found. */
#define VERR_SYMBOL_NOT_FOUND                   (-609)
/** Module not found. */
#define VERR_MODULE_NOT_FOUND                   (-610)
/** The loader resolved an external symbol to an address to big for the image format. */
#define VERR_SYMBOL_VALUE_TOO_BIG               (-611)
/** The image is too big. */
#define VERR_IMAGE_TOO_BIG                      (-612)
/** The image base address is to high for this image type. */
#define VERR_IMAGE_BASE_TOO_HIGH                (-614)
/** Mismatching architecture. */
#define VERR_LDR_ARCH_MISMATCH                  (-615)
/** Mismatch between IPRT and native loader. */
#define VERR_LDR_MISMATCH_NATIVE                (-616)
/** Failed to resolve an imported (external) symbol. */
#define VERR_LDR_IMPORTED_SYMBOL_NOT_FOUND      (-617)
/** Generic loader failure. */
#define VERR_LDR_GENERAL_FAILURE                (-618)
/** Code signing error.  */
#define VERR_LDR_IMAGE_HASH                     (-619)
/** The PE loader encountered delayed imports, a feature which hasn't been implemented yet. */
#define VERR_LDRPE_DELAY_IMPORT                 (-620)
/** The PE loader encountered a malformed certificate. */
#define VERR_LDRPE_CERT_MALFORMED               (-621)
/** The PE loader encountered a certificate with an unsupported type or structure revision. */
#define VERR_LDRPE_CERT_UNSUPPORTED             (-622)
/** The PE loader doesn't know how to deal with the global pointer data directory entry yet. */
#define VERR_LDRPE_GLOBALPTR                    (-623)
/** The PE loader doesn't support the TLS data directory yet. */
#define VERR_LDRPE_TLS                          (-624)
/** The PE loader doesn't grok the COM descriptor data directory entry. */
#define VERR_LDRPE_COM_DESCRIPTOR               (-625)
/** The PE loader encountered an unknown load config directory/header size. */
#define VERR_LDRPE_LOAD_CONFIG_SIZE             (-626)
/** The PE loader encountered a lock prefix table, a feature which hasn't been implemented yet. */
#define VERR_LDRPE_LOCK_PREFIX_TABLE            (-627)
/** The ELF loader doesn't handle foreign endianness. */
#define VERR_LDRELF_ODD_ENDIAN                  (-630)
/** The ELF image is 'dynamic', the ELF loader can only deal with 'relocatable' images at present. */
#define VERR_LDRELF_DYN                         (-631)
/** The ELF image is 'executable', the ELF loader can only deal with 'relocatable' images at present. */
#define VERR_LDRELF_EXEC                        (-632)
/** The ELF image was created for an unsupported target machine type. */
#define VERR_LDRELF_MACHINE                     (-633)
/** The ELF version is not supported. */
#define VERR_LDRELF_VERSION                     (-634)
/** The ELF loader cannot handle multiple SYMTAB sections. */
#define VERR_LDRELF_MULTIPLE_SYMTABS            (-635)
/** The ELF loader encountered a relocation type which is not implemented. */
#define VERR_LDRELF_RELOCATION_NOT_SUPPORTED    (-636)
/** The ELF loader encountered a bad symbol index. */
#define VERR_LDRELF_INVALID_SYMBOL_INDEX        (-637)
/** The ELF loader encountered an invalid symbol name offset. */
#define VERR_LDRELF_INVALID_SYMBOL_NAME_OFFSET  (-638)
/** The ELF loader encountered an invalid relocation offset. */
#define VERR_LDRELF_INVALID_RELOCATION_OFFSET   (-639)
/** The ELF loader didn't find the symbol/string table for the image. */
#define VERR_LDRELF_NO_SYMBOL_OR_NO_STRING_TABS (-640)
/** Invalid link address. */
#define VERR_LDR_INVALID_LINK_ADDRESS           (-647)
/** Invalid image relative virtual address. */
#define VERR_LDR_INVALID_RVA                    (-648)
/** Invalid segment:offset address. */
#define VERR_LDR_INVALID_SEG_OFFSET             (-649)
/** @}*/

/** @name Debug Info Reader Status Codes.
 * @{
 */
/** The module contains no line number information. */
#define VERR_DBG_NO_LINE_NUMBERS                (-650)
/** The module contains no symbol information. */
#define VERR_DBG_NO_SYMBOLS                     (-651)
/** The specified segment:offset address was invalid. Typically an attempt at
 * addressing outside the segment boundary. */
#define VERR_DBG_INVALID_ADDRESS                (-652)
/** Invalid segment index. */
#define VERR_DBG_INVALID_SEGMENT_INDEX          (-653)
/** Invalid segment offset. */
#define VERR_DBG_INVALID_SEGMENT_OFFSET         (-654)
/** Invalid image relative virtual address. */
#define VERR_DBG_INVALID_RVA                    (-655)
/** Invalid image relative virtual address. */
#define VERR_DBG_SPECIAL_SEGMENT                (-656)
/** Address conflict within a module/segment.
 * Attempted to add a segment, symbol or line number that fully or partially
 * overlaps with an existing one. */
#define VERR_DBG_ADDRESS_CONFLICT               (-657)
/** Duplicate symbol within the module.
 * Attempted to add a symbol which name already exists within the module.  */
#define VERR_DBG_DUPLICATE_SYMBOL               (-658)
/** The segment index specified when adding a new segment is already in use. */
#define VERR_DBG_SEGMENT_INDEX_CONFLICT         (-659)
/** No line number was found for the specified address/ordinal/whatever. */
#define VERR_DBG_LINE_NOT_FOUND                 (-660)
/** The length of the symbol name is out of range.
 * This means it is an empty string or that it's greater or equal to
 * RTDBG_SYMBOL_NAME_LENGTH. */
#define VERR_DBG_SYMBOL_NAME_OUT_OF_RANGE       (-661)
/** The length of the file name is out of range.
 * This means it is an empty string or that it's greater or equal to
 * RTDBG_FILE_NAME_LENGTH. */
#define VERR_DBG_FILE_NAME_OUT_OF_RANGE         (-662)
/** The length of the segment name is out of range.
 * This means it is an empty string or that it is greater or equal to
 * RTDBG_SEGMENT_NAME_LENGTH. */
#define VERR_DBG_SEGMENT_NAME_OUT_OF_RANGE      (-663)
/** The specified address range wraps around. */
#define VERR_DBG_ADDRESS_WRAP                   (-664)
/** The file is not a valid NM map file. */
#define VERR_DBG_NOT_NM_MAP_FILE                (-665)
/** The file is not a valid /proc/kallsyms file. */
#define VERR_DBG_NOT_LINUX_KALLSYMS             (-666)
/** No debug module interpreter matching the debug info. */
#define VERR_DBG_NO_MATCHING_INTERPRETER        (-667)
/** Bad DWARF line number header. */
#define VERR_DWARF_BAD_LINE_NUMBER_HEADER       (-668)
/** Unexpected end of DWARF unit. */
#define VERR_DWARF_UNEXPECTED_END               (-669)
/** DWARF LEB value overflows the decoder type. */
#define VERR_DWARF_LEB_OVERFLOW                 (-670)
/** Bad DWARF extended line number opcode. */
#define VERR_DWARF_BAD_LNE                      (-671)
/** Bad DWARF string. */
#define VERR_DWARF_BAD_STRING                   (-672)
/** Bad DWARF position. */
#define VERR_DWARF_BAD_POS                      (-673)
/** Bad DWARF info. */
#define VERR_DWARF_BAD_INFO                     (-674)
/** Bad DWARF abbreviation data. */
#define VERR_DWARF_BAD_ABBREV                   (-675)
/** A DWARF abbreviation was not found. */
#define VERR_DWARF_ABBREV_NOT_FOUND             (-676)
/** Encountered an unknown attribute form. */
#define VERR_DWARF_UNKNOWN_FORM                 (-677)
/** Encountered an unexpected attribute form. */
#define VERR_DWARF_UNEXPECTED_FORM              (-678)
/** Unfinished code. */
#define VERR_DWARF_TODO                         (-679)
/** Unknown location opcode. */
#define VERR_DWARF_UNKNOWN_LOC_OPCODE           (-680)
/** Expression stack overflow. */
#define VERR_DWARF_STACK_OVERFLOW               (-681)
/** Expression stack underflow. */
#define VERR_DWARF_STACK_UNDERFLOW              (-682)
/** Internal processing error in the DWARF code. */
#define VERR_DWARF_IPE                          (-683)
/** Invalid configuration property value. */
#define VERR_DBG_CFG_INVALID_VALUE              (-684)
/** Not an integer property. */
#define VERR_DBG_CFG_NOT_UINT_PROP              (-685)
/** Deferred loading of information failed. */
#define VERR_DBG_DEFERRED_LOAD_FAILED           (-686)
/** Unfinished debug info reader code. */
#define VERR_DBG_TODO                           (-687)
/** Found file, but it didn't match the search criteria. */
#define VERR_DBG_FILE_MISMATCH                  (-688)
/** Internal processing error in the debug module reader code. */
#define VERR_DBG_MOD_IPE                        (-689)
/** The symbol size was adjusted while adding it. */
#define VINF_DBG_ADJUSTED_SYM_SIZE              690
/** Unable to parse the CodeView debug information. */
#define VERR_CV_BAD_FORMAT                      (-691)
/** Unfinished CodeView debug information feature. */
#define VERR_CV_TODO                            (-692)
/** Internal processing error the CodeView debug information reader. */
#define VERR_CV_IPE                             (-693)
/** @} */

/** @name Request Packet Status Codes.
 * @{
 */
/** Invalid RT request type.
 * For the RTReqAlloc() case, the caller just specified an illegal enmType. For
 * all the other occurrences it means indicates corruption, broken logic, or stupid
 * interface user. */
#define VERR_RT_REQUEST_INVALID_TYPE            (-700)
/** Invalid RT request state.
 * The state of the request packet was not the expected and accepted one(s). Either
 * the interface user screwed up, or we've got corruption/broken logic. */
#define VERR_RT_REQUEST_STATE                   (-701)
/** Invalid RT request packet.
 * One or more of the RT controlled packet members didn't contain the correct
 * values. Some thing's broken. */
#define VERR_RT_REQUEST_INVALID_PACKAGE         (-702)
/** The status field has not been updated yet as the request is still
 * pending completion. Someone queried the iStatus field before the request
 * has been fully processed. */
#define VERR_RT_REQUEST_STATUS_STILL_PENDING    (-703)
/** The request has been freed, don't read the status now.
 * Someone is reading the iStatus field of a freed request packet. */
#define VERR_RT_REQUEST_STATUS_FREED            (-704)
/** @} */

/** @name Environment Status Code
 * @{
 */
/** The specified environment variable was not found. (RTEnvGetEx) */
#define VERR_ENV_VAR_NOT_FOUND                  (-750)
/** The specified environment variable was not found. (RTEnvUnsetEx) */
#define VINF_ENV_VAR_NOT_FOUND                  (750)
/** Unable to translate all the variables in the default environment due to
 * codeset issues (LANG / LC_ALL / LC_CTYPE). */
#define VWRN_ENV_NOT_FULLY_TRANSLATED           (751)
/** @} */

/** @name Multiprocessor Status Codes.
 * @{
 */
/** The specified cpu is offline. */
#define VERR_CPU_OFFLINE                        (-800)
/** The specified cpu was not found. */
#define VERR_CPU_NOT_FOUND                      (-801)
/** @} */

/** @name RTGetOpt status codes
 * @{ */
/** RTGetOpt: Command line option not recognized. */
#define VERR_GETOPT_UNKNOWN_OPTION              (-825)
/** RTGetOpt: Command line option needs argument. */
#define VERR_GETOPT_REQUIRED_ARGUMENT_MISSING   (-826)
/** RTGetOpt: Command line option has argument with bad format. */
#define VERR_GETOPT_INVALID_ARGUMENT_FORMAT     (-827)
/** RTGetOpt: Not an option. */
#define VINF_GETOPT_NOT_OPTION                  828
/** RTGetOpt: Command line option needs an index. */
#define VERR_GETOPT_INDEX_MISSING               (-829)
/** @} */

/** @name RTCache status codes
 * @{ */
/** RTCache: cache is full. */
#define VERR_CACHE_FULL                         (-850)
/** RTCache: cache is empty. */
#define VERR_CACHE_EMPTY                        (-851)
/** @} */

/** @name RTMemCache status codes
 * @{ */
/** Reached the max cache size. */
#define VERR_MEM_CACHE_MAX_SIZE                 (-855)
/** @} */

/** @name RTS3 status codes
 * @{ */
/** Access denied error. */
#define VERR_S3_ACCESS_DENIED                   (-875)
/** The bucket/key wasn't found. */
#define VERR_S3_NOT_FOUND                       (-876)
/** Bucket already exists. */
#define VERR_S3_BUCKET_ALREADY_EXISTS           (-877)
/** Can't delete bucket with keys. */
#define VERR_S3_BUCKET_NOT_EMPTY                (-878)
/** The current operation was canceled. */
#define VERR_S3_CANCELED                        (-879)
/** @} */

/** @name HTTP status codes
 * @{ */
/** HTTP initialization failed. */
#define VERR_HTTP_INIT_FAILED                   (-885)
/** The server has not found anything matching the URI given. */
#define VERR_HTTP_NOT_FOUND                     (-886)
/** The request is for something forbidden. Authorization will not help. */
#define VERR_HTTP_ACCESS_DENIED                 (-887)
/** The server did not understand the request due to bad syntax. */
#define VERR_HTTP_BAD_REQUEST                   (-888)
/** Couldn't connect to the server (proxy?). */
#define VERR_HTTP_COULDNT_CONNECT               (-889)
/** SSL connection error. */
#define VERR_HTTP_SSL_CONNECT_ERROR             (-890)
/** CAcert is missing or has the wrong format. */
#define VERR_HTTP_CACERT_WRONG_FORMAT           (-891)
/** Certificate cannot be authenticated with the given CA certificates. */
#define VERR_HTTP_CACERT_CANNOT_AUTHENTICATE    (-892)
/** The current HTTP request was forcefully aborted */
#define VERR_HTTP_ABORTED                       (-893)
/** Request was redirected. */
#define VERR_HTTP_REDIRECTED                    (-894)
/** @} */

/** @name RTManifest status codes
 * @{ */
/** A digest type used in the manifest file isn't supported. */
#define VERR_MANIFEST_UNSUPPORTED_DIGEST_TYPE   (-900)
/** An entry in the manifest file couldn't be interpreted correctly. */
#define VERR_MANIFEST_WRONG_FILE_FORMAT         (-901)
/** A digest doesn't match the corresponding file. */
#define VERR_MANIFEST_DIGEST_MISMATCH           (-902)
/** The file list doesn't match to the content of the manifest file. */
#define VERR_MANIFEST_FILE_MISMATCH             (-903)
/** The specified attribute (name) was not found in the manifest.  */
#define VERR_MANIFEST_ATTR_NOT_FOUND            (-904)
/** The attribute type did not match. */
#define VERR_MANIFEST_ATTR_TYPE_MISMATCH        (-905)
/** No attribute of the specified types was found. */
#define VERR_MANIFEST_ATTR_TYPE_NOT_FOUND        (-906)
/** @} */

/** @name RTTar status codes
 * @{ */
/** The checksum of a tar header record doesn't match. */
#define VERR_TAR_CHKSUM_MISMATCH                (-925)
/** The tar end of file record was read. */
#define VERR_TAR_END_OF_FILE                    (-926)
/** The tar file ended unexpectedly. */
#define VERR_TAR_UNEXPECTED_EOS                 (-927)
/** The tar termination records was encountered without reaching the end of
  * the input stream. */
#define VERR_TAR_EOS_MORE_INPUT                 (-928)
/** A number tar header field was malformed.  */
#define VERR_TAR_BAD_NUM_FIELD                  (-929)
/** A numeric tar header field was not terminated correctly. */
#define VERR_TAR_BAD_NUM_FIELD_TERM             (-930)
/** A number tar header field was encoded using base-256 which this
 * tar implementation currently does not support.  */
#define VERR_TAR_BASE_256_NOT_SUPPORTED         (-931)
/** A number tar header field yielded a value too large for the internal
 * variable of the tar interpreter. */
#define VERR_TAR_NUM_VALUE_TOO_LARGE            (-932)
/** The combined minor and major device number type is too small to hold the
 * value stored in the tar header.  */
#define VERR_TAR_DEV_VALUE_TOO_LARGE            (-933)
/** The mode field in a tar header is bad. */
#define VERR_TAR_BAD_MODE_FIELD                 (-934)
/** The mode field should not include the type. */
#define VERR_TAR_MODE_WITH_TYPE                 (-935)
/** The size field should be zero for links and symlinks. */
#define VERR_TAR_SIZE_NOT_ZERO                  (-936)
/** Encountered an unknown type flag. */
#define VERR_TAR_UNKNOWN_TYPE_FLAG              (-937)
/** The tar header is all zeros. */
#define VERR_TAR_ZERO_HEADER                    (-938)
/** Not a uniform standard tape v0.0 archive header. */
#define VERR_TAR_NOT_USTAR_V00                  (-939)
/** The name is empty. */
#define VERR_TAR_EMPTY_NAME                     (-940)
/** A non-directory entry has a name ending with a slash. */
#define VERR_TAR_NON_DIR_ENDS_WITH_SLASH        (-941)
/** Encountered an unsupported portable archive exchange (pax) header. */
#define VERR_TAR_UNSUPPORTED_PAX_TYPE           (-942)
/** Encountered an unsupported Solaris Tar extension. */
#define VERR_TAR_UNSUPPORTED_SOLARIS_HDR_TYPE   (-943)
/** Encountered an unsupported GNU Tar extension. */
#define VERR_TAR_UNSUPPORTED_GNU_HDR_TYPE       (-944)
/** Malformed checksum field in the tar header. */
#define VERR_TAR_BAD_CHKSUM_FIELD               (-945)
/** Malformed checksum field in the tar header. */
#define VERR_TAR_MALFORMED_GNU_LONGXXXX         (-946)
/** Too long name or link string. */
#define VERR_TAR_NAME_TOO_LONG                  (-947)
/** A directory entry in the archive. */
#define VINF_TAR_DIR_PATH                        (948)
/** @} */

/** @name RTPoll status codes
 * @{ */
/** The handle is not pollable. */
#define VERR_POLL_HANDLE_NOT_POLLABLE           (-950)
/** The handle ID is already present in the poll set. */
#define VERR_POLL_HANDLE_ID_EXISTS              (-951)
/** The handle ID was not found in the set. */
#define VERR_POLL_HANDLE_ID_NOT_FOUND           (-952)
/** The poll set is full. */
#define VERR_POLL_SET_IS_FULL                   (-953)
/** @} */

/** @name Pkzip status codes
 * @{ */
/** No end of central directory record found. */
#define VERR_PKZIP_NO_EOCB                      (-960)
/** Too long name string. */
#define VERR_PKZIP_NAME_TOO_LONG                (-961)
/** Local file header corrupt. */
#define VERR_PKZIP_BAD_LF_HEADER                (-962)
/** Central directory file header corrupt. */
#define VERR_PKZIP_BAD_CDF_HEADER               (-963)
/** Encountered an unknown type flag. */
#define VERR_PKZIP_UNKNOWN_TYPE_FLAG            (-964)
/** Found a ZIP64 Extra Information Field in a ZIP32 file. */
#define VERR_PKZIP_ZIP64EX_IN_ZIP32             (-965)


/** @name RTZip status codes
 * @{ */
/** Generic zip error. */
#define VERR_ZIP_ERROR                          (-22000)
/** The compressed data was corrupted. */
#define VERR_ZIP_CORRUPTED                      (-22001)
/** Ran out of memory while compressing or uncompressing. */
#define VERR_ZIP_NO_MEMORY                      (-22002)
/** The compression format version is unsupported. */
#define VERR_ZIP_UNSUPPORTED_VERSION            (-22003)
/** The compression method is unsupported. */
#define VERR_ZIP_UNSUPPORTED_METHOD             (-22004)
/** The compressed data started with a bad header. */
#define VERR_ZIP_BAD_HEADER                     (-22005)
/** @} */

/** @name RTVfs status codes
 * @{ */
/** The VFS chain specification does not have a valid prefix. */
#define VERR_VFS_CHAIN_NO_PREFIX                    (-22100)
/** The VFS chain specification is empty. */
#define VERR_VFS_CHAIN_EMPTY                        (-22101)
/** Expected an element. */
#define VERR_VFS_CHAIN_EXPECTED_ELEMENT             (-22102)
/** The VFS object type is not known. */
#define VERR_VFS_CHAIN_UNKNOWN_TYPE                 (-22103)
/** Expected a left paranthese. */
#define VERR_VFS_CHAIN_EXPECTED_LEFT_PARENTHESES    (-22104)
/** Expected a right paranthese. */
#define VERR_VFS_CHAIN_EXPECTED_RIGHT_PARENTHESES   (-22105)
/** Expected a provider name. */
#define VERR_VFS_CHAIN_EXPECTED_PROVIDER_NAME       (-22106)
/** Expected an action (> or |). */
#define VERR_VFS_CHAIN_EXPECTED_ACTION              (-22107)
/** Only one action element is currently supported. */
#define VERR_VFS_CHAIN_MULTIPLE_ACTIONS             (-22108)
/** Expected to find a driving action (>), but there is none. */
#define VERR_VFS_CHAIN_NO_ACTION                    (-22109)
/** Expected pipe action. */
#define VERR_VFS_CHAIN_EXPECTED_PIPE                (-22110)
/** Unexpected action type. */
#define VERR_VFS_CHAIN_UNEXPECTED_ACTION_TYPE       (-22111)
/** @} */

/** @name RTDvm status codes
 * @{ */
/** The volume map doesn't contain any valid volume. */
#define VERR_DVM_MAP_EMPTY                          (-22200)
/** There is no volume behind the current one. */
#define VERR_DVM_MAP_NO_VOLUME                      (-22201)
/** @} */

/** @name Logger status codes
 * @{ */
/** The internal logger revision did not match. */
#define VERR_LOG_REVISION_MISMATCH                  (-22300)
/** @} */

/* see above, 22400..22499 is used for misc codes! */

/** @name Logger status codes
 * @{ */
/** Power off is not supported by the hardware or the OS. */
#define VERR_SYS_CANNOT_POWER_OFF                   (-22500)
/** The halt action was requested, but the OS may actually power
 * off the machine. */
#define VINF_SYS_MAY_POWER_OFF                      (22501)
/** Shutdown failed. */
#define VERR_SYS_SHUTDOWN_FAILED                    (-22502)
/** @} */

/** @name Filesystem status codes
 * @{ */
/** Filesystem can't be opened because it is corrupt. */
#define VERR_FILESYSTEM_CORRUPT                     (-22600)
/** @} */

/** @name RTZipXar status codes.
 * @{ */
/** Wrong magic value. */
#define VERR_XAR_WRONG_MAGIC                        (-22700)
/** Bad header size. */
#define VERR_XAR_BAD_HDR_SIZE                       (-22701)
/** Unsupported version. */
#define VERR_XAR_UNSUPPORTED_VERSION                (-22702)
/** Unsupported hashing function. */
#define VERR_XAR_UNSUPPORTED_HASH_FUNCTION          (-22703)
/** The table of content (TOC) is too small and therefore can't be valid. */
#define VERR_XAR_TOC_TOO_SMALL                      (-22704)
/** The table of content (TOC) is too big. */
#define VERR_XAR_TOC_TOO_BIG                        (-22705)
/** The compressed table of content is too big. */
#define VERR_XAR_TOC_TOO_BIG_COMPRESSED             (-22706)
/** The uncompressed table of content size in the header didn't match what
 * ZLib returned. */
#define VERR_XAR_TOC_UNCOMP_SIZE_MISMATCH           (-22707)
/** The table of content string length didn't match the size specified in the
 *  header. */
#define VERR_XAR_TOC_STRLEN_MISMATCH                (-22708)
/** The table of content isn't valid UTF-8. */
#define VERR_XAR_TOC_UTF8_ENCODING                  (-22709)
/** XML error while parsing the table of content. */
#define VERR_XAR_TOC_XML_PARSE_ERROR                (-22710)
/** The table of content XML document does not have a toc element. */
#define VERR_XML_TOC_ELEMENT_MISSING                (-22711)
/** The table of content XML element (toc) has sibilings, we expected it to be
 *  an only child or the root element (xar). */
#define VERR_XML_TOC_ELEMENT_HAS_SIBLINGS           (-22712)
/** The XAR table of content digest doesn't match. */
#define VERR_XAR_TOC_DIGEST_MISMATCH                (-22713)
/** Bad or missing XAR checksum element. */
#define VERR_XAR_BAD_CHECKSUM_ELEMENT               (-22714)
/** The hash function in the header doesn't match the one in the table of
 *  content. */
#define VERR_XAR_HASH_FUNCTION_MISMATCH             (-22715)
/** Bad digest length encountered in the table of content.  */
#define VERR_XAR_BAD_DIGEST_LENGTH                  (-22716)
/** The order of elements in the XAR file does not lend it self to expansion
 *  from via an I/O stream. */
#define VERR_XAR_NOT_STREAMBLE_ELEMENT_ORDER        (-22717)
/** Missing offset element in table of content sub-element. */
#define VERR_XAR_MISSING_OFFSET_ELEMENT             (-22718)
/** Bad offset element in table of content sub-element. */
#define VERR_XAR_BAD_OFFSET_ELEMENT                 (-22719)
/** Missing size element in table of content sub-element. */
#define VERR_XAR_MISSING_SIZE_ELEMENT               (-22720)
/** Bad size element in table of content sub-element. */
#define VERR_XAR_BAD_SIZE_ELEMENT                   (-22721)
/** Missing length element in table of content sub-element. */
#define VERR_XAR_MISSING_LENGTH_ELEMENT             (-22722)
/** Bad length element in table of content sub-element. */
#define VERR_XAR_BAD_LENGTH_ELEMENT                 (-22723)
/** Bad file element in XAR table of content. */
#define VERR_XAR_BAD_FILE_ELEMENT                   (-22724)
/** Missing data element for XAR file. */
#define VERR_XAR_MISSING_DATA_ELEMENT               (-22725)
/** Unknown XAR file type value. */
#define VERR_XAR_UNKNOWN_FILE_TYPE                  (-22726)
/** Missing encoding element for XAR data stream. */
#define VERR_XAR_NO_ENCODING                        (-22727)
/** Bad timestamp for XAR file. */
#define VERR_XAR_BAD_FILE_TIMESTAMP                 (-22728)
/** Bad file mode for XAR file. */
#define VERR_XAR_BAD_FILE_MODE                      (-22729)
/** Bad file user id for XAR file. */
#define VERR_XAR_BAD_FILE_UID                       (-22730)
/** Bad file group id for XAR file. */
#define VERR_XAR_BAD_FILE_GID                       (-22731)
/** Bad file inode device number for XAR file. */
#define VERR_XAR_BAD_FILE_DEVICE_NO                 (-22732)
/** Bad file inode number for XAR file. */
#define VERR_XAR_BAD_FILE_INODE                     (-22733)
/** Invalid name for XAR file. */
#define VERR_XAR_INVALID_FILE_NAME                  (-22734)
/** The message digest of the extracted data does not match the one supplied. */
#define VERR_XAR_EXTRACTED_HASH_MISMATCH            (-22735)
/** The extracted data has exceeded the expected size. */
#define VERR_XAR_EXTRACTED_SIZE_EXCEEDED            (-22736)
/** The message digest of the archived data does not match the one supplied. */
#define VERR_XAR_ARCHIVED_HASH_MISMATCH             (-22737)
/** The decompressor completed without using all the input data. */
#define VERR_XAR_UNUSED_ARCHIVED_DATA               (-22738)
/** Expected the archived and extracted XAR data sizes to be the same for
 * uncompressed data. */
#define VERR_XAR_ARCHIVED_AND_EXTRACTED_SIZES_MISMATCH (-22739)
/** @} */


/** @name RTAsn1 status codes
 * @{ */
/** Temporary place holder.  */
#define VERR_ASN1_ERROR                             (-22800)
/** Encountered an ASN.1 string type that is not supported. */
#define VERR_ASN1_STRING_TYPE_NOT_IMPLEMENTED       (-22801)
/** Invalid ASN.1 UTF-8 STRING encoding. */
#define VERR_ASN1_INVALID_UTF8_STRING_ENCODING      (-22802)
/** Invalid ASN.1 NUMERIC STRING encoding. */
#define VERR_ASN1_INVALID_NUMERIC_STRING_ENCODING   (-22803)
/** Invalid ASN.1 PRINTABLE STRING encoding. */
#define VERR_ASN1_INVALID_PRINTABLE_STRING_ENCODING (-22804)
/** Invalid ASN.1 T61/TELETEX STRING encoding. */
#define VERR_ASN1_INVALID_T61_STRING_ENCODING       (-22805)
/** Invalid ASN.1 VIDEOTEX STRING encoding. */
#define VERR_ASN1_INVALID_VIDEOTEX_STRING_ENCODING  (-22806)
/** Invalid ASN.1 IA5 STRING encoding. */
#define VERR_ASN1_INVALID_IA5_STRING_ENCODING       (-22807)
/** Invalid ASN.1 GRAPHIC STRING encoding. */
#define VERR_ASN1_INVALID_GRAPHIC_STRING_ENCODING   (-22808)
/** Invalid ASN.1 ISO-646/VISIBLE STRING encoding. */
#define VERR_ASN1_INVALID_VISIBLE_STRING_ENCODING   (-22809)
/** Invalid ASN.1 GENERAL STRING encoding. */
#define VERR_ASN1_INVALID_GENERAL_STRING_ENCODING   (-22810)
/** Invalid ASN.1 UNIVERSAL STRING encoding. */
#define VERR_ASN1_INVALID_UNIVERSAL_STRING_ENCODING (-22811)
/** Invalid ASN.1 BMP STRING encoding. */
#define VERR_ASN1_INVALID_BMP_STRING_ENCODING       (-22812)
/** Invalid ASN.1 OBJECT IDENTIFIER encoding. */
#define VERR_ASN1_INVALID_OBJID_ENCODING            (-22813)
/** A component value of an ASN.1 OBJECT IDENTIFIER is too big for our
 * internal representation (32-bits). */
#define VERR_ASN1_OBJID_COMPONENT_TOO_BIG           (-22814)
/** Too many components in an ASN.1 OBJECT IDENTIFIER for our internal
 * representation. */
#define VERR_ASN1_OBJID_TOO_MANY_COMPONENTS         (-22815)
/** The dotted-string representation of an ASN.1 OBJECT IDENTIFIER would be too
 * long for our internal representation. */
#define VERR_ASN1_OBJID_TOO_LONG_STRING_FORM        (-22816)
/** Invalid dotted string. */
#define VERR_ASN1_OBJID_INVALID_DOTTED_STRING       (-22817)
/** Constructed string type not implemented. */
#define VERR_ASN1_CONSTRUCTED_STRING_NOT_IMPL       (-22818)
/** Expected a different string tag. */
#define VERR_ASN1_STRING_TAG_MISMATCH               (-22819)
/** Expected a different time tag. */
#define VERR_ASN1_TIME_TAG_MISMATCH                 (-22820)
/** More unconsumed data available. */
#define VINF_ASN1_MORE_DATA                         (22821)
/** RTAsnEncodeWriteHeader return code indicating that nothing was written
 *  and the content should be skipped as well. */
#define VINF_ASN1_NOT_ENCODED                       (22822)
/** Unknown escape sequence encountered in TeletexString. */
#define VERR_ASN1_TELETEX_UNKNOWN_ESC_SEQ           (-22823)
/** Unsupported escape sequence encountered in TeletexString. */
#define VERR_ASN1_TELETEX_UNSUPPORTED_ESC_SEQ       (-22824)
/** Unsupported character set. */
#define VERR_ASN1_TELETEX_UNSUPPORTED_CHARSET       (-22825)
/** ASN.1 object has no virtual method table. */
#define VERR_ASN1_NO_VTABLE                         (-22826)
/** ASN.1 object has no pfnCheckSanity method.  */
#define VERR_ASN1_NO_CHECK_SANITY_METHOD            (-22827)
/** ASN.1 object is not present */
#define VERR_ASN1_NOT_PRESENT                       (-22828)
/** There are unconsumed bytes after decoding an ASN.1 object. */
#define VERR_ASN1_CURSOR_NOT_AT_END                 (-22829)
/** Long ASN.1 tag form is not implemented. */
#define VERR_ASN1_CURSOR_LONG_TAG                   (-22830)
/** Bad ASN.1 object length encoding. */
#define VERR_ASN1_CURSOR_BAD_LENGTH_ENCODING        (-22831)
/** Indefinite length form is against the rules. */
#define VERR_ASN1_CURSOR_ILLEGAL_IDEFINITE_LENGTH   (-22832)
/** Indefinite length form is not implemented. */
#define VERR_ASN1_CURSOR_IDEFINITE_LENGTH_NOT_SUP   (-22833)
/** ASN.1 object length goes beyond the end of the byte stream being decoded. */
#define VERR_ASN1_CURSOR_BAD_LENGTH                 (-22834)
/** Not more data in ASN.1 byte stream. */
#define VERR_ASN1_CURSOR_NO_MORE_DATA               (-22835)
/** Too little data in ASN.1 byte stream. */
#define VERR_ASN1_CURSOR_TOO_LITTLE_DATA_LEFT       (-22836)
/** Constructed string is not according to the encoding rules. */
#define VERR_ASN1_CURSOR_ILLEGAL_CONSTRUCTED_STRING (-22837)
/** Unexpected ASN.1 tag encountered while decoding. */
#define VERR_ASN1_CURSOR_TAG_MISMATCH               (-22838)
/** Unexpected ASN.1 tag class/flag encountered while decoding. */
#define VERR_ASN1_CURSOR_TAG_FLAG_CLASS_MISMATCH    (-22839)
/** ASN.1 bit string object is out of bounds. */
#define VERR_ASN1_BITSTRING_OUT_OF_BOUNDS           (-22840)
/** Bad ASN.1 time object. */
#define VERR_ASN1_TIME_BAD_NORMALIZE_INPUT          (-22841)
/** Failed to normalize ASN.1 time object. */
#define VERR_ASN1_TIME_NORMALIZE_ERROR              (-22842)
/** Normalization of ASN.1 time object didn't work out. */
#define VERR_ASN1_TIME_NORMALIZE_MISMATCH           (-22843)
/** Invalid ASN.1 UTC TIME encoding. */
#define VERR_ASN1_INVALID_UTC_TIME_ENCODING         (-22844)
/** Invalid ASN.1 GENERALIZED TIME encoding. */
#define VERR_ASN1_INVALID_GENERALIZED_TIME_ENCODING (-22845)
/** Invalid ASN.1 BOOLEAN encoding. */
#define VERR_ASN1_INVALID_BOOLEAN_ENCODING          (-22846)
/** Invalid ASN.1 NULL encoding. */
#define VERR_ASN1_INVALID_NULL_ENCODING             (-22847)
/** Invalid ASN.1 BIT STRING encoding. */
#define VERR_ASN1_INVALID_BITSTRING_ENCODING        (-22848)
/** Unimplemented ASN.1 tag reached the RTAsn1DynType code. */
#define VERR_ASN1_DYNTYPE_TAG_NOT_IMPL              (-22849)
/** ASN.1 tag and flags/class mismatch in RTAsn1DynType code. */
#define VERR_ASN1_DYNTYPE_BAD_TAG                   (-22850)
/** Unexpected ASN.1 fake/dummy object. */
#define VERR_ASN1_DUMMY_OBJECT                      (-22851)
/** ASN.1 object is too long. */
#define VERR_ASN1_TOO_LONG                          (-22852)
/** Expected primitive ASN.1 object. */
#define VERR_ASN1_EXPECTED_PRIMITIVE                (-22853)
/** Expected valid data pointer for ASN.1 object. */
#define VERR_ASN1_INVALID_DATA_POINTER              (-22854)
/** The ASN.1 encoding is too deeply nested for the decoder. */
#define VERR_ASN1_TOO_DEEPLY_NESTED                 (-22855)

/** ANS.1 internal error 1. */
#define VERR_ASN1_INTERNAL_ERROR_1                  (-22895)
/** ANS.1 internal error 2. */
#define VERR_ASN1_INTERNAL_ERROR_2                  (-22896)
/** ANS.1 internal error 3. */
#define VERR_ASN1_INTERNAL_ERROR_3                  (-22897)
/** ANS.1 internal error 4. */
#define VERR_ASN1_INTERNAL_ERROR_4                  (-22898)
/** ANS.1 internal error 5. */
#define VERR_ASN1_INTERNAL_ERROR_5                  (-22899)
/** @} */

/** @name More RTLdr status codes.
 * @{ */
/** Image Verficiation Failure: No Authenticode Signature. */
#define VERR_LDRVI_NOT_SIGNED                       (-22900)
/** Image Verficiation Warning: No Authenticode Signature, but on whitelist. */
#define VINF_LDRVI_NOT_SIGNED                       (22900)
/** Image Verficiation Failure: Error reading image headers.  */
#define VERR_LDRVI_READ_ERROR_HDR                   (-22901)
/** Image Verficiation Failure: Error reading section headers. */
#define VERR_LDRVI_READ_ERROR_SHDRS                 (-22902)
/** Image Verficiation Failure: Error reading authenticode signature data. */
#define VERR_LDRVI_READ_ERROR_SIGNATURE             (-22903)
/** Image Verficiation Failure: Error reading file for hashing. */
#define VERR_LDRVI_READ_ERROR_HASH                  (-22904)
/** Image Verficiation Failure: Error determining the file length. */
#define VERR_LDRVI_FILE_LENGTH_ERROR                (-22905)
/** Image Verficiation Failure: Error allocating memory for state data. */
#define VERR_LDRVI_NO_MEMORY_STATE                  (-22906)
/** Image Verficiation Failure: Error allocating memory for authenticode
 *  signature data. */
#define VERR_LDRVI_NO_MEMORY_SIGNATURE              (-22907)
/** Image Verficiation Failure: Error allocating memory for section headers. */
#define VERR_LDRVI_NO_MEMORY_SHDRS                  (-22908)
/** Image Verficiation Failure: Authenticode parsing output. */
#define VERR_LDRVI_NO_MEMORY_PARSE_OUTPUT           (-22909)
/** Image Verficiation Failure: Invalid security directory entry. */
#define VERR_LDRVI_INVALID_SECURITY_DIR_ENTRY       (-22910)
/** Image Verficiation Failure:  */
#define VERR_LDRVI_BAD_CERT_HDR_LENGTH              (-22911)
/** Image Verficiation Failure:  */
#define VERR_LDRVI_BAD_CERT_HDR_REVISION            (-22912)
/** Image Verficiation Failure:  */
#define VERR_LDRVI_BAD_CERT_HDR_TYPE                (-22913)
/** Image Verficiation Failure: More than one certificate table entry.  */
#define VERR_LDRVI_BAD_CERT_MULTIPLE                (-22914)

/** Image Verficiation Failure:  */
#define VERR_LDRVI_BAD_MZ_OFFSET                    (-22915)
/** Image Verficiation Failure: Invalid section count. */
#define VERR_LDRVI_INVALID_SECTION_COUNT            (-22916)
/** Image Verficiation Failure: Raw data offsets and sizes are out of range. */
#define VERR_LDRVI_SECTION_RAW_DATA_VALUES          (-22917)
/** Optional header magic and target machine does not match. */
#define VERR_LDRVI_MACHINE_OPT_HDR_MAGIC_MISMATCH   (-22918)
/** Unsupported image target architecture. */
#define VERR_LDRVI_UNSUPPORTED_ARCH                 (-22919)

/** Image Verification Failure: Internal error in signature parser. */
#define VERR_LDRVI_PARSE_IPE                        (-22921)
/** Generic BER parse error. Will be refined later. */
#define VERR_LDRVI_PARSE_BER_ERROR                  (-22922)

/** Expected the signed data content to be the object ID of
 * SpcIndirectDataContent, found something else instead. */
#define VERR_LDRVI_EXPECTED_INDIRECT_DATA_CONTENT_OID (-22923)
/** Page hash table size overflow. */
#define VERR_LDRVI_PAGE_HASH_TAB_SIZE_OVERFLOW      (-22924)
/** Page hash table is too long (covers signature data, i.e. itself). */
#define VERR_LDRVI_PAGE_HASH_TAB_TOO_LONG           (-22925)
/** The page hash table is not strictly ordered by offset. */
#define VERR_LDRVI_PAGE_HASH_TAB_NOT_STRICTLY_SORTED (-22926)
/** The page hash table hashes data outside the defined and implict sections. */
#define VERR_PAGE_HASH_TAB_HASHES_NON_SECTION_DATA  (-22927)
/** Page hash mismatch. */
#define VERR_LDRVI_PAGE_HASH_MISMATCH               (-22928)
/** Image hash mismatch. */
#define VERR_LDRVI_IMAGE_HASH_MISMATCH              (-22929)

/** Cannot resolve symbol because it's a forwarder. */
#define VERR_LDR_FORWARDER                          (-22950)
/** The symbol is not a forwarder. */
#define VERR_LDR_NOT_FORWARDER                      (-22951)
/** Malformed forwarder entry. */
#define VERR_LDR_BAD_FORWARDER                      (-22952)
/** Too long forwarder chain or there is a loop. */
#define VERR_LDR_FORWARDER_CHAIN_TOO_LONG           (-22953)
/** Support for forwarders has not been implemented. */
#define VERR_LDR_FORWARDERS_NOT_SUPPORTED           (-22954)
/** @} */

/** @name RTCrX509 status codes.
 * @{ */
/** Generic X.509 error. */
#define VERR_CR_X509_GENERIC_ERROR                  (-23000)
/** Internal error in the X.509 code. */
#define VERR_CR_X509_INTERNAL_ERROR                 (-23001)
/** Internal error in the X.509 certificate path building and verification
 * code. */
#define VERR_CR_X509_CERTPATHS_INTERNAL_ERROR       (-23002)
/** Path not verified yet. */
#define VERR_CR_X509_NOT_VERIFIED                   (-23003)
/** The certificate path has no trust anchor. */
#define VERR_CR_X509_NO_TRUST_ANCHOR                (-23004)
/** Unknown X.509 certificate signature algorithm. */
#define VERR_CR_X509_UNKNOWN_CERT_SIGN_ALGO         (-23005)
/** Certificate signature algorithm mismatch. */
#define VERR_CR_X509_CERT_SIGN_ALGO_MISMATCH        (-23006)
/** The signature algorithm in the to-be-signed certifcate part does not match
 * the one assoicated with the signature. */
#define VERR_CR_X509_CERT_TBS_SIGN_ALGO_MISMATCH    (-23007)
/** Certificate extensions requires certificate version 3 or later.  */
#define VERR_CR_X509_TBSCERT_EXTS_REQ_V3            (-23008)
/** Unique issuer and subject IDs require version certificate 2. */
#define VERR_CR_X509_TBSCERT_UNIQUE_IDS_REQ_V2      (-23009)
/** Certificate serial number length is out of bounds. */
#define VERR_CR_X509_TBSCERT_SERIAL_NUMBER_OUT_OF_BOUNDS (-23010)
/** Unsupported X.509 certificate version. */
#define VERR_CR_X509_TBSCERT_UNSUPPORTED_VERSION    (-23011)
/** Public key is too small. */
#define VERR_CR_X509_PUBLIC_KEY_TOO_SMALL           (-23012)
/** Invalid strnig tag for a X.509 name object. */
#define VERR_CR_X509_INVALID_NAME_STRING_TAG        (-23013)
/** Empty string in X.509 name object. */
#define VERR_CR_X509_NAME_EMPTY_STRING              (-23014)
/** Non-string object inside X.509 name object. */
#define VERR_CR_X509_NAME_NOT_STRING                (-23015)
/** Empty set inside X.509 name. */
#define VERR_CR_X509_NAME_EMPTY_SET                 (-23016)
/** Empty sub-string set inside X.509 name. */
#define VERR_CR_X509_NAME_EMPTY_SUB_SET             (-23017)
/** The NotBefore and NotAfter values of an X.509 Validity object seems to
 * have been swapped around. */
#define VERR_CR_X509_VALIDITY_SWAPPED               (-23018)
/** Duplicate certificate extension. */
#define VERR_CR_X509_TBSCERT_DUPLICATE_EXTENSION    (-23019)
/** Missing relative distinguished name map entry. */
#define VERR_CR_X509_NAME_MISSING_RDN_MAP_ENTRY     (-23020)
/** Certificate path validator: No trusted certificate paths. */
#define VERR_CR_X509_CPV_NO_TRUSTED_PATHS           (-23021)
/** Certificate path validator: No valid certificate policy. */
#define VERR_CR_X509_CPV_NO_VALID_POLICY            (-23022)
/** Certificate path validator: Unknown critical certificate extension. */
#define VERR_CR_X509_CPV_UNKNOWN_CRITICAL_EXTENSION (-23023)
/** Certificate path validator: Intermediate certificate is missing the
 *  KeyCertSign usage flag. */
#define VERR_CR_X509_CPV_MISSING_KEY_CERT_SIGN      (-23024)
/** Certificate path validator: Hit the max certificate path length before
 *  reaching trust anchor. */
#define VERR_CR_X509_CPV_MAX_PATH_LENGTH            (-23025)
/** Certificate path validator: Intermediate certificate is not marked as a
 *  certificate authority (CA). */
#define VERR_CR_X509_CPV_NOT_CA_CERT                (-23026)
/** Certificate path validator: Intermeidate certificate is not a version 3
 *  certificate. */
#define VERR_CR_X509_CPV_NOT_V3_CERT                (-23027)
/** Certificate path validator: Invalid policy mapping (to/from anyPolicy). */
#define VERR_CR_X509_CPV_INVALID_POLICY_MAPPING     (-23028)
/** Certificate path validator: Name constraints permits no names. */
#define VERR_CR_X509_CPV_NO_PERMITTED_NAMES         (-23029)
/** Certificate path validator: Name constraints does not permits the
 *  certificate name. */
#define VERR_CR_X509_CPV_NAME_NOT_PERMITTED         (-23030)
/** Certificate path validator: Name constraints does not permits the
 *  alternative certificate name. */
#define VERR_CR_X509_CPV_ALT_NAME_NOT_PERMITTED     (-23031)
/** Certificate path validator: Intermediate certificate subject does not
 *  match child issuer property. */
#define VERR_CR_X509_CPV_ISSUER_MISMATCH            (-23032)
/** Certificate path validator: The certificate is not valid at the
 *  specificed time. */
#define VERR_CR_X509_CPV_NOT_VALID_AT_TIME          (-23033)
/** Certificate path validator: Unexpected choice found in general subtree
 *  object (name constraints). */
#define VERR_CR_X509_CPV_UNEXP_GENERAL_SUBTREE_CHOICE (-23034)
/** Certificate path validator: Unexpected minimum value found in general
 *  subtree object (name constraints). */
#define VERR_CR_X509_CPV_UNEXP_GENERAL_SUBTREE_MIN  (-23035)
/** Certificate path validator: Unexpected maximum value found in
 *  general subtree object (name constraints). */
#define VERR_CR_X509_CPV_UNEXP_GENERAL_SUBTREE_MAX  (-23036)
/** Certificate path builder: Encountered bad certificate context. */
#define VERR_CR_X509_CPB_BAD_CERT_CTX               (-23037)
/** OpenSSL d2i_X509 failed. */
#define VERR_CR_X509_OSSL_D2I_FAILED                (-23090)
/** @} */

/** @name RTCrPkcs7 status codes.
 * @{ */
/** Generic PKCS \#7 error. */
#define VERR_CR_PKCS7_GENERIC_ERROR                             (-23300)
/** Signed data verfication failed because there are zero signer infos. */
#define VERR_CR_PKCS7_NO_SIGNER_INFOS                           (-23301)
/** Signed data certificate not found. */
#define VERR_CR_PKCS7_SIGNED_DATA_CERT_NOT_FOUND                (-23302)
/** Signed data verification failed due to key usage issues. */
#define VERR_CR_PKCS7_KEY_USAGE_MISMATCH                        (-23303)
/** Signed data verification failed because of missing (or duplicate)
 * authenticated content-type attribute. */
#define VERR_CR_PKCS7_MISSING_CONTENT_TYPE_ATTRIB               (-23304)
/** Signed data verification failed because of the authenticated content-type
 *  attribute did not match. */
#define VERR_CR_PKCS7_CONTENT_TYPE_ATTRIB_MISMATCH              (-23305)
/** Signed data verification failed because of a malformed authenticated
 *  content-type attribute. */
#define VERR_CR_PKCS7_BAD_CONTENT_TYPE_ATTRIB                   (-23306)
/** Signed data verification failed because of missing (or duplicate)
 * authenticated message-digest attribute. */
#define VERR_CR_PKCS7_MISSING_MESSAGE_DIGEST_ATTRIB             (-23307)
/** Signed data verification failed because the authenticated message-digest
 *  attribute did not match. */
#define VERR_CR_PKCS7_MESSAGE_DIGEST_ATTRIB_MISMATCH            (-23308)
/** Signed data verification failed because of a malformed authenticated
 *  message-digest attribute. */
#define VERR_CR_PKCS7_BAD_MESSAGE_DIGEST_ATTRIB                 (-23309)
/** Signature verification failed. */
#define VERR_CR_PKCS7_SIGNATURE_VERIFICATION_FAILED             (-23310)
/** Internal PKCS \#7 error. */
#define VERR_CR_PKCS7_INTERNAL_ERROR                            (-22311)
/** OpenSSL d2i_PKCS7 failed. */
#define VERR_CR_PKCS7_OSSL_D2I_FAILED                           (-22312)
/** OpenSSL PKCS \#7 verification failed. */
#define VERR_CR_PKCS7_OSSL_VERIFY_FAILED                        (-22313)
/** Digest algorithm parameters are not supported by the PKCS \#7 code. */
#define VERR_CR_PKCS7_DIGEST_PARAMS_NOT_IMPL                    (-22314)
/** The digest algorithm of a signer info entry was not found in the list of
 *  digest algorithms in the signed data. */
#define VERR_CR_PKCS7_DIGEST_ALGO_NOT_FOUND_IN_LIST             (-22315)
/** The PKCS \#7 content is not signed data. */
#define VERR_CR_PKCS7_NOT_SIGNED_DATA                           (-22316)
/** No digest algorithms listed in PKCS \#7 signed data. */
#define VERR_CR_PKCS7_NO_DIGEST_ALGORITHMS                      (-22317)
/** Too many digest algorithms used by PKCS \#7 signed data.  This is an
 * internal limitation of the code that aims at saving kernel stack space. */
#define VERR_CR_PKCS7_TOO_MANY_DIGEST_ALGORITHMS                (-22318)
/** Error creating digest algorithm calculator. */
#define VERR_CR_PKCS7_DIGEST_CREATE_ERROR                       (-22319)
/** Error while calculating a digest for a PKCS \#7 verficiation operation. */
#define VERR_CR_PKCS7_DIGEST_CALC_ERROR                         (-22320)
/** Unsupported PKCS \#7 signed data version. */
#define VERR_CR_PKCS7_SIGNED_DATA_VERSION                       (-22350)
/** PKCS \#7 signed data has no digest algorithms listed. */
#define VERR_CR_PKCS7_SIGNED_DATA_NO_DIGEST_ALGOS               (-22351)
/** Unknown digest algorithm used by PKCS \#7 object. */
#define VERR_CR_PKCS7_UNKNOWN_DIGEST_ALGORITHM                  (-22352)
/** Expected PKCS \#7 object to ship at least one certificate. */
#define VERR_CR_PKCS7_NO_CERTIFICATES                           (-22353)
/** Expected PKCS \#7 object to not contain any CRLs. */
#define VERR_CR_PKCS7_EXPECTED_NO_CRLS                          (-22354)
/** Expected PKCS \#7 object to contain exactly on signer info entry. */
#define VERR_CR_PKCS7_EXPECTED_ONE_SIGNER_INFO                  (-22355)
/** Unsupported PKCS \#7 signer info version. */
#define VERR_CR_PKCS7_SIGNER_INFO_VERSION                       (-22356)
/** PKCS \#7 singer info contains no issuer serial number. */
#define VERR_CR_PKCS7_SIGNER_INFO_NO_ISSUER_SERIAL_NO           (-22357)
/** Expected PKCS \#7 object to ship the signer certificate(s). */
#define VERR_CR_PKCS7_SIGNER_CERT_NOT_SHIPPED                   (-22358)
/** The encrypted digest algorithm does not match the one in the certificate. */
#define VERR_CR_PKCS7_SIGNER_INFO_DIGEST_ENCRYPT_MISMATCH       (-22359)
/** @} */

/** @name RTCrSpc status codes.
 * @{ */
/** Generic SPC error. */
#define VERR_CR_SPC_GENERIC_ERROR                               (-23400)
/** SPC requires there to be exactly one SignerInfo entry. */
#define VERR_CR_SPC_NOT_EXACTLY_ONE_SIGNER_INFOS                (-23401)
/** There shall be exactly one digest algorithm to go with the single
 *  SingerInfo entry required by SPC. */
#define VERR_CR_SPC_NOT_EXACTLY_ONE_DIGEST_ALGO                 (-23402)
/** The digest algorithm in the SignerInfo does not match the one in the
 *  indirect data. */
#define VERR_CR_SPC_SIGNED_IND_DATA_DIGEST_ALGO_MISMATCH        (-23403)
/** The digest algorithm in the indirect data was not found in the list of
 * digest algorithms in the signed data structure. */
#define VERR_CR_SPC_IND_DATA_DIGEST_ALGO_NOT_IN_DIGEST_ALGOS    (-23404)
/** The digest algorithm is not known to us. */
#define VERR_CR_SPC_UNKNOWN_DIGEST_ALGO                         (-23405)
/** The indirect data digest size does not match the digest algorithm. */
#define VERR_CR_SPC_IND_DATA_DIGEST_SIZE_MISMATCH               (-23406)
/** Exptected PE image data inside indirect data object. */
#define VERR_CR_SPC_EXPECTED_PE_IMAGE_DATA                      (-23407)
/** Internal SPC error: The PE image data is missing.  */
#define VERR_CR_SPC_PEIMAGE_DATA_NOT_PRESENT                    (-23408)
/** Bad SPC object moniker UUID field. */
#define VERR_CR_SPC_BAD_MONIKER_UUID                            (-23409)
/** Unknown SPC object moniker UUID. */
#define VERR_CR_SPC_UNKNOWN_MONIKER_UUID                        (-23410)
/** Internal SPC error: Bad object monker choice value. */
#define VERR_CR_SPC_BAD_MONIKER_CHOICE                          (-23411)
/** Internal SPC error: Bad object moniker data pointer. */
#define VERR_CR_SPC_MONIKER_BAD_DATA                            (-23412)
/** Multiple PE image page hash tables. */
#define VERR_CR_SPC_PEIMAGE_MULTIPLE_HASH_TABS                  (-23413)
/** Unknown SPC PE image attribute. */
#define VERR_CR_SPC_PEIMAGE_UNKNOWN_ATTRIBUTE                   (-23414)
/** URL not expected in SPC PE image data. */
#define VERR_CR_SPC_PEIMAGE_URL_UNEXPECTED                      (-23415)
/** PE image data without any valid content was not expected. */
#define VERR_CR_SPC_PEIMAGE_NO_CONTENT                          (-23416)
/** @} */

/** @name RTCrPkix status codes.
 * @{ */
/** Generic PKCS \#7 error. */
#define VERR_CR_PKIX_GENERIC_ERROR                  (-23500)
/** Parameters was presented to a signature schema that does not take any. */
#define VERR_CR_PKIX_SIGNATURE_TAKES_NO_PARAMETERS  (-23501)
/** Unknown hash digest type. */
#define VERR_CR_PKIX_UNKNOWN_DIGEST_TYPE            (-23502)
/** Internal error. */
#define VERR_CR_PKIX_INTERNAL_ERROR                 (-23503)
/** The hash is too long for the key used when signing/verifying. */
#define VERR_CR_PKIX_HASH_TOO_LONG_FOR_KEY          (-23504)
/** The signature is too long for the scratch buffer. */
#define VERR_CR_PKIX_SIGNATURE_TOO_LONG             (-23505)
/** The signature is greater than or equal to the key. */
#define VERR_CR_PKIX_SIGNATURE_GE_KEY               (-23506)
/** The signature is negative. */
#define VERR_CR_PKIX_SIGNATURE_NEGATIVE             (-23507)
/** Invalid signature length. */
#define VERR_CR_PKIX_INVALID_SIGNATURE_LENGTH       (-23508)
/** PKIX signature no does not match up to the current data. */
#define VERR_CR_PKIX_SIGNATURE_MISMATCH             (-23509)
/** PKIX cipher algorithm parameters are not implemented. */
#define VERR_CR_PKIX_CIPHER_ALGO_PARAMS_NOT_IMPL    (-23510)
/** ipher algorithm is not known to us. */
#define VERR_CR_PKIX_CIPHER_ALGO_NOT_KNOWN          (-23511)
/** PKIX cipher algorithm is not known to OpenSSL. */
#define VERR_CR_PKIX_OSSL_CIPHER_ALGO_NOT_KNOWN     (-23512)
/** PKIX cipher algorithm is not known to OpenSSL EVP API. */
#define VERR_CR_PKIX_OSSL_CIPHER_ALGO_NOT_KNOWN_EVP (-23513)
/** OpenSSL failed to init PKIX cipher algorithm context. */
#define VERR_CR_PKIX_OSSL_CIPHER_ALOG_INIT_FAILED   (-23514)
/** Final OpenSSL PKIX verification failed. */
#define VERR_CR_PKIX_OSSL_VERIFY_FINAL_FAILED       (-23515)
/** OpenSSL failed to decode the public key. */
#define VERR_CR_PKIX_OSSL_D2I_PUBLIC_KEY_FAILED     (-23516)
/** The EVP_PKEY_type API in OpenSSL failed.  */
#define VERR_CR_PKIX_OSSL_EVP_PKEY_TYPE_ERROR       (-23517)
/** @} */

/** @name RTCrStore status codes.
 * @{ */
/** Generic store error. */
#define VERR_CR_STORE_GENERIC_ERROR                 (-23700)
/** @} */

/** @name RTCrRsa status codes.
 * @{ */
/** Generic RSA error. */
#define VERR_CR_RSA_GENERIC_ERROR                   (-23900)
/** @} */

/** @name RTBigNum status codes.
 * @{ */
/** Sensitive input requires the result(s) to be initialized as sensitive. */
#define VERR_BIGNUM_SENSITIVE_INPUT                 (-24000)
/** Attempt to divide by zero. */
#define VERR_BIGNUM_DIV_BY_ZERO                     (-24001)
/** Negative exponent makes no sense to integer math. */
#define VERR_BIGNUM_NEGATIVE_EXPONENT               (-24002)

/** @} */

/** @name RTCrDigest status codes.
 * @{ */
/** OpenSSL failed to initialize the digest algorithm contextn. */
#define VERR_CR_DIGEST_OSSL_DIGEST_INIT_ERROR       (-24200)
/** OpenSSL failed to clone the digest algorithm contextn. */
#define VERR_CR_DIGEST_OSSL_DIGEST_CTX_COPY_ERROR   (-24201)
/** @} */

/* SED-END */

/** @} */

#endif