authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-03 17:30:38-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-03 17:30:38-05:00
logd0b12d77267da601e69bd633fe3f56b8bf01c1cf
tree83a94a55d064f8ea35ebb9a6b3a8b4c55b191fce
parent644a344715231b81189575cba52950ba43947e4f
parent0fdcd5c4cb335fcb2d637b891e60094b7a34e2b5
signature Commit is signed but in an unrecognized format.

Merge remote-tracking branch 'origin/master' into llvm10


82 files changed, 12233 insertions(+), 6018 deletions(-)

.builds/freebsd.yml-6
...@@ -1,10 +1,4 @@...@@ -1,10 +1,4 @@
1image: freebsd/latest1image: freebsd/latest
2packages:
3 - cmake
4 - py27-s3cmd
5 - wget
6 - curl
7 - jq
8secrets:2secrets:
9 - 6c60aaee-92e7-4e7d-812c-114817689b4d3 - 6c60aaee-92e7-4e7d-812c-114817689b4d
10 - dd0bd962-7664-4d3e-b0f3-41c9ee96b8b84 - dd0bd962-7664-4d3e-b0f3-41c9ee96b8b8
ci/srht/freebsd_script+3
...@@ -3,6 +3,9 @@...@@ -3,6 +3,9 @@
3set -x3set -x
4set -e4set -e
55
6sudo pkg update -f
7yes | sudo pkg install cmake py27-s3cmd wget curl jq
8
6ZIGDIR="$(pwd)"9ZIGDIR="$(pwd)"
7CACHE_BASENAME="llvm+clang-10.0.0-freebsd-x86_64-release"10CACHE_BASENAME="llvm+clang-10.0.0-freebsd-x86_64-release"
8PREFIX="$HOME/$CACHE_BASENAME"11PREFIX="$HOME/$CACHE_BASENAME"
doc/docgen.zig+2-1
...@@ -672,7 +672,8 @@ const TermState = enum {...@@ -672,7 +672,8 @@ const TermState = enum {
672672
673test "term color" {673test "term color" {
674 const input_bytes = "A\x1b[32;1mgreen\x1b[0mB";674 const input_bytes = "A\x1b[32;1mgreen\x1b[0mB";
675 const result = try termColor(std.debug.global_allocator, input_bytes);675 const result = try termColor(std.testing.allocator, input_bytes);
676 defer std.testing.allocator.free(result);
676 testing.expectEqualSlices(u8, "A<span class=\"t32\">green</span>B", result);677 testing.expectEqualSlices(u8, "A<span class=\"t32\">green</span>B", result);
677}678}
678679
doc/langref.html.in+4-5
...@@ -5359,7 +5359,7 @@ const std = @import("std");...@@ -5359,7 +5359,7 @@ const std = @import("std");
5359const assert = std.debug.assert;5359const assert = std.debug.assert;
53605360
5361test "turn HashMap into a set with void" {5361test "turn HashMap into a set with void" {
5362 var map = std.HashMap(i32, void, hash_i32, eql_i32).init(std.debug.global_allocator);5362 var map = std.HashMap(i32, void, hash_i32, eql_i32).init(std.testing.allocator);
5363 defer map.deinit();5363 defer map.deinit();
53645364
5365 _ = try map.put(1, {});5365 _ = try map.put(1, {});
...@@ -9247,9 +9247,8 @@ fn concat(allocator: *Allocator, a: []const u8, b: []const u8) ![]u8 {...@@ -9247,9 +9247,8 @@ fn concat(allocator: *Allocator, a: []const u8, b: []const u8) ![]u8 {
9247 In the above example, 100 bytes of stack memory are used to initialize a9247 In the above example, 100 bytes of stack memory are used to initialize a
9248 {#syntax#}FixedBufferAllocator{#endsyntax#}, which is then passed to a function.9248 {#syntax#}FixedBufferAllocator{#endsyntax#}, which is then passed to a function.
9249 As a convenience there is a global {#syntax#}FixedBufferAllocator{#endsyntax#}9249 As a convenience there is a global {#syntax#}FixedBufferAllocator{#endsyntax#}
9250 available for quick tests at {#syntax#}std.debug.global_allocator{#endsyntax#},9250 available for quick tests at {#syntax#}std.testing.allocator{#endsyntax#},
9251 however it is deprecated and should be avoided in favor of directly using a9251 which will also do perform basic leak detection.
9252 {#syntax#}FixedBufferAllocator{#endsyntax#} as in the example above.
9253 </p>9252 </p>
9254 <p>9253 <p>
9255 Currently Zig has no general purpose allocator, but there is9254 Currently Zig has no general purpose allocator, but there is
...@@ -9307,7 +9306,7 @@ pub fn main() !void {...@@ -9307,7 +9306,7 @@ pub fn main() !void {
9307 </li>9306 </li>
9308 <li>9307 <li>
9309 Are you writing a test, and you want to make sure {#syntax#}error.OutOfMemory{#endsyntax#}9308 Are you writing a test, and you want to make sure {#syntax#}error.OutOfMemory{#endsyntax#}
9310 is handled correctly? In this case, use {#syntax#}std.debug.FailingAllocator{#endsyntax#}.9309 is handled correctly? In this case, use {#syntax#}std.testing.FailingAllocator{#endsyntax#}.
9311 </li>9310 </li>
9312 <li>9311 <li>
9313 Finally, if none of the above apply, you need a general purpose allocator. Zig does not9312 Finally, if none of the above apply, you need a general purpose allocator. Zig does not
lib/libc/mingw/lib-common/psapi.def created+34
...@@ -0,0 +1,34 @@
1;
2; Definition file of PSAPI.DLL
3; Automatic generated by gendef
4; written by Kai Tietz 2008
5;
6LIBRARY "PSAPI.DLL"
7EXPORTS
8EmptyWorkingSet
9EnumDeviceDrivers
10EnumPageFilesA
11EnumPageFilesW
12EnumProcessModules
13EnumProcessModulesEx
14EnumProcesses
15GetDeviceDriverBaseNameA
16GetDeviceDriverBaseNameW
17GetDeviceDriverFileNameA
18GetDeviceDriverFileNameW
19GetMappedFileNameA
20GetMappedFileNameW
21GetModuleBaseNameA
22GetModuleBaseNameW
23GetModuleFileNameExA
24GetModuleFileNameExW
25GetModuleInformation
26GetPerformanceInfo
27GetProcessImageFileNameA
28GetProcessImageFileNameW
29GetProcessMemoryInfo
30GetWsChanges
31GetWsChangesEx
32InitializeProcessForWsWatch
33QueryWorkingSet
34QueryWorkingSetEx
lib/libc/mingw/lib32/psapi.def created+34
...@@ -0,0 +1,34 @@
1;
2; Definition file of PSAPI.DLL
3; Automatic generated by gendef
4; written by Kai Tietz 2008
5;
6LIBRARY "PSAPI.DLL"
7EXPORTS
8EmptyWorkingSet@4
9EnumDeviceDrivers@12
10EnumPageFilesA@8
11EnumPageFilesW@8
12EnumProcessModules@16
13EnumProcessModulesEx@20
14EnumProcesses@12
15GetDeviceDriverBaseNameA@12
16GetDeviceDriverBaseNameW@12
17GetDeviceDriverFileNameA@12
18GetDeviceDriverFileNameW@12
19GetMappedFileNameA@16
20GetMappedFileNameW@16
21GetModuleBaseNameA@16
22GetModuleBaseNameW@16
23GetModuleFileNameExA@16
24GetModuleFileNameExW@16
25GetModuleInformation@16
26GetPerformanceInfo@8
27GetProcessImageFileNameA@12
28GetProcessImageFileNameW@12
29GetProcessMemoryInfo@12
30GetWsChanges@12
31GetWsChangesEx@12
32InitializeProcessForWsWatch@4
33QueryWorkingSet@12
34QueryWorkingSetEx@12
lib/std/array_list.zig+8-7
...@@ -320,7 +320,7 @@ test "std.ArrayList.basic" {...@@ -320,7 +320,7 @@ test "std.ArrayList.basic" {
320}320}
321321
322test "std.ArrayList.orderedRemove" {322test "std.ArrayList.orderedRemove" {
323 var list = ArrayList(i32).init(debug.global_allocator);323 var list = ArrayList(i32).init(testing.allocator);
324 defer list.deinit();324 defer list.deinit();
325325
326 try list.append(1);326 try list.append(1);
...@@ -347,7 +347,7 @@ test "std.ArrayList.orderedRemove" {...@@ -347,7 +347,7 @@ test "std.ArrayList.orderedRemove" {
347}347}
348348
349test "std.ArrayList.swapRemove" {349test "std.ArrayList.swapRemove" {
350 var list = ArrayList(i32).init(debug.global_allocator);350 var list = ArrayList(i32).init(testing.allocator);
351 defer list.deinit();351 defer list.deinit();
352352
353 try list.append(1);353 try list.append(1);
...@@ -374,7 +374,7 @@ test "std.ArrayList.swapRemove" {...@@ -374,7 +374,7 @@ test "std.ArrayList.swapRemove" {
374}374}
375375
376test "std.ArrayList.swapRemoveOrError" {376test "std.ArrayList.swapRemoveOrError" {
377 var list = ArrayList(i32).init(debug.global_allocator);377 var list = ArrayList(i32).init(testing.allocator);
378 defer list.deinit();378 defer list.deinit();
379379
380 // Test just after initialization380 // Test just after initialization
...@@ -402,7 +402,7 @@ test "std.ArrayList.swapRemoveOrError" {...@@ -402,7 +402,7 @@ test "std.ArrayList.swapRemoveOrError" {
402}402}
403403
404test "std.ArrayList.insert" {404test "std.ArrayList.insert" {
405 var list = ArrayList(i32).init(debug.global_allocator);405 var list = ArrayList(i32).init(testing.allocator);
406 defer list.deinit();406 defer list.deinit();
407407
408 try list.append(1);408 try list.append(1);
...@@ -416,7 +416,7 @@ test "std.ArrayList.insert" {...@@ -416,7 +416,7 @@ test "std.ArrayList.insert" {
416}416}
417417
418test "std.ArrayList.insertSlice" {418test "std.ArrayList.insertSlice" {
419 var list = ArrayList(i32).init(debug.global_allocator);419 var list = ArrayList(i32).init(testing.allocator);
420 defer list.deinit();420 defer list.deinit();
421421
422 try list.append(1);422 try list.append(1);
...@@ -443,7 +443,8 @@ const Item = struct {...@@ -443,7 +443,8 @@ const Item = struct {
443};443};
444444
445test "std.ArrayList: ArrayList(T) of struct T" {445test "std.ArrayList: ArrayList(T) of struct T" {
446 var root = Item{ .integer = 1, .sub_items = ArrayList(Item).init(debug.global_allocator) };446 var root = Item{ .integer = 1, .sub_items = ArrayList(Item).init(testing.allocator) };
447 try root.sub_items.append(Item{ .integer = 42, .sub_items = ArrayList(Item).init(debug.global_allocator) });447 defer root.sub_items.deinit();
448 try root.sub_items.append(Item{ .integer = 42, .sub_items = ArrayList(Item).init(testing.allocator) });
448 testing.expect(root.sub_items.items[0].integer == 42);449 testing.expect(root.sub_items.items[0].integer == 42);
449}450}
lib/std/buf_map.zig+4-3
...@@ -43,9 +43,10 @@ pub const BufMap = struct {...@@ -43,9 +43,10 @@ pub const BufMap = struct {
43 pub fn set(self: *BufMap, key: []const u8, value: []const u8) !void {43 pub fn set(self: *BufMap, key: []const u8, value: []const u8) !void {
44 const value_copy = try self.copy(value);44 const value_copy = try self.copy(value);
45 errdefer self.free(value_copy);45 errdefer self.free(value_copy);
46 // Avoid copying key if it already exists
47 const get_or_put = try self.hash_map.getOrPut(key);46 const get_or_put = try self.hash_map.getOrPut(key);
48 if (!get_or_put.found_existing) {47 if (get_or_put.found_existing) {
48 self.free(get_or_put.kv.value);
49 } else {
49 get_or_put.kv.key = self.copy(key) catch |err| {50 get_or_put.kv.key = self.copy(key) catch |err| {
50 _ = self.hash_map.remove(key);51 _ = self.hash_map.remove(key);
51 return err;52 return err;
...@@ -83,7 +84,7 @@ pub const BufMap = struct {...@@ -83,7 +84,7 @@ pub const BufMap = struct {
83};84};
8485
85test "BufMap" {86test "BufMap" {
86 var bufmap = BufMap.init(std.heap.page_allocator);87 var bufmap = BufMap.init(std.testing.allocator);
87 defer bufmap.deinit();88 defer bufmap.deinit();
8889
89 try bufmap.set("x", "1");90 try bufmap.set("x", "1");
lib/std/buf_set.zig+1-1
...@@ -65,7 +65,7 @@ pub const BufSet = struct {...@@ -65,7 +65,7 @@ pub const BufSet = struct {
65};65};
6666
67test "BufSet" {67test "BufSet" {
68 var bufset = BufSet.init(std.heap.page_allocator);68 var bufset = BufSet.init(std.testing.allocator);
69 defer bufset.deinit();69 defer bufset.deinit();
7070
71 try bufset.put("x");71 try bufset.put("x");
lib/std/buffer.zig+8-3
...@@ -150,7 +150,9 @@ pub const Buffer = struct {...@@ -150,7 +150,9 @@ pub const Buffer = struct {
150};150};
151151
152test "simple Buffer" {152test "simple Buffer" {
153 var buf = try Buffer.init(debug.global_allocator, "");153 var buf = try Buffer.init(testing.allocator, "");
154 defer buf.deinit();
155
154 testing.expect(buf.len() == 0);156 testing.expect(buf.len() == 0);
155 try buf.append("hello");157 try buf.append("hello");
156 try buf.append(" ");158 try buf.append(" ");
...@@ -159,6 +161,7 @@ test "simple Buffer" {...@@ -159,6 +161,7 @@ test "simple Buffer" {
159 testing.expect(mem.eql(u8, mem.toSliceConst(u8, buf.toSliceConst().ptr), buf.toSliceConst()));161 testing.expect(mem.eql(u8, mem.toSliceConst(u8, buf.toSliceConst().ptr), buf.toSliceConst()));
160162
161 var buf2 = try Buffer.initFromBuffer(buf);163 var buf2 = try Buffer.initFromBuffer(buf);
164 defer buf2.deinit();
162 testing.expect(buf.eql(buf2.toSliceConst()));165 testing.expect(buf.eql(buf2.toSliceConst()));
163166
164 testing.expect(buf.startsWith("hell"));167 testing.expect(buf.startsWith("hell"));
...@@ -169,14 +172,16 @@ test "simple Buffer" {...@@ -169,14 +172,16 @@ test "simple Buffer" {
169}172}
170173
171test "Buffer.initSize" {174test "Buffer.initSize" {
172 var buf = try Buffer.initSize(debug.global_allocator, 3);175 var buf = try Buffer.initSize(testing.allocator, 3);
176 defer buf.deinit();
173 testing.expect(buf.len() == 3);177 testing.expect(buf.len() == 3);
174 try buf.append("hello");178 try buf.append("hello");
175 testing.expect(mem.eql(u8, buf.toSliceConst()[3..], "hello"));179 testing.expect(mem.eql(u8, buf.toSliceConst()[3..], "hello"));
176}180}
177181
178test "Buffer.initCapacity" {182test "Buffer.initCapacity" {
179 var buf = try Buffer.initCapacity(debug.global_allocator, 10);183 var buf = try Buffer.initCapacity(testing.allocator, 10);
184 defer buf.deinit();
180 testing.expect(buf.len() == 0);185 testing.expect(buf.len() == 0);
181 testing.expect(buf.capacity() >= 10);186 testing.expect(buf.capacity() >= 10);
182 const old_cap = buf.capacity();187 const old_cap = buf.capacity();
lib/std/build.zig+40-9
...@@ -21,6 +21,7 @@ pub const TranslateCStep = @import("build/translate_c.zig").TranslateCStep;...@@ -21,6 +21,7 @@ pub const TranslateCStep = @import("build/translate_c.zig").TranslateCStep;
21pub const WriteFileStep = @import("build/write_file.zig").WriteFileStep;21pub const WriteFileStep = @import("build/write_file.zig").WriteFileStep;
22pub const RunStep = @import("build/run.zig").RunStep;22pub const RunStep = @import("build/run.zig").RunStep;
23pub const CheckFileStep = @import("build/check_file.zig").CheckFileStep;23pub const CheckFileStep = @import("build/check_file.zig").CheckFileStep;
24pub const InstallRawStep = @import("build/emit_raw.zig").InstallRawStep;
2425
25pub const Builder = struct {26pub const Builder = struct {
26 install_tls: TopLevelStep,27 install_tls: TopLevelStep,
...@@ -824,6 +825,10 @@ pub const Builder = struct {...@@ -824,6 +825,10 @@ pub const Builder = struct {
824 self.getInstallStep().dependOn(&self.addInstallFileWithDir(src_path, .Lib, dest_rel_path).step);825 self.getInstallStep().dependOn(&self.addInstallFileWithDir(src_path, .Lib, dest_rel_path).step);
825 }826 }
826827
828 pub fn installRaw(self: *Builder, artifact: *LibExeObjStep, dest_filename: []const u8) void {
829 self.getInstallStep().dependOn(&self.addInstallRaw(artifact, dest_filename).step);
830 }
831
827 ///`dest_rel_path` is relative to install prefix path832 ///`dest_rel_path` is relative to install prefix path
828 pub fn addInstallFile(self: *Builder, src_path: []const u8, dest_rel_path: []const u8) *InstallFileStep {833 pub fn addInstallFile(self: *Builder, src_path: []const u8, dest_rel_path: []const u8) *InstallFileStep {
829 return self.addInstallFileWithDir(src_path, .Prefix, dest_rel_path);834 return self.addInstallFileWithDir(src_path, .Prefix, dest_rel_path);
...@@ -839,6 +844,10 @@ pub const Builder = struct {...@@ -839,6 +844,10 @@ pub const Builder = struct {
839 return self.addInstallFileWithDir(src_path, .Lib, dest_rel_path);844 return self.addInstallFileWithDir(src_path, .Lib, dest_rel_path);
840 }845 }
841846
847 pub fn addInstallRaw(self: *Builder, artifact: *LibExeObjStep, dest_filename: []const u8) *InstallRawStep {
848 return InstallRawStep.create(self, artifact, dest_filename);
849 }
850
842 pub fn addInstallFileWithDir(851 pub fn addInstallFileWithDir(
843 self: *Builder,852 self: *Builder,
844 src_path: []const u8,853 src_path: []const u8,
...@@ -1059,7 +1068,10 @@ pub const Builder = struct {...@@ -1059,7 +1068,10 @@ pub const Builder = struct {
1059};1068};
10601069
1061test "builder.findProgram compiles" {1070test "builder.findProgram compiles" {
1071 // TODO: uncomment and fix the leak
1072 // const builder = try Builder.create(std.testing.allocator, "zig", "zig-cache", "zig-cache");
1062 const builder = try Builder.create(std.heap.page_allocator, "zig", "zig-cache", "zig-cache");1073 const builder = try Builder.create(std.heap.page_allocator, "zig", "zig-cache", "zig-cache");
1074 defer builder.destroy();
1063 _ = builder.findProgram(&[_][]const u8{}, &[_][]const u8{}) catch null;1075 _ = builder.findProgram(&[_][]const u8{}, &[_][]const u8{}) catch null;
1064}1076}
10651077
...@@ -1072,9 +1084,10 @@ pub const CrossTarget = std.Target.Cross;...@@ -1072,9 +1084,10 @@ pub const CrossTarget = std.Target.Cross;
1072/// Deprecated. Use `std.Target`.1084/// Deprecated. Use `std.Target`.
1073pub const Target = std.Target;1085pub const Target = std.Target;
10741086
1075const Pkg = struct {1087pub const Pkg = struct {
1076 name: []const u8,1088 name: []const u8,
1077 path: []const u8,1089 path: []const u8,
1090 dependencies: ?[]Pkg = null,
1078};1091};
10791092
1080const CSourceFile = struct {1093const CSourceFile = struct {
...@@ -1403,6 +1416,10 @@ pub const LibExeObjStep = struct {...@@ -1403,6 +1416,10 @@ pub const LibExeObjStep = struct {
1403 self.builder.installArtifact(self);1416 self.builder.installArtifact(self);
1404 }1417 }
14051418
1419 pub fn installRaw(self: *LibExeObjStep, dest_filename: [] const u8) void {
1420 self.builder.installRaw(self, dest_filename);
1421 }
1422
1406 /// Creates a `RunStep` with an executable built with `addExecutable`.1423 /// Creates a `RunStep` with an executable built with `addExecutable`.
1407 /// Add command line arguments with `addArg`.1424 /// Add command line arguments with `addArg`.
1408 pub fn run(exe: *LibExeObjStep) *RunStep {1425 pub fn run(exe: *LibExeObjStep) *RunStep {
...@@ -1732,17 +1749,21 @@ pub const LibExeObjStep = struct {...@@ -1732,17 +1749,21 @@ pub const LibExeObjStep = struct {
1732 }1749 }
17331750
1734 pub fn addLibPath(self: *LibExeObjStep, path: []const u8) void {1751 pub fn addLibPath(self: *LibExeObjStep, path: []const u8) void {
1735 self.lib_paths.append(path) catch unreachable;1752 self.lib_paths.append(self.builder.dupe(path)) catch unreachable;
1736 }1753 }
17371754
1738 pub fn addFrameworkDir(self: *LibExeObjStep, dir_path: []const u8) void {1755 pub fn addFrameworkDir(self: *LibExeObjStep, dir_path: []const u8) void {
1739 self.framework_dirs.append(dir_path) catch unreachable;1756 self.framework_dirs.append(self.builder.dupe(dir_path)) catch unreachable;
1757 }
1758
1759 pub fn addPackage(self: *LibExeObjStep, package: Pkg) void {
1760 self.packages.append(package) catch unreachable;
1740 }1761 }
17411762
1742 pub fn addPackagePath(self: *LibExeObjStep, name: []const u8, pkg_index_path: []const u8) void {1763 pub fn addPackagePath(self: *LibExeObjStep, name: []const u8, pkg_index_path: []const u8) void {
1743 self.packages.append(Pkg{1764 self.packages.append(Pkg{
1744 .name = name,1765 .name = self.builder.dupe(name),
1745 .path = pkg_index_path,1766 .path = self.builder.dupe(pkg_index_path),
1746 }) catch unreachable;1767 }) catch unreachable;
1747 }1768 }
17481769
...@@ -2088,10 +2109,20 @@ pub const LibExeObjStep = struct {...@@ -2088,10 +2109,20 @@ pub const LibExeObjStep = struct {
2088 },2109 },
2089 }2110 }
2090 for (self.packages.toSliceConst()) |pkg| {2111 for (self.packages.toSliceConst()) |pkg| {
2091 zig_args.append("--pkg-begin") catch unreachable;2112 try zig_args.append("--pkg-begin");
2092 zig_args.append(pkg.name) catch unreachable;2113 try zig_args.append(pkg.name);
2093 zig_args.append(builder.pathFromRoot(pkg.path)) catch unreachable;2114 try zig_args.append(builder.pathFromRoot(pkg.path));
2094 zig_args.append("--pkg-end") catch unreachable;2115
2116 if (pkg.dependencies) |dependencies| {
2117 for (dependencies) |sub_pkg| {
2118 try zig_args.append("--pkg-begin");
2119 try zig_args.append(sub_pkg.name);
2120 try zig_args.append(builder.pathFromRoot(sub_pkg.path));
2121 try zig_args.append("--pkg-end");
2122 }
2123 }
2124
2125 try zig_args.append("--pkg-end");
2095 }2126 }
20962127
2097 for (self.include_dirs.toSliceConst()) |include_dir| {2128 for (self.include_dirs.toSliceConst()) |include_dir| {
lib/std/build/emit_raw.zig created+255
...@@ -0,0 +1,255 @@
1const std = @import("std");
2
3const Allocator = std.mem.Allocator;
4const ArenaAllocator = std.heap.ArenaAllocator;
5const ArrayList = std.ArrayList;
6const Builder = std.build.Builder;
7const File = std.fs.File;
8const InstallDir = std.build.InstallDir;
9const LibExeObjStep = std.build.LibExeObjStep;
10const Step = std.build.Step;
11const elf = std.elf;
12const fs = std.fs;
13const io = std.io;
14const sort = std.sort;
15const warn = std.debug.warn;
16
17const BinOutStream = io.OutStream(anyerror);
18const BinSeekStream = io.SeekableStream(anyerror, anyerror);
19const ElfSeekStream = io.SeekableStream(anyerror, anyerror);
20const ElfInStream = io.InStream(anyerror);
21
22const BinaryElfSection = struct {
23 elfOffset: u64,
24 binaryOffset: u64,
25 fileSize: usize,
26 segment: ?*BinaryElfSegment,
27};
28
29const BinaryElfSegment = struct {
30 physicalAddress: u64,
31 virtualAddress: u64,
32 elfOffset: u64,
33 binaryOffset: u64,
34 fileSize: usize,
35 firstSection: ?*BinaryElfSection,
36};
37
38const BinaryElfOutput = struct {
39 segments: ArrayList(*BinaryElfSegment),
40 sections: ArrayList(*BinaryElfSection),
41
42 const Self = @This();
43
44 pub fn init(allocator: *Allocator) Self {
45 return Self{
46 .segments = ArrayList(*BinaryElfSegment).init(allocator),
47 .sections = ArrayList(*BinaryElfSection).init(allocator),
48 };
49 }
50
51 pub fn deinit(self: *Self) void {
52 self.sections.deinit();
53 self.segments.deinit();
54 }
55
56 pub fn parseElf(self: *Self, elfFile: elf.Elf) !void {
57 const allocator = self.segments.allocator;
58
59 for (elfFile.section_headers) |section, i| {
60 if (sectionValidForOutput(section)) {
61 const newSection = try allocator.create(BinaryElfSection);
62
63 newSection.binaryOffset = 0;
64 newSection.elfOffset = section.sh_offset;
65 newSection.fileSize = @intCast(usize, section.sh_size);
66 newSection.segment = null;
67
68 try self.sections.append(newSection);
69 }
70 }
71
72 for (elfFile.program_headers) |programHeader, i| {
73 if (programHeader.p_type == elf.PT_LOAD) {
74 const newSegment = try allocator.create(BinaryElfSegment);
75
76 newSegment.physicalAddress = if (programHeader.p_paddr != 0) programHeader.p_paddr else programHeader.p_vaddr;
77 newSegment.virtualAddress = programHeader.p_vaddr;
78 newSegment.fileSize = @intCast(usize, programHeader.p_filesz);
79 newSegment.elfOffset = programHeader.p_offset;
80 newSegment.binaryOffset = 0;
81 newSegment.firstSection = null;
82
83 for (self.sections.toSlice()) |section| {
84 if (sectionWithinSegment(section, programHeader)) {
85 if (section.segment) |sectionSegment| {
86 if (sectionSegment.elfOffset > newSegment.elfOffset) {
87 section.segment = newSegment;
88 }
89 } else {
90 section.segment = newSegment;
91 }
92
93 if (newSegment.firstSection == null) {
94 newSegment.firstSection = section;
95 }
96 }
97 }
98
99 try self.segments.append(newSegment);
100 }
101 }
102
103 sort.sort(*BinaryElfSegment, self.segments.toSlice(), segmentSortCompare);
104
105 if (self.segments.len > 0) {
106 const firstSegment = self.segments.at(0);
107 if (firstSegment.firstSection) |firstSection| {
108 const diff = firstSection.elfOffset - firstSegment.elfOffset;
109
110 firstSegment.elfOffset += diff;
111 firstSegment.fileSize += diff;
112 firstSegment.physicalAddress += diff;
113
114 const basePhysicalAddress = firstSegment.physicalAddress;
115
116 for (self.segments.toSlice()) |segment| {
117 segment.binaryOffset = segment.physicalAddress - basePhysicalAddress;
118 }
119 }
120 }
121
122 for (self.sections.toSlice()) |section| {
123 if (section.segment) |segment| {
124 section.binaryOffset = segment.binaryOffset + (section.elfOffset - segment.elfOffset);
125 }
126 }
127
128 sort.sort(*BinaryElfSection, self.sections.toSlice(), sectionSortCompare);
129 }
130
131 fn sectionWithinSegment(section: *BinaryElfSection, segment: elf.ProgramHeader) bool {
132 return segment.p_offset <= section.elfOffset and (segment.p_offset + segment.p_filesz) >= (section.elfOffset + section.fileSize);
133 }
134
135 fn sectionValidForOutput(section: elf.SectionHeader) bool {
136 return section.sh_size > 0 and section.sh_type != elf.SHT_NOBITS and ((section.sh_flags & elf.SHF_ALLOC) == elf.SHF_ALLOC);
137 }
138
139 fn segmentSortCompare(left: *BinaryElfSegment, right: *BinaryElfSegment) bool {
140 if (left.physicalAddress < right.physicalAddress) {
141 return true;
142 }
143 if (left.physicalAddress > right.physicalAddress) {
144 return false;
145 }
146 return false;
147 }
148
149 fn sectionSortCompare(left: *BinaryElfSection, right: *BinaryElfSection) bool {
150 return left.binaryOffset < right.binaryOffset;
151 }
152};
153
154const WriteContext = struct {
155 inStream: *ElfInStream,
156 inSeekStream: *ElfSeekStream,
157 outStream: *BinOutStream,
158 outSeekStream: *BinSeekStream,
159};
160
161fn writeBinaryElfSection(allocator: *Allocator, context: WriteContext, section: *BinaryElfSection) !void {
162 var readBuffer = try allocator.alloc(u8, section.fileSize);
163 defer allocator.free(readBuffer);
164
165 try context.inSeekStream.seekTo(section.elfOffset);
166 _ = try context.inStream.read(readBuffer);
167
168 try context.outSeekStream.seekTo(section.binaryOffset);
169 try context.outStream.write(readBuffer);
170}
171
172fn emit_raw(allocator: *Allocator, elf_path: []const u8, raw_path: []const u8) !void {
173 var arenaAlloc = ArenaAllocator.init(allocator);
174 errdefer arenaAlloc.deinit();
175 var arena_allocator = &arenaAlloc.allocator;
176
177 const currentDir = fs.cwd();
178
179 var file = try currentDir.openFile(elf_path, File.OpenFlags{});
180 defer file.close();
181
182 var fileInStream = file.inStream();
183 var fileSeekStream = file.seekableStream();
184
185 var elfFile = try elf.Elf.openStream(allocator, @ptrCast(*ElfSeekStream, &fileSeekStream.stream), @ptrCast(*ElfInStream, &fileInStream.stream));
186 defer elfFile.close();
187
188 var outFile = try currentDir.createFile(raw_path, File.CreateFlags{});
189 defer outFile.close();
190
191 var outFileOutStream = outFile.outStream();
192 var outFileSeekStream = outFile.seekableStream();
193
194 const writeContext = WriteContext{
195 .inStream = @ptrCast(*ElfInStream, &fileInStream.stream),
196 .inSeekStream = @ptrCast(*ElfSeekStream, &fileSeekStream.stream),
197 .outStream = @ptrCast(*BinOutStream, &outFileOutStream.stream),
198 .outSeekStream = @ptrCast(*BinSeekStream, &outFileSeekStream.stream),
199 };
200
201 var binaryElfOutput = BinaryElfOutput.init(arena_allocator);
202 defer binaryElfOutput.deinit();
203
204 try binaryElfOutput.parseElf(elfFile);
205
206 for (binaryElfOutput.sections.toSlice()) |section| {
207 try writeBinaryElfSection(allocator, writeContext, section);
208 }
209}
210
211pub const InstallRawStep = struct {
212 step: Step,
213 builder: *Builder,
214 artifact: *LibExeObjStep,
215 dest_dir: InstallDir,
216 dest_filename: [] const u8,
217
218 const Self = @This();
219
220 pub fn create(builder: *Builder, artifact: *LibExeObjStep, dest_filename: [] const u8) *Self {
221 const self = builder.allocator.create(Self) catch unreachable;
222 self.* = Self{
223 .step = Step.init(builder.fmt("install raw binary {}", .{artifact.step.name}), builder.allocator, make),
224 .builder = builder,
225 .artifact = artifact,
226 .dest_dir = switch (artifact.kind) {
227 .Obj => unreachable,
228 .Test => unreachable,
229 .Exe => .Bin,
230 .Lib => unreachable,
231 },
232 .dest_filename = dest_filename,
233 };
234 self.step.dependOn(&artifact.step);
235
236 builder.pushInstalledFile(self.dest_dir, dest_filename);
237 return self;
238 }
239
240 fn make(step: *Step) !void {
241 const self = @fieldParentPtr(Self, "step", step);
242 const builder = self.builder;
243
244 if (self.artifact.target.getObjectFormat() != .elf) {
245 warn("InstallRawStep only works with ELF format.\n", .{});
246 return error.InvalidObjectFormat;
247 }
248
249 const full_src_path = self.artifact.getOutputPath();
250 const full_dest_path = builder.getInstallPath(self.dest_dir, self.dest_filename);
251
252 fs.makePath(builder.allocator, builder.getInstallPath(self.dest_dir, "")) catch unreachable;
253 try emit_raw(builder.allocator, full_src_path, full_dest_path);
254 }
255};
\ No newline at end of file
lib/std/c/parse.zig-1
...@@ -1428,4 +1428,3 @@ const Parser = struct {...@@ -1428,4 +1428,3 @@ const Parser = struct {
1428 });1428 });
1429 }1429 }
1430};1430};
1431
lib/std/c/tokenizer.zig+1-1
...@@ -631,7 +631,7 @@ pub const Tokenizer = struct {...@@ -631,7 +631,7 @@ pub const Tokenizer = struct {
631 },631 },
632 .BackSlashCr => switch (c) {632 .BackSlashCr => switch (c) {
633 '\n' => {633 '\n' => {
634 state = .Start;634 state = .Start;
635 },635 },
636 else => {636 else => {
637 result.id = .Invalid;637 result.id = .Invalid;
lib/std/crypto.zig+3
...@@ -21,6 +21,8 @@ pub const Blake2s256 = blake2.Blake2s256;...@@ -21,6 +21,8 @@ pub const Blake2s256 = blake2.Blake2s256;
21pub const Blake2b384 = blake2.Blake2b384;21pub const Blake2b384 = blake2.Blake2b384;
22pub const Blake2b512 = blake2.Blake2b512;22pub const Blake2b512 = blake2.Blake2b512;
2323
24pub const Blake3 = @import("crypto/blake3.zig").Blake3;
25
24const hmac = @import("crypto/hmac.zig");26const hmac = @import("crypto/hmac.zig");
25pub const HmacMd5 = hmac.HmacMd5;27pub const HmacMd5 = hmac.HmacMd5;
26pub const HmacSha1 = hmac.HmacSha1;28pub const HmacSha1 = hmac.HmacSha1;
...@@ -44,6 +46,7 @@ pub const randomBytes = std.os.getrandom;...@@ -44,6 +46,7 @@ pub const randomBytes = std.os.getrandom;
44test "crypto" {46test "crypto" {
45 _ = @import("crypto/aes.zig");47 _ = @import("crypto/aes.zig");
46 _ = @import("crypto/blake2.zig");48 _ = @import("crypto/blake2.zig");
49 _ = @import("crypto/blake3.zig");
47 _ = @import("crypto/chacha20.zig");50 _ = @import("crypto/chacha20.zig");
48 _ = @import("crypto/gimli.zig");51 _ = @import("crypto/gimli.zig");
49 _ = @import("crypto/hmac.zig");52 _ = @import("crypto/hmac.zig");
lib/std/crypto/benchmark.zig+1
...@@ -25,6 +25,7 @@ const hashes = [_]Crypto{...@@ -25,6 +25,7 @@ const hashes = [_]Crypto{
25 Crypto{ .ty = crypto.Sha3_512, .name = "sha3-512" },25 Crypto{ .ty = crypto.Sha3_512, .name = "sha3-512" },
26 Crypto{ .ty = crypto.Blake2s256, .name = "blake2s" },26 Crypto{ .ty = crypto.Blake2s256, .name = "blake2s" },
27 Crypto{ .ty = crypto.Blake2b512, .name = "blake2b" },27 Crypto{ .ty = crypto.Blake2b512, .name = "blake2b" },
28 Crypto{ .ty = crypto.Blake3, .name = "blake3" },
28};29};
2930
30pub fn benchmarkHash(comptime Hash: var, comptime bytes: comptime_int) !u64 {31pub fn benchmarkHash(comptime Hash: var, comptime bytes: comptime_int) !u64 {
lib/std/crypto/blake3.zig created+596
...@@ -0,0 +1,596 @@
1// Translated from BLAKE3 reference implementation.
2// Source: https://github.com/BLAKE3-team/BLAKE3
3
4const std = @import("../std.zig");
5const fmt = std.fmt;
6const math = std.math;
7const mem = std.mem;
8const testing = std.testing;
9
10const ChunkIterator = struct {
11 slice: []u8,
12 chunk_len: usize,
13
14 fn init(slice: []u8, chunk_len: usize) ChunkIterator {
15 return ChunkIterator{
16 .slice = slice,
17 .chunk_len = chunk_len,
18 };
19 }
20
21 fn next(self: *ChunkIterator) ?[]u8 {
22 const next_chunk = self.slice[0..math.min(self.chunk_len, self.slice.len)];
23 self.slice = self.slice[next_chunk.len..];
24 return if (next_chunk.len > 0) next_chunk else null;
25 }
26};
27
28const OUT_LEN: usize = 32;
29const KEY_LEN: usize = 32;
30const BLOCK_LEN: usize = 64;
31const CHUNK_LEN: usize = 1024;
32
33const IV = [8]u32{
34 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19,
35};
36
37const MSG_SCHEDULE = [7][16]u8{
38 [_]u8{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
39 [_]u8{ 2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8 },
40 [_]u8{ 3, 4, 10, 12, 13, 2, 7, 14, 6, 5, 9, 0, 11, 15, 8, 1 },
41 [_]u8{ 10, 7, 12, 9, 14, 3, 13, 15, 4, 0, 11, 2, 5, 8, 1, 6 },
42 [_]u8{ 12, 13, 9, 11, 15, 10, 14, 8, 7, 2, 5, 3, 0, 1, 6, 4 },
43 [_]u8{ 9, 14, 11, 5, 8, 12, 15, 1, 13, 3, 0, 10, 2, 6, 4, 7 },
44 [_]u8{ 11, 15, 5, 0, 1, 9, 8, 6, 14, 10, 2, 12, 3, 4, 7, 13 },
45};
46
47// These are the internal flags that we use to domain separate root/non-root,
48// chunk/parent, and chunk beginning/middle/end. These get set at the high end
49// of the block flags word in the compression function, so their values start
50// high and go down.
51const CHUNK_START: u8 = 1 << 0;
52const CHUNK_END: u8 = 1 << 1;
53const PARENT: u8 = 1 << 2;
54const ROOT: u8 = 1 << 3;
55const KEYED_HASH: u8 = 1 << 4;
56const DERIVE_KEY_CONTEXT: u8 = 1 << 5;
57const DERIVE_KEY_MATERIAL: u8 = 1 << 6;
58
59// The mixing function, G, which mixes either a column or a diagonal.
60fn g(state: *[16]u32, a: usize, b: usize, c: usize, d: usize, mx: u32, my: u32) void {
61 _ = @addWithOverflow(u32, state[a], state[b], &state[a]);
62 _ = @addWithOverflow(u32, state[a], mx, &state[a]);
63 state[d] = math.rotr(u32, state[d] ^ state[a], 16);
64 _ = @addWithOverflow(u32, state[c], state[d], &state[c]);
65 state[b] = math.rotr(u32, state[b] ^ state[c], 12);
66 _ = @addWithOverflow(u32, state[a], state[b], &state[a]);
67 _ = @addWithOverflow(u32, state[a], my, &state[a]);
68 state[d] = math.rotr(u32, state[d] ^ state[a], 8);
69 _ = @addWithOverflow(u32, state[c], state[d], &state[c]);
70 state[b] = math.rotr(u32, state[b] ^ state[c], 7);
71}
72
73fn round(state: *[16]u32, msg: [16]u32, schedule: [16]u8) void {
74 // Mix the columns.
75 g(state, 0, 4, 8, 12, msg[schedule[0]], msg[schedule[1]]);
76 g(state, 1, 5, 9, 13, msg[schedule[2]], msg[schedule[3]]);
77 g(state, 2, 6, 10, 14, msg[schedule[4]], msg[schedule[5]]);
78 g(state, 3, 7, 11, 15, msg[schedule[6]], msg[schedule[7]]);
79
80 // Mix the diagonals.
81 g(state, 0, 5, 10, 15, msg[schedule[8]], msg[schedule[9]]);
82 g(state, 1, 6, 11, 12, msg[schedule[10]], msg[schedule[11]]);
83 g(state, 2, 7, 8, 13, msg[schedule[12]], msg[schedule[13]]);
84 g(state, 3, 4, 9, 14, msg[schedule[14]], msg[schedule[15]]);
85}
86
87fn compress(
88 chaining_value: [8]u32,
89 block_words: [16]u32,
90 block_len: u32,
91 counter: u64,
92 flags: u8,
93) [16]u32 {
94 var state = [16]u32{
95 chaining_value[0],
96 chaining_value[1],
97 chaining_value[2],
98 chaining_value[3],
99 chaining_value[4],
100 chaining_value[5],
101 chaining_value[6],
102 chaining_value[7],
103 IV[0],
104 IV[1],
105 IV[2],
106 IV[3],
107 @truncate(u32, counter),
108 @truncate(u32, counter >> 32),
109 block_len,
110 flags,
111 };
112 for (MSG_SCHEDULE) |schedule| {
113 round(&state, block_words, schedule);
114 }
115 for (chaining_value) |_, i| {
116 state[i] ^= state[i + 8];
117 state[i + 8] ^= chaining_value[i];
118 }
119 return state;
120}
121
122fn first_8_words(words: [16]u32) [8]u32 {
123 return @ptrCast(*const [8]u32, &words).*;
124}
125
126fn words_from_little_endian_bytes(words: []u32, bytes: []const u8) void {
127 var byte_slice = bytes;
128 for (words) |*word| {
129 word.* = mem.readIntSliceLittle(u32, byte_slice);
130 byte_slice = byte_slice[4..];
131 }
132}
133
134// Each chunk or parent node can produce either an 8-word chaining value or, by
135// setting the ROOT flag, any number of final output bytes. The Output struct
136// captures the state just prior to choosing between those two possibilities.
137const Output = struct {
138 input_chaining_value: [8]u32,
139 block_words: [16]u32,
140 block_len: u32,
141 counter: u64,
142 flags: u8,
143
144 fn chaining_value(self: *const Output) [8]u32 {
145 return first_8_words(compress(
146 self.input_chaining_value,
147 self.block_words,
148 self.block_len,
149 self.counter,
150 self.flags,
151 ));
152 }
153
154 fn root_output_bytes(self: *const Output, output: []u8) void {
155 var out_block_it = ChunkIterator.init(output, 2 * OUT_LEN);
156 var output_block_counter: usize = 0;
157 while (out_block_it.next()) |out_block| {
158 var words = compress(
159 self.input_chaining_value,
160 self.block_words,
161 self.block_len,
162 output_block_counter,
163 self.flags | ROOT,
164 );
165 var out_word_it = ChunkIterator.init(out_block, 4);
166 var word_counter: usize = 0;
167 while (out_word_it.next()) |out_word| {
168 var word_bytes: [4]u8 = undefined;
169 mem.writeIntLittle(u32, &word_bytes, words[word_counter]);
170 mem.copy(u8, out_word, word_bytes[0..out_word.len]);
171 word_counter += 1;
172 }
173 output_block_counter += 1;
174 }
175 }
176};
177
178const ChunkState = struct {
179 chaining_value: [8]u32,
180 chunk_counter: u64,
181 block: [BLOCK_LEN]u8 = [_]u8{0} ** BLOCK_LEN,
182 block_len: u8 = 0,
183 blocks_compressed: u8 = 0,
184 flags: u8,
185
186 fn init(key: [8]u32, chunk_counter: u64, flags: u8) ChunkState {
187 return ChunkState{
188 .chaining_value = key,
189 .chunk_counter = chunk_counter,
190 .flags = flags,
191 };
192 }
193
194 fn len(self: *const ChunkState) usize {
195 return BLOCK_LEN * @as(usize, self.blocks_compressed) + @as(usize, self.block_len);
196 }
197
198 fn fill_block_buf(self: *ChunkState, input: []const u8) []const u8 {
199 const want = BLOCK_LEN - self.block_len;
200 const take = math.min(want, input.len);
201 mem.copy(u8, self.block[self.block_len..][0..take], input[0..take]);
202 self.block_len += @truncate(u8, take);
203 return input[take..];
204 }
205
206 fn start_flag(self: *const ChunkState) u8 {
207 return if (self.blocks_compressed == 0) CHUNK_START else 0;
208 }
209
210 fn update(self: *ChunkState, input_slice: []const u8) void {
211 var input = input_slice;
212 while (input.len > 0) {
213 // If the block buffer is full, compress it and clear it. More
214 // input is coming, so this compression is not CHUNK_END.
215 if (self.block_len == BLOCK_LEN) {
216 var block_words: [16]u32 = undefined;
217 words_from_little_endian_bytes(block_words[0..], self.block[0..]);
218 self.chaining_value = first_8_words(compress(
219 self.chaining_value,
220 block_words,
221 BLOCK_LEN,
222 self.chunk_counter,
223 self.flags | self.start_flag(),
224 ));
225 self.blocks_compressed += 1;
226 self.block = [_]u8{0} ** BLOCK_LEN;
227 self.block_len = 0;
228 }
229
230 // Copy input bytes into the block buffer.
231 input = self.fill_block_buf(input);
232 }
233 }
234
235 fn output(self: *const ChunkState) Output {
236 var block_words: [16]u32 = undefined;
237 words_from_little_endian_bytes(block_words[0..], self.block[0..]);
238 return Output{
239 .input_chaining_value = self.chaining_value,
240 .block_words = block_words,
241 .block_len = self.block_len,
242 .counter = self.chunk_counter,
243 .flags = self.flags | self.start_flag() | CHUNK_END,
244 };
245 }
246};
247
248fn parent_output(
249 left_child_cv: [8]u32,
250 right_child_cv: [8]u32,
251 key: [8]u32,
252 flags: u8,
253) Output {
254 var block_words: [16]u32 = undefined;
255 mem.copy(u32, block_words[0..8], left_child_cv[0..]);
256 mem.copy(u32, block_words[8..], right_child_cv[0..]);
257 return Output{
258 .input_chaining_value = key,
259 .block_words = block_words,
260 .block_len = BLOCK_LEN, // Always BLOCK_LEN (64) for parent nodes.
261 .counter = 0, // Always 0 for parent nodes.
262 .flags = PARENT | flags,
263 };
264}
265
266fn parent_cv(
267 left_child_cv: [8]u32,
268 right_child_cv: [8]u32,
269 key: [8]u32,
270 flags: u8,
271) [8]u32 {
272 return parent_output(left_child_cv, right_child_cv, key, flags).chaining_value();
273}
274
275/// An incremental hasher that can accept any number of writes.
276pub const Blake3 = struct {
277 chunk_state: ChunkState,
278 key: [8]u32,
279 cv_stack: [54][8]u32 = undefined, // Space for 54 subtree chaining values:
280 cv_stack_len: u8 = 0, // 2^54 * CHUNK_LEN = 2^64
281 flags: u8,
282
283 pub const digest_length = OUT_LEN;
284 pub const block_length = BLOCK_LEN;
285
286 fn init_internal(key: [8]u32, flags: u8) Blake3 {
287 return Blake3{
288 .chunk_state = ChunkState.init(key, 0, flags),
289 .key = key,
290 .flags = flags,
291 };
292 }
293
294 /// Construct a new `Blake3` for the regular hash function.
295 pub fn init() Blake3 {
296 return Blake3.init_internal(IV, 0);
297 }
298
299 /// Construct a new `Blake3` for the keyed hash function.
300 pub fn init_keyed(key: [KEY_LEN]u8) Blake3 {
301 var key_words: [8]u32 = undefined;
302 words_from_little_endian_bytes(key_words[0..], key[0..]);
303 return Blake3.init_internal(key_words, KEYED_HASH);
304 }
305
306 /// Construct a new `Blake3` for the key derivation function. The context
307 /// string should be hardcoded, globally unique, and application-specific.
308 pub fn init_derive_key(context: []const u8) Blake3 {
309 var context_hasher = Blake3.init_internal(IV, DERIVE_KEY_CONTEXT);
310 context_hasher.update(context);
311 var context_key: [KEY_LEN]u8 = undefined;
312 context_hasher.final(context_key[0..]);
313 var context_key_words: [8]u32 = undefined;
314 words_from_little_endian_bytes(context_key_words[0..], context_key[0..]);
315 return Blake3.init_internal(context_key_words, DERIVE_KEY_MATERIAL);
316 }
317
318 pub fn hash(in: []const u8, out: []u8) void {
319 var hasher = Blake3.init();
320 hasher.update(in);
321 hasher.final(out);
322 }
323
324 /// Reset the `Blake3` to its initial state.
325 pub fn reset(self: *Blake3) void {
326 self.chunk_state = ChunkState.init(self.key, 0, self.flags);
327 self.cv_stack_len = 0;
328 }
329
330 fn push_cv(self: *Blake3, cv: [8]u32) void {
331 self.cv_stack[self.cv_stack_len] = cv;
332 self.cv_stack_len += 1;
333 }
334
335 fn pop_cv(self: *Blake3) [8]u32 {
336 self.cv_stack_len -= 1;
337 return self.cv_stack[self.cv_stack_len];
338 }
339
340 // Section 5.1.2 of the BLAKE3 spec explains this algorithm in more detail.
341 fn add_chunk_chaining_value(self: *Blake3, new_cv: [8]u32, total_chunks: u64) void {
342 // This chunk might complete some subtrees. For each completed subtree,
343 // its left child will be the current top entry in the CV stack, and
344 // its right child will be the current value of `new_cv`. Pop each left
345 // child off the stack, merge it with `new_cv`, and overwrite `new_cv`
346 // with the result. After all these merges, push the final value of
347 // `new_cv` onto the stack. The number of completed subtrees is given
348 // by the number of trailing 0-bits in the new total number of chunks.
349 var chunk_counter = total_chunks;
350 while (chunk_counter & 1 == 0) {
351 new_cv = parent_cv(self.pop_cv(), new_cv, self.key, self.flags);
352 chunk_counter >>= 1;
353 }
354 self.push_cv(new_cv);
355 }
356
357 /// Add input to the hash state. This can be called any number of times.
358 pub fn update(self: *Blake3, input_slice: []const u8) void {
359 var input = input_slice;
360 while (input.len > 0) {
361 // If the current chunk is complete, finalize it and reset the
362 // chunk state. More input is coming, so this chunk is not ROOT.
363 if (self.chunk_state.len() == CHUNK_LEN) {
364 const chunk_cv = self.chunk_state.output().chaining_value();
365 const total_chunks = self.chunk_state.chunk_counter + 1;
366 self.add_chunk_chaining_value(chunk_cv, total_chunks);
367 self.chunk_state = ChunkState.init(self.key, total_chunks, self.flags);
368 }
369
370 // Compress input bytes into the current chunk state.
371 const want = CHUNK_LEN - self.chunk_state.len();
372 const take = math.min(want, input.len);
373 self.chunk_state.update(input[0..take]);
374 input = input[take..];
375 }
376 }
377
378 /// Finalize the hash and write any number of output bytes.
379 pub fn final(self: *const Blake3, out_slice: []u8) void {
380 // Starting with the Output from the current chunk, compute all the
381 // parent chaining values along the right edge of the tree, until we
382 // have the root Output.
383 var output = self.chunk_state.output();
384 var parent_nodes_remaining: usize = self.cv_stack_len;
385 while (parent_nodes_remaining > 0) {
386 parent_nodes_remaining -= 1;
387 output = parent_output(
388 self.cv_stack[parent_nodes_remaining],
389 output.chaining_value(),
390 self.key,
391 self.flags,
392 );
393 }
394 output.root_output_bytes(out_slice);
395 }
396};
397
398// Use named type declarations to workaround crash with anonymous structs (issue #4373).
399const ReferenceTest = struct {
400 key: *const [KEY_LEN]u8,
401 context_string: []const u8,
402 cases: []const ReferenceTestCase,
403};
404
405const ReferenceTestCase = struct {
406 input_len: usize,
407 hash: *const [262]u8,
408 keyed_hash: *const [262]u8,
409 derive_key: *const [262]u8,
410};
411
412// Each test is an input length and three outputs, one for each of the `hash`, `keyed_hash`, and
413// `derive_key` modes. The input in each case is filled with a 251-byte-long repeating pattern:
414// 0, 1, 2, ..., 249, 250, 0, 1, ... The key used with `keyed_hash` is the 32-byte ASCII string
415// given in the `key` field below. For `derive_key`, the test input is used as the input key, and
416// the context string is 'BLAKE3 2019-12-27 16:29:52 test vectors context'. (As good practice for
417// following the security requirements of `derive_key`, test runners should make that context
418// string a hardcoded constant, and we do not provided it in machine-readable form.) Outputs are
419// encoded as hexadecimal. Each case is an extended output, and implementations should also check
420// that the first 32 bytes match their default-length output.
421//
422// Source: https://github.com/BLAKE3-team/BLAKE3/blob/92d421dea1a89e2f079f4dbd93b0dab41234b279/test_vectors/test_vectors.json
423const reference_test = ReferenceTest{
424 .key = "whats the Elvish word for friend",
425 .context_string = "BLAKE3 2019-12-27 16:29:52 test vectors context",
426 .cases = &[_]ReferenceTestCase{
427 .{
428 .input_len = 0,
429 .hash = "af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262e00f03e7b69af26b7faaf09fcd333050338ddfe085b8cc869ca98b206c08243a26f5487789e8f660afe6c99ef9e0c52b92e7393024a80459cf91f476f9ffdbda7001c22e159b402631f277ca96f2defdf1078282314e763699a31c5363165421cce14d",
430 .keyed_hash = "92b2b75604ed3c761f9d6f62392c8a9227ad0ea3f09573e783f1498a4ed60d26b18171a2f22a4b94822c701f107153dba24918c4bae4d2945c20ece13387627d3b73cbf97b797d5e59948c7ef788f54372df45e45e4293c7dc18c1d41144a9758be58960856be1eabbe22c2653190de560ca3b2ac4aa692a9210694254c371e851bc8f",
431 .derive_key = "2cc39783c223154fea8dfb7c1b1660f2ac2dcbd1c1de8277b0b0dd39b7e50d7d905630c8be290dfcf3e6842f13bddd573c098c3f17361f1f206b8cad9d088aa4a3f746752c6b0ce6a83b0da81d59649257cdf8eb3e9f7d4998e41021fac119deefb896224ac99f860011f73609e6e0e4540f93b273e56547dfd3aa1a035ba6689d89a0",
432 },
433 .{
434 .input_len = 1,
435 .hash = "2d3adedff11b61f14c886e35afa036736dcd87a74d27b5c1510225d0f592e213c3a6cb8bf623e20cdb535f8d1a5ffb86342d9c0b64aca3bce1d31f60adfa137b358ad4d79f97b47c3d5e79f179df87a3b9776ef8325f8329886ba42f07fb138bb502f4081cbcec3195c5871e6c23e2cc97d3c69a613eba131e5f1351f3f1da786545e5",
436 .keyed_hash = "6d7878dfff2f485635d39013278ae14f1454b8c0a3a2d34bc1ab38228a80c95b6568c0490609413006fbd428eb3fd14e7756d90f73a4725fad147f7bf70fd61c4e0cf7074885e92b0e3f125978b4154986d4fb202a3f331a3fb6cf349a3a70e49990f98fe4289761c8602c4e6ab1138d31d3b62218078b2f3ba9a88e1d08d0dd4cea11",
437 .derive_key = "b3e2e340a117a499c6cf2398a19ee0d29cca2bb7404c73063382693bf66cb06c5827b91bf889b6b97c5477f535361caefca0b5d8c4746441c57617111933158950670f9aa8a05d791daae10ac683cbef8faf897c84e6114a59d2173c3f417023a35d6983f2c7dfa57e7fc559ad751dbfb9ffab39c2ef8c4aafebc9ae973a64f0c76551",
438 },
439 .{
440 .input_len = 1023,
441 .hash = "10108970eeda3eb932baac1428c7a2163b0e924c9a9e25b35bba72b28f70bd11a182d27a591b05592b15607500e1e8dd56bc6c7fc063715b7a1d737df5bad3339c56778957d870eb9717b57ea3d9fb68d1b55127bba6a906a4a24bbd5acb2d123a37b28f9e9a81bbaae360d58f85e5fc9d75f7c370a0cc09b6522d9c8d822f2f28f485",
442 .keyed_hash = "c951ecdf03288d0fcc96ee3413563d8a6d3589547f2c2fb36d9786470f1b9d6e890316d2e6d8b8c25b0a5b2180f94fb1a158ef508c3cde45e2966bd796a696d3e13efd86259d756387d9becf5c8bf1ce2192b87025152907b6d8cc33d17826d8b7b9bc97e38c3c85108ef09f013e01c229c20a83d9e8efac5b37470da28575fd755a10",
443 .derive_key = "74a16c1c3d44368a86e1ca6df64be6a2f64cce8f09220787450722d85725dea59c413264404661e9e4d955409dfe4ad3aa487871bcd454ed12abfe2c2b1eb7757588cf6cb18d2eccad49e018c0d0fec323bec82bf1644c6325717d13ea712e6840d3e6e730d35553f59eff5377a9c350bcc1556694b924b858f329c44ee64b884ef00d",
444 },
445 .{
446 .input_len = 1024,
447 .hash = "42214739f095a406f3fc83deb889744ac00df831c10daa55189b5d121c855af71cf8107265ecdaf8505b95d8fcec83a98a6a96ea5109d2c179c47a387ffbb404756f6eeae7883b446b70ebb144527c2075ab8ab204c0086bb22b7c93d465efc57f8d917f0b385c6df265e77003b85102967486ed57db5c5ca170ba441427ed9afa684e",
448 .keyed_hash = "75c46f6f3d9eb4f55ecaaee480db732e6c2105546f1e675003687c31719c7ba4a78bc838c72852d4f49c864acb7adafe2478e824afe51c8919d06168414c265f298a8094b1ad813a9b8614acabac321f24ce61c5a5346eb519520d38ecc43e89b5000236df0597243e4d2493fd626730e2ba17ac4d8824d09d1a4a8f57b8227778e2de",
449 .derive_key = "7356cd7720d5b66b6d0697eb3177d9f8d73a4a5c5e968896eb6a6896843027066c23b601d3ddfb391e90d5c8eccdef4ae2a264bce9e612ba15e2bc9d654af1481b2e75dbabe615974f1070bba84d56853265a34330b4766f8e75edd1f4a1650476c10802f22b64bd3919d246ba20a17558bc51c199efdec67e80a227251808d8ce5bad",
450 },
451 .{
452 .input_len = 1025,
453 .hash = "d00278ae47eb27b34faecf67b4fe263f82d5412916c1ffd97c8cb7fb814b8444f4c4a22b4b399155358a994e52bf255de60035742ec71bd08ac275a1b51cc6bfe332b0ef84b409108cda080e6269ed4b3e2c3f7d722aa4cdc98d16deb554e5627be8f955c98e1d5f9565a9194cad0c4285f93700062d9595adb992ae68ff12800ab67a",
454 .keyed_hash = "357dc55de0c7e382c900fd6e320acc04146be01db6a8ce7210b7189bd664ea69362396b77fdc0d2634a552970843722066c3c15902ae5097e00ff53f1e116f1cd5352720113a837ab2452cafbde4d54085d9cf5d21ca613071551b25d52e69d6c81123872b6f19cd3bc1333edf0c52b94de23ba772cf82636cff4542540a7738d5b930",
455 .derive_key = "effaa245f065fbf82ac186839a249707c3bddf6d3fdda22d1b95a3c970379bcb5d31013a167509e9066273ab6e2123bc835b408b067d88f96addb550d96b6852dad38e320b9d940f86db74d398c770f462118b35d2724efa13da97194491d96dd37c3c09cbef665953f2ee85ec83d88b88d11547a6f911c8217cca46defa2751e7f3ad",
456 },
457 .{
458 .input_len = 2048,
459 .hash = "e776b6028c7cd22a4d0ba182a8bf62205d2ef576467e838ed6f2529b85fba24a9a60bf80001410ec9eea6698cd537939fad4749edd484cb541aced55cd9bf54764d063f23f6f1e32e12958ba5cfeb1bf618ad094266d4fc3c968c2088f677454c288c67ba0dba337b9d91c7e1ba586dc9a5bc2d5e90c14f53a8863ac75655461cea8f9",
460 .keyed_hash = "879cf1fa2ea0e79126cb1063617a05b6ad9d0b696d0d757cf053439f60a99dd10173b961cd574288194b23ece278c330fbb8585485e74967f31352a8183aa782b2b22f26cdcadb61eed1a5bc144b8198fbb0c13abbf8e3192c145d0a5c21633b0ef86054f42809df823389ee40811a5910dcbd1018af31c3b43aa55201ed4edaac74fe",
461 .derive_key = "7b2945cb4fef70885cc5d78a87bf6f6207dd901ff239201351ffac04e1088a23e2c11a1ebffcea4d80447867b61badb1383d842d4e79645d48dd82ccba290769caa7af8eaa1bd78a2a5e6e94fbdab78d9c7b74e894879f6a515257ccf6f95056f4e25390f24f6b35ffbb74b766202569b1d797f2d4bd9d17524c720107f985f4ddc583",
462 },
463 .{
464 .input_len = 2049,
465 .hash = "5f4d72f40d7a5f82b15ca2b2e44b1de3c2ef86c426c95c1af0b687952256303096de31d71d74103403822a2e0bc1eb193e7aecc9643a76b7bbc0c9f9c52e8783aae98764ca468962b5c2ec92f0c74eb5448d519713e09413719431c802f948dd5d90425a4ecdadece9eb178d80f26efccae630734dff63340285adec2aed3b51073ad3",
466 .keyed_hash = "9f29700902f7c86e514ddc4df1e3049f258b2472b6dd5267f61bf13983b78dd5f9a88abfefdfa1e00b418971f2b39c64ca621e8eb37fceac57fd0c8fc8e117d43b81447be22d5d8186f8f5919ba6bcc6846bd7d50726c06d245672c2ad4f61702c646499ee1173daa061ffe15bf45a631e2946d616a4c345822f1151284712f76b2b0e",
467 .derive_key = "2ea477c5515cc3dd606512ee72bb3e0e758cfae7232826f35fb98ca1bcbdf27316d8e9e79081a80b046b60f6a263616f33ca464bd78d79fa18200d06c7fc9bffd808cc4755277a7d5e09da0f29ed150f6537ea9bed946227ff184cc66a72a5f8c1e4bd8b04e81cf40fe6dc4427ad5678311a61f4ffc39d195589bdbc670f63ae70f4b6",
468 },
469 .{
470 .input_len = 3072,
471 .hash = "b98cb0ff3623be03326b373de6b9095218513e64f1ee2edd2525c7ad1e5cffd29a3f6b0b978d6608335c09dc94ccf682f9951cdfc501bfe47b9c9189a6fc7b404d120258506341a6d802857322fbd20d3e5dae05b95c88793fa83db1cb08e7d8008d1599b6209d78336e24839724c191b2a52a80448306e0daa84a3fdb566661a37e11",
472 .keyed_hash = "044a0e7b172a312dc02a4c9a818c036ffa2776368d7f528268d2e6b5df19177022f302d0529e4174cc507c463671217975e81dab02b8fdeb0d7ccc7568dd22574c783a76be215441b32e91b9a904be8ea81f7a0afd14bad8ee7c8efc305ace5d3dd61b996febe8da4f56ca0919359a7533216e2999fc87ff7d8f176fbecb3d6f34278b",
473 .derive_key = "050df97f8c2ead654d9bb3ab8c9178edcd902a32f8495949feadcc1e0480c46b3604131bbd6e3ba573b6dd682fa0a63e5b165d39fc43a625d00207607a2bfeb65ff1d29292152e26b298868e3b87be95d6458f6f2ce6118437b632415abe6ad522874bcd79e4030a5e7bad2efa90a7a7c67e93f0a18fb28369d0a9329ab5c24134ccb0",
474 },
475 .{
476 .input_len = 3073,
477 .hash = "7124b49501012f81cc7f11ca069ec9226cecb8a2c850cfe644e327d22d3e1cd39a27ae3b79d68d89da9bf25bc27139ae65a324918a5f9b7828181e52cf373c84f35b639b7fccbb985b6f2fa56aea0c18f531203497b8bbd3a07ceb5926f1cab74d14bd66486d9a91eba99059a98bd1cd25876b2af5a76c3e9eed554ed72ea952b603bf",
478 .keyed_hash = "68dede9bef00ba89e43f31a6825f4cf433389fedae75c04ee9f0cf16a427c95a96d6da3fe985054d3478865be9a092250839a697bbda74e279e8a9e69f0025e4cfddd6cfb434b1cd9543aaf97c635d1b451a4386041e4bb100f5e45407cbbc24fa53ea2de3536ccb329e4eb9466ec37093a42cf62b82903c696a93a50b702c80f3c3c5",
479 .derive_key = "72613c9ec9ff7e40f8f5c173784c532ad852e827dba2bf85b2ab4b76f7079081576288e552647a9d86481c2cae75c2dd4e7c5195fb9ada1ef50e9c5098c249d743929191441301c69e1f48505a4305ec1778450ee48b8e69dc23a25960fe33070ea549119599760a8a2d28aeca06b8c5e9ba58bc19e11fe57b6ee98aa44b2a8e6b14a5",
480 },
481 .{
482 .input_len = 4096,
483 .hash = "015094013f57a5277b59d8475c0501042c0b642e531b0a1c8f58d2163229e9690289e9409ddb1b99768eafe1623da896faf7e1114bebeadc1be30829b6f8af707d85c298f4f0ff4d9438aef948335612ae921e76d411c3a9111df62d27eaf871959ae0062b5492a0feb98ef3ed4af277f5395172dbe5c311918ea0074ce0036454f620",
484 .keyed_hash = "befc660aea2f1718884cd8deb9902811d332f4fc4a38cf7c7300d597a081bfc0bbb64a36edb564e01e4b4aaf3b060092a6b838bea44afebd2deb8298fa562b7b597c757b9df4c911c3ca462e2ac89e9a787357aaf74c3b56d5c07bc93ce899568a3eb17d9250c20f6c5f6c1e792ec9a2dcb715398d5a6ec6d5c54f586a00403a1af1de",
485 .derive_key = "1e0d7f3db8c414c97c6307cbda6cd27ac3b030949da8e23be1a1a924ad2f25b9d78038f7b198596c6cc4a9ccf93223c08722d684f240ff6569075ed81591fd93f9fff1110b3a75bc67e426012e5588959cc5a4c192173a03c00731cf84544f65a2fb9378989f72e9694a6a394a8a30997c2e67f95a504e631cd2c5f55246024761b245",
486 },
487 .{
488 .input_len = 4097,
489 .hash = "9b4052b38f1c5fc8b1f9ff7ac7b27cd242487b3d890d15c96a1c25b8aa0fb99505f91b0b5600a11251652eacfa9497b31cd3c409ce2e45cfe6c0a016967316c426bd26f619eab5d70af9a418b845c608840390f361630bd497b1ab44019316357c61dbe091ce72fc16dc340ac3d6e009e050b3adac4b5b2c92e722cffdc46501531956",
490 .keyed_hash = "00df940cd36bb9fa7cbbc3556744e0dbc8191401afe70520ba292ee3ca80abbc606db4976cfdd266ae0abf667d9481831ff12e0caa268e7d3e57260c0824115a54ce595ccc897786d9dcbf495599cfd90157186a46ec800a6763f1c59e36197e9939e900809f7077c102f888caaf864b253bc41eea812656d46742e4ea42769f89b83f",
491 .derive_key = "aca51029626b55fda7117b42a7c211f8c6e9ba4fe5b7a8ca922f34299500ead8a897f66a400fed9198fd61dd2d58d382458e64e100128075fc54b860934e8de2e84170734b06e1d212a117100820dbc48292d148afa50567b8b84b1ec336ae10d40c8c975a624996e12de31abbe135d9d159375739c333798a80c64ae895e51e22f3ad",
492 },
493 .{
494 .input_len = 5120,
495 .hash = "9cadc15fed8b5d854562b26a9536d9707cadeda9b143978f319ab34230535833acc61c8fdc114a2010ce8038c853e121e1544985133fccdd0a2d507e8e615e611e9a0ba4f47915f49e53d721816a9198e8b30f12d20ec3689989175f1bf7a300eee0d9321fad8da232ece6efb8e9fd81b42ad161f6b9550a069e66b11b40487a5f5059",
496 .keyed_hash = "2c493e48e9b9bf31e0553a22b23503c0a3388f035cece68eb438d22fa1943e209b4dc9209cd80ce7c1f7c9a744658e7e288465717ae6e56d5463d4f80cdb2ef56495f6a4f5487f69749af0c34c2cdfa857f3056bf8d807336a14d7b89bf62bef2fb54f9af6a546f818dc1e98b9e07f8a5834da50fa28fb5874af91bf06020d1bf0120e",
497 .derive_key = "7a7acac8a02adcf3038d74cdd1d34527de8a0fcc0ee3399d1262397ce5817f6055d0cefd84d9d57fe792d65a278fd20384ac6c30fdb340092f1a74a92ace99c482b28f0fc0ef3b923e56ade20c6dba47e49227166251337d80a037e987ad3a7f728b5ab6dfafd6e2ab1bd583a95d9c895ba9c2422c24ea0f62961f0dca45cad47bfa0d",
498 },
499 .{
500 .input_len = 5121,
501 .hash = "628bd2cb2004694adaab7bbd778a25df25c47b9d4155a55f8fbd79f2fe154cff96adaab0613a6146cdaabe498c3a94e529d3fc1da2bd08edf54ed64d40dcd6777647eac51d8277d70219a9694334a68bc8f0f23e20b0ff70ada6f844542dfa32cd4204ca1846ef76d811cdb296f65e260227f477aa7aa008bac878f72257484f2b6c95",
502 .keyed_hash = "6ccf1c34753e7a044db80798ecd0782a8f76f33563accaddbfbb2e0ea4b2d0240d07e63f13667a8d1490e5e04f13eb617aea16a8c8a5aaed1ef6fbde1b0515e3c81050b361af6ead126032998290b563e3caddeaebfab592e155f2e161fb7cba939092133f23f9e65245e58ec23457b78a2e8a125588aad6e07d7f11a85b88d375b72d",
503 .derive_key = "b07f01e518e702f7ccb44a267e9e112d403a7b3f4883a47ffbed4b48339b3c341a0add0ac032ab5aaea1e4e5b004707ec5681ae0fcbe3796974c0b1cf31a194740c14519273eedaabec832e8a784b6e7cfc2c5952677e6c3f2c3914454082d7eb1ce1766ac7d75a4d3001fc89544dd46b5147382240d689bbbaefc359fb6ae30263165",
504 },
505 .{
506 .input_len = 6144,
507 .hash = "3e2e5b74e048f3add6d21faab3f83aa44d3b2278afb83b80b3c35164ebeca2054d742022da6fdda444ebc384b04a54c3ac5839b49da7d39f6d8a9db03deab32aade156c1c0311e9b3435cde0ddba0dce7b26a376cad121294b689193508dd63151603c6ddb866ad16c2ee41585d1633a2cea093bea714f4c5d6b903522045b20395c83",
508 .keyed_hash = "3d6b6d21281d0ade5b2b016ae4034c5dec10ca7e475f90f76eac7138e9bc8f1dc35754060091dc5caf3efabe0603c60f45e415bb3407db67e6beb3d11cf8e4f7907561f05dace0c15807f4b5f389c841eb114d81a82c02a00b57206b1d11fa6e803486b048a5ce87105a686dee041207e095323dfe172df73deb8c9532066d88f9da7e",
509 .derive_key = "2a95beae63ddce523762355cf4b9c1d8f131465780a391286a5d01abb5683a1597099e3c6488aab6c48f3c15dbe1942d21dbcdc12115d19a8b8465fb54e9053323a9178e4275647f1a9927f6439e52b7031a0b465c861a3fc531527f7758b2b888cf2f20582e9e2c593709c0a44f9c6e0f8b963994882ea4168827823eef1f64169fef",
510 },
511 .{
512 .input_len = 6145,
513 .hash = "f1323a8631446cc50536a9f705ee5cb619424d46887f3c376c695b70e0f0507f18a2cfdd73c6e39dd75ce7c1c6e3ef238fd54465f053b25d21044ccb2093beb015015532b108313b5829c3621ce324b8e14229091b7c93f32db2e4e63126a377d2a63a3597997d4f1cba59309cb4af240ba70cebff9a23d5e3ff0cdae2cfd54e070022",
514 .keyed_hash = "9ac301e9e39e45e3250a7e3b3df701aa0fb6889fbd80eeecf28dbc6300fbc539f3c184ca2f59780e27a576c1d1fb9772e99fd17881d02ac7dfd39675aca918453283ed8c3169085ef4a466b91c1649cc341dfdee60e32231fc34c9c4e0b9a2ba87ca8f372589c744c15fd6f985eec15e98136f25beeb4b13c4e43dc84abcc79cd4646c",
515 .derive_key = "379bcc61d0051dd489f686c13de00d5b14c505245103dc040d9e4dd1facab8e5114493d029bdbd295aaa744a59e31f35c7f52dba9c3642f773dd0b4262a9980a2aef811697e1305d37ba9d8b6d850ef07fe41108993180cf779aeece363704c76483458603bbeeb693cffbbe5588d1f3535dcad888893e53d977424bb707201569a8d2",
516 },
517 .{
518 .input_len = 7168,
519 .hash = "61da957ec2499a95d6b8023e2b0e604ec7f6b50e80a9678b89d2628e99ada77a5707c321c83361793b9af62a40f43b523df1c8633cecb4cd14d00bdc79c78fca5165b863893f6d38b02ff7236c5a9a8ad2dba87d24c547cab046c29fc5bc1ed142e1de4763613bb162a5a538e6ef05ed05199d751f9eb58d332791b8d73fb74e4fce95",
520 .keyed_hash = "b42835e40e9d4a7f42ad8cc04f85a963a76e18198377ed84adddeaecacc6f3fca2f01d5277d69bb681c70fa8d36094f73ec06e452c80d2ff2257ed82e7ba348400989a65ee8daa7094ae0933e3d2210ac6395c4af24f91c2b590ef87d7788d7066ea3eaebca4c08a4f14b9a27644f99084c3543711b64a070b94f2c9d1d8a90d035d52",
521 .derive_key = "11c37a112765370c94a51415d0d651190c288566e295d505defdad895dae223730d5a5175a38841693020669c7638f40b9bc1f9f39cf98bda7a5b54ae24218a800a2116b34665aa95d846d97ea988bfcb53dd9c055d588fa21ba78996776ea6c40bc428b53c62b5f3ccf200f647a5aae8067f0ea1976391fcc72af1945100e2a6dcb88",
522 },
523 .{
524 .input_len = 7169,
525 .hash = "a003fc7a51754a9b3c7fae0367ab3d782dccf28855a03d435f8cfe74605e781798a8b20534be1ca9eb2ae2df3fae2ea60e48c6fb0b850b1385b5de0fe460dbe9d9f9b0d8db4435da75c601156df9d047f4ede008732eb17adc05d96180f8a73548522840779e6062d643b79478a6e8dbce68927f36ebf676ffa7d72d5f68f050b119c8",
526 .keyed_hash = "ed9b1a922c046fdb3d423ae34e143b05ca1bf28b710432857bf738bcedbfa5113c9e28d72fcbfc020814ce3f5d4fc867f01c8f5b6caf305b3ea8a8ba2da3ab69fabcb438f19ff11f5378ad4484d75c478de425fb8e6ee809b54eec9bdb184315dc856617c09f5340451bf42fd3270a7b0b6566169f242e533777604c118a6358250f54",
527 .derive_key = "554b0a5efea9ef183f2f9b931b7497995d9eb26f5c5c6dad2b97d62fc5ac31d99b20652c016d88ba2a611bbd761668d5eda3e568e940faae24b0d9991c3bd25a65f770b89fdcadabcb3d1a9c1cb63e69721cacf1ae69fefdcef1e3ef41bc5312ccc17222199e47a26552c6adc460cf47a72319cb5039369d0060eaea59d6c65130f1dd",
528 },
529 .{
530 .input_len = 8192,
531 .hash = "aae792484c8efe4f19e2ca7d371d8c467ffb10748d8a5a1ae579948f718a2a635fe51a27db045a567c1ad51be5aa34c01c6651c4d9b5b5ac5d0fd58cf18dd61a47778566b797a8c67df7b1d60b97b19288d2d877bb2df417ace009dcb0241ca1257d62712b6a4043b4ff33f690d849da91ea3bf711ed583cb7b7a7da2839ba71309bbf",
532 .keyed_hash = "dc9637c8845a770b4cbf76b8daec0eebf7dc2eac11498517f08d44c8fc00d58a4834464159dcbc12a0ba0c6d6eb41bac0ed6585cabfe0aca36a375e6c5480c22afdc40785c170f5a6b8a1107dbee282318d00d915ac9ed1143ad40765ec120042ee121cd2baa36250c618adaf9e27260fda2f94dea8fb6f08c04f8f10c78292aa46102",
533 .derive_key = "ad01d7ae4ad059b0d33baa3c01319dcf8088094d0359e5fd45d6aeaa8b2d0c3d4c9e58958553513b67f84f8eac653aeeb02ae1d5672dcecf91cd9985a0e67f4501910ecba25555395427ccc7241d70dc21c190e2aadee875e5aae6bf1912837e53411dabf7a56cbf8e4fb780432b0d7fe6cec45024a0788cf5874616407757e9e6bef7",
534 },
535 .{
536 .input_len = 8193,
537 .hash = "bab6c09cb8ce8cf459261398d2e7aef35700bf488116ceb94a36d0f5f1b7bc3bb2282aa69be089359ea1154b9a9286c4a56af4de975a9aa4a5c497654914d279bea60bb6d2cf7225a2fa0ff5ef56bbe4b149f3ed15860f78b4e2ad04e158e375c1e0c0b551cd7dfc82f1b155c11b6b3ed51ec9edb30d133653bb5709d1dbd55f4e1ff6",
538 .keyed_hash = "954a2a75420c8d6547e3ba5b98d963e6fa6491addc8c023189cc519821b4a1f5f03228648fd983aef045c2fa8290934b0866b615f585149587dda2299039965328835a2b18f1d63b7e300fc76ff260b571839fe44876a4eae66cbac8c67694411ed7e09df51068a22c6e67d6d3dd2cca8ff12e3275384006c80f4db68023f24eebba57",
539 .derive_key = "af1e0346e389b17c23200270a64aa4e1ead98c61695d917de7d5b00491c9b0f12f20a01d6d622edf3de026a4db4e4526225debb93c1237934d71c7340bb5916158cbdafe9ac3225476b6ab57a12357db3abbad7a26c6e66290e44034fb08a20a8d0ec264f309994d2810c49cfba6989d7abb095897459f5425adb48aba07c5fb3c83c0",
540 },
541 .{
542 .input_len = 16384,
543 .hash = "f875d6646de28985646f34ee13be9a576fd515f76b5b0a26bb324735041ddde49d764c270176e53e97bdffa58d549073f2c660be0e81293767ed4e4929f9ad34bbb39a529334c57c4a381ffd2a6d4bfdbf1482651b172aa883cc13408fa67758a3e47503f93f87720a3177325f7823251b85275f64636a8f1d599c2e49722f42e93893",
544 .keyed_hash = "9e9fc4eb7cf081ea7c47d1807790ed211bfec56aa25bb7037784c13c4b707b0df9e601b101e4cf63a404dfe50f2e1865bb12edc8fca166579ce0c70dba5a5c0fc960ad6f3772183416a00bd29d4c6e651ea7620bb100c9449858bf14e1ddc9ecd35725581ca5b9160de04060045993d972571c3e8f71e9d0496bfa744656861b169d65",
545 .derive_key = "160e18b5878cd0df1c3af85eb25a0db5344d43a6fbd7a8ef4ed98d0714c3f7e160dc0b1f09caa35f2f417b9ef309dfe5ebd67f4c9507995a531374d099cf8ae317542e885ec6f589378864d3ea98716b3bbb65ef4ab5e0ab5bb298a501f19a41ec19af84a5e6b428ecd813b1a47ed91c9657c3fba11c406bc316768b58f6802c9e9b57",
546 },
547 .{
548 .input_len = 31744,
549 .hash = "62b6960e1a44bcc1eb1a611a8d6235b6b4b78f32e7abc4fb4c6cdcce94895c47860cc51f2b0c28a7b77304bd55fe73af663c02d3f52ea053ba43431ca5bab7bfea2f5e9d7121770d88f70ae9649ea713087d1914f7f312147e247f87eb2d4ffef0ac978bf7b6579d57d533355aa20b8b77b13fd09748728a5cc327a8ec470f4013226f",
550 .keyed_hash = "efa53b389ab67c593dba624d898d0f7353ab99e4ac9d42302ee64cbf9939a4193a7258db2d9cd32a7a3ecfce46144114b15c2fcb68a618a976bd74515d47be08b628be420b5e830fade7c080e351a076fbc38641ad80c736c8a18fe3c66ce12f95c61c2462a9770d60d0f77115bbcd3782b593016a4e728d4c06cee4505cb0c08a42ec",
551 .derive_key = "39772aef80e0ebe60596361e45b061e8f417429d529171b6764468c22928e28e9759adeb797a3fbf771b1bcea30150a020e317982bf0d6e7d14dd9f064bc11025c25f31e81bd78a921db0174f03dd481d30e93fd8e90f8b2fee209f849f2d2a52f31719a490fb0ba7aea1e09814ee912eba111a9fde9d5c274185f7bae8ba85d300a2b",
552 },
553 .{
554 .input_len = 102400,
555 .hash = "bc3e3d41a1146b069abffad3c0d44860cf664390afce4d9661f7902e7943e085e01c59dab908c04c3342b816941a26d69c2605ebee5ec5291cc55e15b76146e6745f0601156c3596cb75065a9c57f35585a52e1ac70f69131c23d611ce11ee4ab1ec2c009012d236648e77be9295dd0426f29b764d65de58eb7d01dd42248204f45f8e",
556 .keyed_hash = "1c35d1a5811083fd7119f5d5d1ba027b4d01c0c6c49fb6ff2cf75393ea5db4a7f9dbdd3e1d81dcbca3ba241bb18760f207710b751846faaeb9dff8262710999a59b2aa1aca298a032d94eacfadf1aa192418eb54808db23b56e34213266aa08499a16b354f018fc4967d05f8b9d2ad87a7278337be9693fc638a3bfdbe314574ee6fc4",
557 .derive_key = "4652cff7a3f385a6103b5c260fc1593e13c778dbe608efb092fe7ee69df6e9c6d83a3e041bc3a48df2879f4a0a3ed40e7c961c73eff740f3117a0504c2dff4786d44fb17f1549eb0ba585e40ec29bf7732f0b7e286ff8acddc4cb1e23b87ff5d824a986458dcc6a04ac83969b80637562953df51ed1a7e90a7926924d2763778be8560",
558 },
559 },
560};
561
562fn test_blake3(hasher: *Blake3, input_len: usize, expected_hex: [262]u8) void {
563 // Setup input pattern
564 var input_pattern: [251]u8 = undefined;
565 for (input_pattern) |*e, i| e.* = @truncate(u8, i);
566
567 // Write repeating input pattern to hasher
568 var input_counter = input_len;
569 while (input_counter > 0) {
570 const update_len = math.min(input_counter, input_pattern.len);
571 hasher.update(input_pattern[0..update_len]);
572 input_counter -= update_len;
573 }
574
575 // Read final hash value
576 var actual_bytes: [expected_hex.len / 2]u8 = undefined;
577 hasher.final(actual_bytes[0..]);
578 hasher.reset();
579
580 // Compare to expected value
581 var expected_bytes: [expected_hex.len / 2]u8 = undefined;
582 fmt.hexToBytes(expected_bytes[0..], expected_hex[0..]) catch unreachable;
583 testing.expectEqual(actual_bytes, expected_bytes);
584}
585
586test "BLAKE3 reference test cases" {
587 var hash = &Blake3.init();
588 var keyed_hash = &Blake3.init_keyed(reference_test.key.*);
589 var derive_key = &Blake3.init_derive_key(reference_test.context_string);
590
591 for (reference_test.cases) |t| {
592 test_blake3(hash, t.input_len, t.hash.*);
593 test_blake3(keyed_hash, t.input_len, t.keyed_hash.*);
594 test_blake3(derive_key, t.input_len, t.derive_key.*);
595 }
596}
lib/std/debug.zig+46-24
...@@ -19,8 +19,8 @@ const windows = std.os.windows;...@@ -19,8 +19,8 @@ const windows = std.os.windows;
1919
20pub const leb = @import("debug/leb128.zig");20pub const leb = @import("debug/leb128.zig");
2121
22pub const FailingAllocator = @import("debug/failing_allocator.zig").FailingAllocator;22pub const global_allocator = @compileError("Please switch to std.testing.allocator.");
23pub const failing_allocator = &FailingAllocator.init(global_allocator, 0).allocator;23pub const failing_allocator = @compileError("Please switch to std.testing.failing_allocator.");
2424
25pub const runtime_safety = switch (builtin.mode) {25pub const runtime_safety = switch (builtin.mode) {
26 .Debug, .ReleaseSafe => true,26 .Debug, .ReleaseSafe => true,
...@@ -131,6 +131,7 @@ pub fn dumpStackTraceFromBase(bp: usize, ip: usize) void {...@@ -131,6 +131,7 @@ pub fn dumpStackTraceFromBase(bp: usize, ip: usize) void {
131 const tty_config = detectTTYConfig();131 const tty_config = detectTTYConfig();
132 printSourceAtAddress(debug_info, stderr, ip, tty_config) catch return;132 printSourceAtAddress(debug_info, stderr, ip, tty_config) catch return;
133 const first_return_address = @intToPtr(*const usize, bp + @sizeOf(usize)).*;133 const first_return_address = @intToPtr(*const usize, bp + @sizeOf(usize)).*;
134 if (first_return_address == 0) return; // The whole call stack may be optimized out
134 printSourceAtAddress(debug_info, stderr, first_return_address - 1, tty_config) catch return;135 printSourceAtAddress(debug_info, stderr, first_return_address - 1, tty_config) catch return;
135 var it = StackIterator{136 var it = StackIterator{
136 .first_addr = null,137 .first_addr = null,
...@@ -325,6 +326,7 @@ pub const StackIterator = struct {...@@ -325,6 +326,7 @@ pub const StackIterator = struct {
325 }326 }
326327
327 const return_address = @intToPtr(*const usize, self.fp - fp_adjust_factor + @sizeOf(usize)).*;328 const return_address = @intToPtr(*const usize, self.fp - fp_adjust_factor + @sizeOf(usize)).*;
329 if (return_address == 0) return null;
328 return return_address;330 return return_address;
329 }331 }
330};332};
...@@ -470,7 +472,7 @@ fn printSourceAtAddressWindows(...@@ -470,7 +472,7 @@ fn printSourceAtAddressWindows(
470 line_index += @sizeOf(pdb.LineNumberEntry);472 line_index += @sizeOf(pdb.LineNumberEntry);
471473
472 const vaddr_start = frag_vaddr_start + line_num_entry.Offset;474 const vaddr_start = frag_vaddr_start + line_num_entry.Offset;
473 if (relative_address <= vaddr_start) {475 if (relative_address < vaddr_start) {
474 break;476 break;
475 }477 }
476 }478 }
...@@ -944,8 +946,8 @@ fn readSparseBitVector(stream: var, allocator: *mem.Allocator) ![]usize {...@@ -944,8 +946,8 @@ fn readSparseBitVector(stream: var, allocator: *mem.Allocator) ![]usize {
944fn findDwarfSectionFromElf(elf_file: *elf.Elf, name: []const u8) !?DwarfInfo.Section {946fn findDwarfSectionFromElf(elf_file: *elf.Elf, name: []const u8) !?DwarfInfo.Section {
945 const elf_header = (try elf_file.findSection(name)) orelse return null;947 const elf_header = (try elf_file.findSection(name)) orelse return null;
946 return DwarfInfo.Section{948 return DwarfInfo.Section{
947 .offset = elf_header.offset,949 .offset = elf_header.sh_offset,
948 .size = elf_header.size,950 .size = elf_header.sh_size,
949 };951 };
950}952}
951953
...@@ -985,12 +987,12 @@ pub fn openElfDebugInfo(...@@ -985,12 +987,12 @@ pub fn openElfDebugInfo(
985987
986 var di = DwarfInfo{988 var di = DwarfInfo{
987 .endian = efile.endian,989 .endian = efile.endian,
988 .debug_info = (data[@intCast(usize, debug_info.offset)..@intCast(usize, debug_info.offset + debug_info.size)]),990 .debug_info = (data[@intCast(usize, debug_info.sh_offset)..@intCast(usize, debug_info.sh_offset + debug_info.sh_size)]),
989 .debug_abbrev = (data[@intCast(usize, debug_abbrev.offset)..@intCast(usize, debug_abbrev.offset + debug_abbrev.size)]),991 .debug_abbrev = (data[@intCast(usize, debug_abbrev.sh_offset)..@intCast(usize, debug_abbrev.sh_offset + debug_abbrev.sh_size)]),
990 .debug_str = (data[@intCast(usize, debug_str.offset)..@intCast(usize, debug_str.offset + debug_str.size)]),992 .debug_str = (data[@intCast(usize, debug_str.sh_offset)..@intCast(usize, debug_str.sh_offset + debug_str.sh_size)]),
991 .debug_line = (data[@intCast(usize, debug_line.offset)..@intCast(usize, debug_line.offset + debug_line.size)]),993 .debug_line = (data[@intCast(usize, debug_line.sh_offset)..@intCast(usize, debug_line.sh_offset + debug_line.sh_size)]),
992 .debug_ranges = if (opt_debug_ranges) |debug_ranges|994 .debug_ranges = if (opt_debug_ranges) |debug_ranges|
993 data[@intCast(usize, debug_ranges.offset)..@intCast(usize, debug_ranges.offset + debug_ranges.size)]995 data[@intCast(usize, debug_ranges.sh_offset)..@intCast(usize, debug_ranges.sh_offset + debug_ranges.sh_size)]
994 else996 else
995 null,997 null,
996 };998 };
...@@ -1390,8 +1392,12 @@ pub const DwarfInfo = struct {...@@ -1390,8 +1392,12 @@ pub const DwarfInfo = struct {
13901392
1391 // All the addresses in the list are relative to the value1393 // All the addresses in the list are relative to the value
1392 // specified by DW_AT_low_pc or to some other value encoded1394 // specified by DW_AT_low_pc or to some other value encoded
1393 // in the list itself1395 // in the list itself.
1394 var base_address = try compile_unit.die.getAttrAddr(DW.AT_low_pc);1396 // If no starting value is specified use zero.
1397 var base_address = compile_unit.die.getAttrAddr(DW.AT_low_pc) catch |err| switch (err) {
1398 error.MissingDebugInfo => 0,
1399 else => return err,
1400 };
13951401
1396 try s.seekable_stream.seekTo(ranges_offset);1402 try s.seekable_stream.seekTo(ranges_offset);
13971403
...@@ -1410,8 +1416,6 @@ pub const DwarfInfo = struct {...@@ -1410,8 +1416,6 @@ pub const DwarfInfo = struct {
1410 return compile_unit;1416 return compile_unit;
1411 }1417 }
1412 }1418 }
1413
1414 return error.InvalidDebugInfo;
1415 } else |err| {1419 } else |err| {
1416 if (err != error.MissingDebugInfo) return err;1420 if (err != error.MissingDebugInfo) return err;
1417 continue;1421 continue;
...@@ -2192,11 +2196,6 @@ fn readInitialLength(comptime E: type, in_stream: *io.InStream(E), is_64: *bool)...@@ -2192,11 +2196,6 @@ fn readInitialLength(comptime E: type, in_stream: *io.InStream(E), is_64: *bool)
2192 }2196 }
2193}2197}
21942198
2195/// This should only be used in temporary test programs.
2196pub const global_allocator = &global_fixed_allocator.allocator;
2197var global_fixed_allocator = std.heap.ThreadSafeFixedBufferAllocator.init(global_allocator_mem[0..]);
2198var global_allocator_mem: [100 * 1024]u8 = undefined;
2199
2200/// TODO multithreaded awareness2199/// TODO multithreaded awareness
2201var debug_info_allocator: ?*mem.Allocator = null;2200var debug_info_allocator: ?*mem.Allocator = null;
2202var debug_info_arena_allocator: std.heap.ArenaAllocator = undefined;2201var debug_info_arena_allocator: std.heap.ArenaAllocator = undefined;
...@@ -2307,16 +2306,39 @@ fn handleSegfaultLinux(sig: i32, info: *const os.siginfo_t, ctx_ptr: *const c_vo...@@ -2307,16 +2306,39 @@ fn handleSegfaultLinux(sig: i32, info: *const os.siginfo_t, ctx_ptr: *const c_vo
2307}2306}
23082307
2309fn handleSegfaultWindows(info: *windows.EXCEPTION_POINTERS) callconv(.Stdcall) c_long {2308fn handleSegfaultWindows(info: *windows.EXCEPTION_POINTERS) callconv(.Stdcall) c_long {
2310 const exception_address = @ptrToInt(info.ExceptionRecord.ExceptionAddress);
2311 switch (info.ExceptionRecord.ExceptionCode) {2309 switch (info.ExceptionRecord.ExceptionCode) {
2312 windows.EXCEPTION_DATATYPE_MISALIGNMENT => panicExtra(null, exception_address, "Unaligned Memory Access", .{}),2310 windows.EXCEPTION_DATATYPE_MISALIGNMENT => handleSegfaultWindowsExtra(info, 0, "Unaligned Memory Access"),
2313 windows.EXCEPTION_ACCESS_VIOLATION => panicExtra(null, exception_address, "Segmentation fault at address 0x{x}", .{info.ExceptionRecord.ExceptionInformation[1]}),2311 windows.EXCEPTION_ACCESS_VIOLATION => handleSegfaultWindowsExtra(info, 1, null),
2314 windows.EXCEPTION_ILLEGAL_INSTRUCTION => panicExtra(null, exception_address, "Illegal Instruction", .{}),2312 windows.EXCEPTION_ILLEGAL_INSTRUCTION => handleSegfaultWindowsExtra(info, 2, null),
2315 windows.EXCEPTION_STACK_OVERFLOW => panicExtra(null, exception_address, "Stack Overflow", .{}),2313 windows.EXCEPTION_STACK_OVERFLOW => handleSegfaultWindowsExtra(info, 0, "Stack Overflow"),
2316 else => return windows.EXCEPTION_CONTINUE_SEARCH,2314 else => return windows.EXCEPTION_CONTINUE_SEARCH,
2317 }2315 }
2318}2316}
23192317
2318// zig won't let me use an anon enum here https://github.com/ziglang/zig/issues/3707
2319fn handleSegfaultWindowsExtra(info: *windows.EXCEPTION_POINTERS, comptime msg: u8, comptime format: ?[]const u8) noreturn {
2320 const exception_address = @ptrToInt(info.ExceptionRecord.ExceptionAddress);
2321 if (@hasDecl(windows, "CONTEXT")) {
2322 const regs = info.ContextRecord.getRegs();
2323 switch (msg) {
2324 0 => std.debug.warn("{}\n", .{format.?}),
2325 1 => std.debug.warn("Segmentation fault at address 0x{x}\n", .{info.ExceptionRecord.ExceptionInformation[1]}),
2326 2 => std.debug.warn("Illegal instruction at address 0x{x}\n", .{regs.ip}),
2327 else => unreachable,
2328 }
2329
2330 dumpStackTraceFromBase(regs.bp, regs.ip);
2331 os.abort();
2332 } else {
2333 switch (msg) {
2334 0 => panicExtra(null, exception_address, format.?, .{}),
2335 1 => panicExtra(null, exception_address, "Segmentation fault at address 0x{x}", .{info.ExceptionRecord.ExceptionInformation[1]}),
2336 2 => panicExtra(null, exception_address, "Illegal Instruction", .{}),
2337 else => unreachable,
2338 }
2339 }
2340}
2341
2320pub fn dumpStackPointerAddr(prefix: []const u8) void {2342pub fn dumpStackPointerAddr(prefix: []const u8) void {
2321 const sp = asm (""2343 const sp = asm (""
2322 : [argc] "={rsp}" (-> usize)2344 : [argc] "={rsp}" (-> usize)
lib/std/debug/failing_allocator.zig deleted-81
...@@ -1,81 +0,0 @@
1const std = @import("../std.zig");
2const mem = std.mem;
3
4/// Allocator that fails after N allocations, useful for making sure out of
5/// memory conditions are handled correctly.
6///
7/// To use this, first initialize it and get an allocator with
8///
9/// `const failing_allocator = &FailingAllocator.init(<allocator>,
10/// <fail_index>).allocator;`
11///
12/// Then use `failing_allocator` anywhere you would have used a
13/// different allocator.
14pub const FailingAllocator = struct {
15 allocator: mem.Allocator,
16 index: usize,
17 fail_index: usize,
18 internal_allocator: *mem.Allocator,
19 allocated_bytes: usize,
20 freed_bytes: usize,
21 allocations: usize,
22 deallocations: usize,
23
24 /// `fail_index` is the number of successful allocations you can
25 /// expect from this allocator. The next allocation will fail.
26 /// For example, if this is called with `fail_index` equal to 2,
27 /// the following test will pass:
28 ///
29 /// var a = try failing_alloc.create(i32);
30 /// var b = try failing_alloc.create(i32);
31 /// testing.expectError(error.OutOfMemory, failing_alloc.create(i32));
32 pub fn init(allocator: *mem.Allocator, fail_index: usize) FailingAllocator {
33 return FailingAllocator{
34 .internal_allocator = allocator,
35 .fail_index = fail_index,
36 .index = 0,
37 .allocated_bytes = 0,
38 .freed_bytes = 0,
39 .allocations = 0,
40 .deallocations = 0,
41 .allocator = mem.Allocator{
42 .reallocFn = realloc,
43 .shrinkFn = shrink,
44 },
45 };
46 }
47
48 fn realloc(allocator: *mem.Allocator, old_mem: []u8, old_align: u29, new_size: usize, new_align: u29) ![]u8 {
49 const self = @fieldParentPtr(FailingAllocator, "allocator", allocator);
50 if (self.index == self.fail_index) {
51 return error.OutOfMemory;
52 }
53 const result = try self.internal_allocator.reallocFn(
54 self.internal_allocator,
55 old_mem,
56 old_align,
57 new_size,
58 new_align,
59 );
60 if (new_size < old_mem.len) {
61 self.freed_bytes += old_mem.len - new_size;
62 if (new_size == 0)
63 self.deallocations += 1;
64 } else if (new_size > old_mem.len) {
65 self.allocated_bytes += new_size - old_mem.len;
66 if (old_mem.len == 0)
67 self.allocations += 1;
68 }
69 self.index += 1;
70 return result;
71 }
72
73 fn shrink(allocator: *mem.Allocator, old_mem: []u8, old_align: u29, new_size: usize, new_align: u29) []u8 {
74 const self = @fieldParentPtr(FailingAllocator, "allocator", allocator);
75 const r = self.internal_allocator.shrinkFn(self.internal_allocator, old_mem, old_align, new_size, new_align);
76 self.freed_bytes += old_mem.len - r.len;
77 if (new_size == 0)
78 self.deallocations += 1;
79 return r;
80 }
81};
lib/std/elf.zig+96-59
...@@ -330,19 +330,8 @@ pub const ET = extern enum(u16) {...@@ -330,19 +330,8 @@ pub const ET = extern enum(u16) {
330 pub const HIPROC = 0xffff;330 pub const HIPROC = 0xffff;
331};331};
332332
333/// TODO delete this in favor of Elf64_Shdr333pub const SectionHeader = Elf64_Shdr;
334pub const SectionHeader = struct {334pub const ProgramHeader = Elf64_Phdr;
335 name: u32,
336 sh_type: u32,
337 flags: u64,
338 addr: u64,
339 offset: u64,
340 size: u64,
341 link: u32,
342 info: u32,
343 addr_align: u64,
344 ent_size: u64,
345};
346335
347pub const Elf = struct {336pub const Elf = struct {
348 seekable_stream: *io.SeekableStream(anyerror, anyerror),337 seekable_stream: *io.SeekableStream(anyerror, anyerror),
...@@ -357,6 +346,7 @@ pub const Elf = struct {...@@ -357,6 +346,7 @@ pub const Elf = struct {
357 string_section_index: usize,346 string_section_index: usize,
358 string_section: *SectionHeader,347 string_section: *SectionHeader,
359 section_headers: []SectionHeader,348 section_headers: []SectionHeader,
349 program_headers: []ProgramHeader,
360 allocator: *mem.Allocator,350 allocator: *mem.Allocator,
361351
362 /// Call close when done.352 /// Call close when done.
...@@ -421,14 +411,24 @@ pub const Elf = struct {...@@ -421,14 +411,24 @@ pub const Elf = struct {
421 try seekable_stream.seekBy(4);411 try seekable_stream.seekBy(4);
422412
423 const header_size = try in.readInt(u16, elf.endian);413 const header_size = try in.readInt(u16, elf.endian);
424 if ((elf.is_64 and header_size != 64) or (!elf.is_64 and header_size != 52)) {414 if ((elf.is_64 and header_size != @sizeOf(Elf64_Ehdr)) or (!elf.is_64 and header_size != @sizeOf(Elf32_Ehdr))) {
425 return error.InvalidFormat;415 return error.InvalidFormat;
426 }416 }
427417
428 const ph_entry_size = try in.readInt(u16, elf.endian);418 const ph_entry_size = try in.readInt(u16, elf.endian);
429 const ph_entry_count = try in.readInt(u16, elf.endian);419 const ph_entry_count = try in.readInt(u16, elf.endian);
420
421 if ((elf.is_64 and ph_entry_size != @sizeOf(Elf64_Phdr)) or (!elf.is_64 and ph_entry_size != @sizeOf(Elf32_Phdr))) {
422 return error.InvalidFormat;
423 }
424
430 const sh_entry_size = try in.readInt(u16, elf.endian);425 const sh_entry_size = try in.readInt(u16, elf.endian);
431 const sh_entry_count = try in.readInt(u16, elf.endian);426 const sh_entry_count = try in.readInt(u16, elf.endian);
427
428 if ((elf.is_64 and sh_entry_size != @sizeOf(Elf64_Shdr)) or (!elf.is_64 and sh_entry_size != @sizeOf(Elf32_Shdr))) {
429 return error.InvalidFormat;
430 }
431
432 elf.string_section_index = @as(usize, try in.readInt(u16, elf.endian));432 elf.string_section_index = @as(usize, try in.readInt(u16, elf.endian));
433433
434 if (elf.string_section_index >= sh_entry_count) return error.InvalidFormat;434 if (elf.string_section_index >= sh_entry_count) return error.InvalidFormat;
...@@ -443,47 +443,72 @@ pub const Elf = struct {...@@ -443,47 +443,72 @@ pub const Elf = struct {
443 return error.InvalidFormat;443 return error.InvalidFormat;
444 }444 }
445445
446 try seekable_stream.seekTo(elf.program_header_offset);
447
448 elf.program_headers = try elf.allocator.alloc(ProgramHeader, ph_entry_count);
449 errdefer elf.allocator.free(elf.program_headers);
450
451 if (elf.is_64) {
452 for (elf.program_headers) |*elf_program| {
453 elf_program.p_type = try in.readInt(Elf64_Word, elf.endian);
454 elf_program.p_flags = try in.readInt(Elf64_Word, elf.endian);
455 elf_program.p_offset = try in.readInt(Elf64_Off, elf.endian);
456 elf_program.p_vaddr = try in.readInt(Elf64_Addr, elf.endian);
457 elf_program.p_paddr = try in.readInt(Elf64_Addr, elf.endian);
458 elf_program.p_filesz = try in.readInt(Elf64_Xword, elf.endian);
459 elf_program.p_memsz = try in.readInt(Elf64_Xword, elf.endian);
460 elf_program.p_align = try in.readInt(Elf64_Xword, elf.endian);
461 }
462 } else {
463 for (elf.program_headers) |*elf_program| {
464 elf_program.p_type = @as(Elf64_Word, try in.readInt(Elf32_Word, elf.endian));
465 elf_program.p_offset = @as(Elf64_Off, try in.readInt(Elf32_Off, elf.endian));
466 elf_program.p_vaddr = @as(Elf64_Addr, try in.readInt(Elf32_Addr, elf.endian));
467 elf_program.p_paddr = @as(Elf64_Addr, try in.readInt(Elf32_Addr, elf.endian));
468 elf_program.p_filesz = @as(Elf64_Word, try in.readInt(Elf32_Word, elf.endian));
469 elf_program.p_memsz = @as(Elf64_Word, try in.readInt(Elf32_Word, elf.endian));
470 elf_program.p_flags = @as(Elf64_Word, try in.readInt(Elf32_Word, elf.endian));
471 elf_program.p_align = @as(Elf64_Word, try in.readInt(Elf32_Word, elf.endian));
472 }
473 }
474
446 try seekable_stream.seekTo(elf.section_header_offset);475 try seekable_stream.seekTo(elf.section_header_offset);
447476
448 elf.section_headers = try elf.allocator.alloc(SectionHeader, sh_entry_count);477 elf.section_headers = try elf.allocator.alloc(SectionHeader, sh_entry_count);
449 errdefer elf.allocator.free(elf.section_headers);478 errdefer elf.allocator.free(elf.section_headers);
450479
451 if (elf.is_64) {480 if (elf.is_64) {
452 if (sh_entry_size != 64) return error.InvalidFormat;
453
454 for (elf.section_headers) |*elf_section| {481 for (elf.section_headers) |*elf_section| {
455 elf_section.name = try in.readInt(u32, elf.endian);482 elf_section.sh_name = try in.readInt(u32, elf.endian);
456 elf_section.sh_type = try in.readInt(u32, elf.endian);483 elf_section.sh_type = try in.readInt(u32, elf.endian);
457 elf_section.flags = try in.readInt(u64, elf.endian);484 elf_section.sh_flags = try in.readInt(u64, elf.endian);
458 elf_section.addr = try in.readInt(u64, elf.endian);485 elf_section.sh_addr = try in.readInt(u64, elf.endian);
459 elf_section.offset = try in.readInt(u64, elf.endian);486 elf_section.sh_offset = try in.readInt(u64, elf.endian);
460 elf_section.size = try in.readInt(u64, elf.endian);487 elf_section.sh_size = try in.readInt(u64, elf.endian);
461 elf_section.link = try in.readInt(u32, elf.endian);488 elf_section.sh_link = try in.readInt(u32, elf.endian);
462 elf_section.info = try in.readInt(u32, elf.endian);489 elf_section.sh_info = try in.readInt(u32, elf.endian);
463 elf_section.addr_align = try in.readInt(u64, elf.endian);490 elf_section.sh_addralign = try in.readInt(u64, elf.endian);
464 elf_section.ent_size = try in.readInt(u64, elf.endian);491 elf_section.sh_entsize = try in.readInt(u64, elf.endian);
465 }492 }
466 } else {493 } else {
467 if (sh_entry_size != 40) return error.InvalidFormat;
468
469 for (elf.section_headers) |*elf_section| {494 for (elf.section_headers) |*elf_section| {
470 // TODO (multiple occurrences) allow implicit cast from %u32 -> %u64 ?495 // TODO (multiple occurrences) allow implicit cast from %u32 -> %u64 ?
471 elf_section.name = try in.readInt(u32, elf.endian);496 elf_section.sh_name = try in.readInt(u32, elf.endian);
472 elf_section.sh_type = try in.readInt(u32, elf.endian);497 elf_section.sh_type = try in.readInt(u32, elf.endian);
473 elf_section.flags = @as(u64, try in.readInt(u32, elf.endian));498 elf_section.sh_flags = @as(u64, try in.readInt(u32, elf.endian));
474 elf_section.addr = @as(u64, try in.readInt(u32, elf.endian));499 elf_section.sh_addr = @as(u64, try in.readInt(u32, elf.endian));
475 elf_section.offset = @as(u64, try in.readInt(u32, elf.endian));500 elf_section.sh_offset = @as(u64, try in.readInt(u32, elf.endian));
476 elf_section.size = @as(u64, try in.readInt(u32, elf.endian));501 elf_section.sh_size = @as(u64, try in.readInt(u32, elf.endian));
477 elf_section.link = try in.readInt(u32, elf.endian);502 elf_section.sh_link = try in.readInt(u32, elf.endian);
478 elf_section.info = try in.readInt(u32, elf.endian);503 elf_section.sh_info = try in.readInt(u32, elf.endian);
479 elf_section.addr_align = @as(u64, try in.readInt(u32, elf.endian));504 elf_section.sh_addralign = @as(u64, try in.readInt(u32, elf.endian));
480 elf_section.ent_size = @as(u64, try in.readInt(u32, elf.endian));505 elf_section.sh_entsize = @as(u64, try in.readInt(u32, elf.endian));
481 }506 }
482 }507 }
483508
484 for (elf.section_headers) |*elf_section| {509 for (elf.section_headers) |*elf_section| {
485 if (elf_section.sh_type != SHT_NOBITS) {510 if (elf_section.sh_type != SHT_NOBITS) {
486 const file_end_offset = try math.add(u64, elf_section.offset, elf_section.size);511 const file_end_offset = try math.add(u64, elf_section.sh_offset, elf_section.sh_size);
487 if (stream_end < file_end_offset) return error.InvalidFormat;512 if (stream_end < file_end_offset) return error.InvalidFormat;
488 }513 }
489 }514 }
...@@ -499,13 +524,14 @@ pub const Elf = struct {...@@ -499,13 +524,14 @@ pub const Elf = struct {
499524
500 pub fn close(elf: *Elf) void {525 pub fn close(elf: *Elf) void {
501 elf.allocator.free(elf.section_headers);526 elf.allocator.free(elf.section_headers);
527 elf.allocator.free(elf.program_headers);
502 }528 }
503529
504 pub fn findSection(elf: *Elf, name: []const u8) !?*SectionHeader {530 pub fn findSection(elf: *Elf, name: []const u8) !?*SectionHeader {
505 section_loop: for (elf.section_headers) |*elf_section| {531 section_loop: for (elf.section_headers) |*elf_section| {
506 if (elf_section.sh_type == SHT_NULL) continue;532 if (elf_section.sh_type == SHT_NULL) continue;
507533
508 const name_offset = elf.string_section.offset + elf_section.name;534 const name_offset = elf.string_section.sh_offset + elf_section.sh_name;
509 try elf.seekable_stream.seekTo(name_offset);535 try elf.seekable_stream.seekTo(name_offset);
510536
511 for (name) |expected_c| {537 for (name) |expected_c| {
...@@ -523,7 +549,7 @@ pub const Elf = struct {...@@ -523,7 +549,7 @@ pub const Elf = struct {
523 }549 }
524550
525 pub fn seekToSection(elf: *Elf, elf_section: *SectionHeader) !void {551 pub fn seekToSection(elf: *Elf, elf_section: *SectionHeader) !void {
526 try elf.seekable_stream.seekTo(elf_section.offset);552 try elf.seekable_stream.seekTo(elf_section.sh_offset);
527 }553 }
528};554};
529555
...@@ -578,6 +604,26 @@ pub const Elf64_Ehdr = extern struct {...@@ -578,6 +604,26 @@ pub const Elf64_Ehdr = extern struct {
578 e_shnum: Elf64_Half,604 e_shnum: Elf64_Half,
579 e_shstrndx: Elf64_Half,605 e_shstrndx: Elf64_Half,
580};606};
607pub const Elf32_Phdr = extern struct {
608 p_type: Elf32_Word,
609 p_offset: Elf32_Off,
610 p_vaddr: Elf32_Addr,
611 p_paddr: Elf32_Addr,
612 p_filesz: Elf32_Word,
613 p_memsz: Elf32_Word,
614 p_flags: Elf32_Word,
615 p_align: Elf32_Word,
616};
617pub const Elf64_Phdr = extern struct {
618 p_type: Elf64_Word,
619 p_flags: Elf64_Word,
620 p_offset: Elf64_Off,
621 p_vaddr: Elf64_Addr,
622 p_paddr: Elf64_Addr,
623 p_filesz: Elf64_Xword,
624 p_memsz: Elf64_Xword,
625 p_align: Elf64_Xword,
626};
581pub const Elf32_Shdr = extern struct {627pub const Elf32_Shdr = extern struct {
582 sh_name: Elf32_Word,628 sh_name: Elf32_Word,
583 sh_type: Elf32_Word,629 sh_type: Elf32_Word,
...@@ -655,26 +701,6 @@ pub const Elf64_Rela = extern struct {...@@ -655,26 +701,6 @@ pub const Elf64_Rela = extern struct {
655 r_info: Elf64_Xword,701 r_info: Elf64_Xword,
656 r_addend: Elf64_Sxword,702 r_addend: Elf64_Sxword,
657};703};
658pub const Elf32_Phdr = extern struct {
659 p_type: Elf32_Word,
660 p_offset: Elf32_Off,
661 p_vaddr: Elf32_Addr,
662 p_paddr: Elf32_Addr,
663 p_filesz: Elf32_Word,
664 p_memsz: Elf32_Word,
665 p_flags: Elf32_Word,
666 p_align: Elf32_Word,
667};
668pub const Elf64_Phdr = extern struct {
669 p_type: Elf64_Word,
670 p_flags: Elf64_Word,
671 p_offset: Elf64_Off,
672 p_vaddr: Elf64_Addr,
673 p_paddr: Elf64_Addr,
674 p_filesz: Elf64_Xword,
675 p_memsz: Elf64_Xword,
676 p_align: Elf64_Xword,
677};
678pub const Elf32_Dyn = extern struct {704pub const Elf32_Dyn = extern struct {
679 d_tag: Elf32_Sword,705 d_tag: Elf32_Sword,
680 d_un: extern union {706 d_un: extern union {
...@@ -833,6 +859,17 @@ pub const Elf_MIPS_ABIFlags_v0 = extern struct {...@@ -833,6 +859,17 @@ pub const Elf_MIPS_ABIFlags_v0 = extern struct {
833 flags2: Elf32_Word,859 flags2: Elf32_Word,
834};860};
835861
862comptime {
863 debug.assert(@sizeOf(Elf32_Ehdr) == 52);
864 debug.assert(@sizeOf(Elf64_Ehdr) == 64);
865
866 debug.assert(@sizeOf(Elf32_Phdr) == 32);
867 debug.assert(@sizeOf(Elf64_Phdr) == 56);
868
869 debug.assert(@sizeOf(Elf32_Shdr) == 40);
870 debug.assert(@sizeOf(Elf64_Shdr) == 64);
871}
872
836pub const Auxv = switch (@sizeOf(usize)) {873pub const Auxv = switch (@sizeOf(usize)) {
837 4 => Elf32_auxv_t,874 4 => Elf32_auxv_t,
838 8 => Elf64_auxv_t,875 8 => Elf64_auxv_t,
lib/std/event/fs.zig+10-10
...@@ -160,12 +160,12 @@ pub fn pwriteWindows(fd: fd_t, data: []const u8, offset: u64) os.WindowsWriteErr...@@ -160,12 +160,12 @@ pub fn pwriteWindows(fd: fd_t, data: []const u8, offset: u64) os.WindowsWriteErr
160 var bytes_transferred: windows.DWORD = undefined;160 var bytes_transferred: windows.DWORD = undefined;
161 if (windows.kernel32.GetOverlappedResult(fd, &resume_node.base.overlapped, &bytes_transferred, windows.FALSE) == 0) {161 if (windows.kernel32.GetOverlappedResult(fd, &resume_node.base.overlapped, &bytes_transferred, windows.FALSE) == 0) {
162 switch (windows.kernel32.GetLastError()) {162 switch (windows.kernel32.GetLastError()) {
163 windows.ERROR.IO_PENDING => unreachable,163 .IO_PENDING => unreachable,
164 windows.ERROR.INVALID_USER_BUFFER => return error.SystemResources,164 .INVALID_USER_BUFFER => return error.SystemResources,
165 windows.ERROR.NOT_ENOUGH_MEMORY => return error.SystemResources,165 .NOT_ENOUGH_MEMORY => return error.SystemResources,
166 windows.ERROR.OPERATION_ABORTED => return error.OperationAborted,166 .OPERATION_ABORTED => return error.OperationAborted,
167 windows.ERROR.NOT_ENOUGH_QUOTA => return error.SystemResources,167 .NOT_ENOUGH_QUOTA => return error.SystemResources,
168 windows.ERROR.BROKEN_PIPE => return error.BrokenPipe,168 .BROKEN_PIPE => return error.BrokenPipe,
169 else => |err| return windows.unexpectedError(err),169 else => |err| return windows.unexpectedError(err),
170 }170 }
171 }171 }
...@@ -320,10 +320,10 @@ pub fn preadWindows(fd: fd_t, data: []u8, offset: u64) !usize {...@@ -320,10 +320,10 @@ pub fn preadWindows(fd: fd_t, data: []u8, offset: u64) !usize {
320 var bytes_transferred: windows.DWORD = undefined;320 var bytes_transferred: windows.DWORD = undefined;
321 if (windows.kernel32.GetOverlappedResult(fd, &resume_node.base.overlapped, &bytes_transferred, windows.FALSE) == 0) {321 if (windows.kernel32.GetOverlappedResult(fd, &resume_node.base.overlapped, &bytes_transferred, windows.FALSE) == 0) {
322 switch (windows.kernel32.GetLastError()) {322 switch (windows.kernel32.GetLastError()) {
323 windows.ERROR.IO_PENDING => unreachable,323 .IO_PENDING => unreachable,
324 windows.ERROR.OPERATION_ABORTED => return error.OperationAborted,324 .OPERATION_ABORTED => return error.OperationAborted,
325 windows.ERROR.BROKEN_PIPE => return error.BrokenPipe,325 .BROKEN_PIPE => return error.BrokenPipe,
326 windows.ERROR.HANDLE_EOF => return @as(usize, bytes_transferred),326 .HANDLE_EOF => return @as(usize, bytes_transferred),
327 else => |err| return windows.unexpectedError(err),327 else => |err| return windows.unexpectedError(err),
328 }328 }
329 }329 }
lib/std/fifo.zig+2-2
...@@ -347,7 +347,7 @@ pub fn LinearFifo(...@@ -347,7 +347,7 @@ pub fn LinearFifo(
347}347}
348348
349test "LinearFifo(u8, .Dynamic)" {349test "LinearFifo(u8, .Dynamic)" {
350 var fifo = LinearFifo(u8, .Dynamic).init(debug.global_allocator);350 var fifo = LinearFifo(u8, .Dynamic).init(testing.allocator);
351 defer fifo.deinit();351 defer fifo.deinit();
352352
353 try fifo.write("HELLO");353 try fifo.write("HELLO");
...@@ -422,7 +422,7 @@ test "LinearFifo" {...@@ -422,7 +422,7 @@ test "LinearFifo" {
422 var fifo = switch (bt) {422 var fifo = switch (bt) {
423 .Static => FifoType.init(),423 .Static => FifoType.init(),
424 .Slice => FifoType.init(buf[0..]),424 .Slice => FifoType.init(buf[0..]),
425 .Dynamic => FifoType.init(debug.global_allocator),425 .Dynamic => FifoType.init(testing.allocator),
426 };426 };
427 defer fifo.deinit();427 defer fifo.deinit();
428428
lib/std/fmt.zig+51-36
...@@ -21,17 +21,6 @@ pub const FormatOptions = struct {...@@ -21,17 +21,6 @@ pub const FormatOptions = struct {
21 fill: u8 = ' ',21 fill: u8 = ' ',
22};22};
2323
24fn nextArg(comptime used_pos_args: *u32, comptime maybe_pos_arg: ?comptime_int, comptime next_arg: *comptime_int) comptime_int {
25 if (maybe_pos_arg) |pos_arg| {
26 used_pos_args.* |= 1 << pos_arg;
27 return pos_arg;
28 } else {
29 const arg = next_arg.*;
30 next_arg.* += 1;
31 return arg;
32 }
33}
34
35fn peekIsAlign(comptime fmt: []const u8) bool {24fn peekIsAlign(comptime fmt: []const u8) bool {
36 // Should only be called during a state transition to the format segment.25 // Should only be called during a state transition to the format segment.
37 comptime assert(fmt[0] == ':');26 comptime assert(fmt[0] == ':');
...@@ -113,12 +102,36 @@ pub fn format(...@@ -113,12 +102,36 @@ pub fn format(
113102
114 comptime var start_index = 0;103 comptime var start_index = 0;
115 comptime var state = State.Start;104 comptime var state = State.Start;
116 comptime var next_arg = 0;
117 comptime var maybe_pos_arg: ?comptime_int = null;105 comptime var maybe_pos_arg: ?comptime_int = null;
118 comptime var used_pos_args: ArgSetType = 0;
119 comptime var specifier_start = 0;106 comptime var specifier_start = 0;
120 comptime var specifier_end = 0;107 comptime var specifier_end = 0;
121 comptime var options = FormatOptions{};108 comptime var options = FormatOptions{};
109 comptime var arg_state: struct {
110 next_arg: usize = 0,
111 used_args: ArgSetType = 0,
112 args_len: usize = args.len,
113
114 fn hasUnusedArgs(comptime self: *@This()) bool {
115 return (@popCount(ArgSetType, self.used_args) != self.args_len);
116 }
117
118 fn nextArg(comptime self: *@This(), comptime pos_arg: ?comptime_int) comptime_int {
119 const next_idx = pos_arg orelse blk: {
120 const arg = self.next_arg;
121 self.next_arg += 1;
122 break :blk arg;
123 };
124
125 if (next_idx >= self.args_len) {
126 @compileError("Too few arguments");
127 }
128
129 // Mark this argument as used
130 self.used_args |= 1 << next_idx;
131
132 return next_idx;
133 }
134 } = .{};
122135
123 inline for (fmt) |c, i| {136 inline for (fmt) |c, i| {
124 switch (state) {137 switch (state) {
...@@ -166,11 +179,7 @@ pub fn format(...@@ -166,11 +179,7 @@ pub fn format(
166 }179 }
167 },180 },
168 '}' => {181 '}' => {
169 const arg_to_print = comptime nextArg(&used_pos_args, maybe_pos_arg, &next_arg);182 const arg_to_print = comptime arg_state.nextArg(maybe_pos_arg);
170
171 if (arg_to_print >= args.len) {
172 @compileError("Too few arguments");
173 }
174183
175 try formatType(184 try formatType(
176 args[arg_to_print],185 args[arg_to_print],
...@@ -203,7 +212,7 @@ pub fn format(...@@ -203,7 +212,7 @@ pub fn format(
203 state = if (comptime peekIsAlign(fmt[i..])) State.FormatFillAndAlign else State.FormatWidth;212 state = if (comptime peekIsAlign(fmt[i..])) State.FormatFillAndAlign else State.FormatWidth;
204 },213 },
205 '}' => {214 '}' => {
206 const arg_to_print = comptime nextArg(&used_pos_args, maybe_pos_arg, &next_arg);215 const arg_to_print = comptime arg_state.nextArg(maybe_pos_arg);
207216
208 try formatType(217 try formatType(
209 args[arg_to_print],218 args[arg_to_print],
...@@ -250,7 +259,7 @@ pub fn format(...@@ -250,7 +259,7 @@ pub fn format(
250 state = .FormatPrecision;259 state = .FormatPrecision;
251 },260 },
252 '}' => {261 '}' => {
253 const arg_to_print = comptime nextArg(&used_pos_args, maybe_pos_arg, &next_arg);262 const arg_to_print = comptime arg_state.nextArg(maybe_pos_arg);
254263
255 try formatType(264 try formatType(
256 args[arg_to_print],265 args[arg_to_print],
...@@ -278,7 +287,7 @@ pub fn format(...@@ -278,7 +287,7 @@ pub fn format(
278 options.precision.? += c - '0';287 options.precision.? += c - '0';
279 },288 },
280 '}' => {289 '}' => {
281 const arg_to_print = comptime nextArg(&used_pos_args, maybe_pos_arg, &next_arg);290 const arg_to_print = comptime arg_state.nextArg(maybe_pos_arg);
282291
283 try formatType(292 try formatType(
284 args[arg_to_print],293 args[arg_to_print],
...@@ -299,13 +308,7 @@ pub fn format(...@@ -299,13 +308,7 @@ pub fn format(
299 }308 }
300 }309 }
301 comptime {310 comptime {
302 // All arguments must have been printed but we allow mixing positional and fixed to achieve this.311 if (comptime arg_state.hasUnusedArgs()) {
303 var i: usize = 0;
304 inline while (i < next_arg) : (i += 1) {
305 used_pos_args |= 1 << i;
306 }
307
308 if (@popCount(ArgSetType, used_pos_args) != args.len) {
309 @compileError("Unused arguments");312 @compileError("Unused arguments");
310 }313 }
311 if (state != State.Start) {314 if (state != State.Start) {
...@@ -362,14 +365,21 @@ pub fn formatType(...@@ -362,14 +365,21 @@ pub fn formatType(
362 try output(context, "error.");365 try output(context, "error.");
363 return output(context, @errorName(value));366 return output(context, @errorName(value));
364 },367 },
365 .Enum => {368 .Enum => |enumInfo| {
366 if (comptime std.meta.trait.hasFn("format")(T)) {369 if (comptime std.meta.trait.hasFn("format")(T)) {
367 return value.format(fmt, options, context, Errors, output);370 return value.format(fmt, options, context, Errors, output);
368 }371 }
369372
370 try output(context, @typeName(T));373 try output(context, @typeName(T));
371 try output(context, ".");374 if (enumInfo.is_exhaustive) {
372 return formatType(@tagName(value), "", options, context, Errors, output, max_depth);375 try output(context, ".");
376 return formatType(@tagName(value), "", options, context, Errors, output, max_depth);
377 } else {
378 // TODO: when @tagName works on exhaustive enums print known enum strings
379 try output(context, "(");
380 try formatType(@enumToInt(value), "", options, context, Errors, output, max_depth);
381 try output(context, ")");
382 }
373 },383 },
374 .Union => {384 .Union => {
375 if (comptime std.meta.trait.hasFn("format")(T)) {385 if (comptime std.meta.trait.hasFn("format")(T)) {
...@@ -1598,7 +1608,8 @@ test "hexToBytes" {...@@ -1598,7 +1608,8 @@ test "hexToBytes" {
1598test "formatIntValue with comptime_int" {1608test "formatIntValue with comptime_int" {
1599 const value: comptime_int = 123456789123456789;1609 const value: comptime_int = 123456789123456789;
16001610
1601 var buf = try std.Buffer.init(std.debug.global_allocator, "");1611 var buf = try std.Buffer.init(std.testing.allocator, "");
1612 defer buf.deinit();
1602 try formatIntValue(value, "", FormatOptions{}, &buf, @TypeOf(std.Buffer.append).ReturnType.ErrorSet, std.Buffer.append);1613 try formatIntValue(value, "", FormatOptions{}, &buf, @TypeOf(std.Buffer.append).ReturnType.ErrorSet, std.Buffer.append);
1603 std.testing.expect(mem.eql(u8, buf.toSlice(), "123456789123456789"));1614 std.testing.expect(mem.eql(u8, buf.toSlice(), "123456789123456789"));
1604}1615}
...@@ -1652,19 +1663,23 @@ test "formatType max_depth" {...@@ -1652,19 +1663,23 @@ test "formatType max_depth" {
1652 inst.a = &inst;1663 inst.a = &inst;
1653 inst.tu.ptr = &inst.tu;1664 inst.tu.ptr = &inst.tu;
16541665
1655 var buf0 = try std.Buffer.init(std.debug.global_allocator, "");1666 var buf0 = try std.Buffer.init(std.testing.allocator, "");
1667 defer buf0.deinit();
1656 try formatType(inst, "", FormatOptions{}, &buf0, @TypeOf(std.Buffer.append).ReturnType.ErrorSet, std.Buffer.append, 0);1668 try formatType(inst, "", FormatOptions{}, &buf0, @TypeOf(std.Buffer.append).ReturnType.ErrorSet, std.Buffer.append, 0);
1657 std.testing.expect(mem.eql(u8, buf0.toSlice(), "S{ ... }"));1669 std.testing.expect(mem.eql(u8, buf0.toSlice(), "S{ ... }"));
16581670
1659 var buf1 = try std.Buffer.init(std.debug.global_allocator, "");1671 var buf1 = try std.Buffer.init(std.testing.allocator, "");
1672 defer buf1.deinit();
1660 try formatType(inst, "", FormatOptions{}, &buf1, @TypeOf(std.Buffer.append).ReturnType.ErrorSet, std.Buffer.append, 1);1673 try formatType(inst, "", FormatOptions{}, &buf1, @TypeOf(std.Buffer.append).ReturnType.ErrorSet, std.Buffer.append, 1);
1661 std.testing.expect(mem.eql(u8, buf1.toSlice(), "S{ .a = S{ ... }, .tu = TU{ ... }, .e = E.Two, .vec = (10.200,2.220) }"));1674 std.testing.expect(mem.eql(u8, buf1.toSlice(), "S{ .a = S{ ... }, .tu = TU{ ... }, .e = E.Two, .vec = (10.200,2.220) }"));
16621675
1663 var buf2 = try std.Buffer.init(std.debug.global_allocator, "");1676 var buf2 = try std.Buffer.init(std.testing.allocator, "");
1677 defer buf2.deinit();
1664 try formatType(inst, "", FormatOptions{}, &buf2, @TypeOf(std.Buffer.append).ReturnType.ErrorSet, std.Buffer.append, 2);1678 try formatType(inst, "", FormatOptions{}, &buf2, @TypeOf(std.Buffer.append).ReturnType.ErrorSet, std.Buffer.append, 2);
1665 std.testing.expect(mem.eql(u8, buf2.toSlice(), "S{ .a = S{ .a = S{ ... }, .tu = TU{ ... }, .e = E.Two, .vec = (10.200,2.220) }, .tu = TU{ .ptr = TU{ ... } }, .e = E.Two, .vec = (10.200,2.220) }"));1679 std.testing.expect(mem.eql(u8, buf2.toSlice(), "S{ .a = S{ .a = S{ ... }, .tu = TU{ ... }, .e = E.Two, .vec = (10.200,2.220) }, .tu = TU{ .ptr = TU{ ... } }, .e = E.Two, .vec = (10.200,2.220) }"));
16661680
1667 var buf3 = try std.Buffer.init(std.debug.global_allocator, "");1681 var buf3 = try std.Buffer.init(std.testing.allocator, "");
1682 defer buf3.deinit();
1668 try formatType(inst, "", FormatOptions{}, &buf3, @TypeOf(std.Buffer.append).ReturnType.ErrorSet, std.Buffer.append, 3);1683 try formatType(inst, "", FormatOptions{}, &buf3, @TypeOf(std.Buffer.append).ReturnType.ErrorSet, std.Buffer.append, 3);
1669 std.testing.expect(mem.eql(u8, buf3.toSlice(), "S{ .a = S{ .a = S{ .a = S{ ... }, .tu = TU{ ... }, .e = E.Two, .vec = (10.200,2.220) }, .tu = TU{ .ptr = TU{ ... } }, .e = E.Two, .vec = (10.200,2.220) }, .tu = TU{ .ptr = TU{ .ptr = TU{ ... } } }, .e = E.Two, .vec = (10.200,2.220) }"));1684 std.testing.expect(mem.eql(u8, buf3.toSlice(), "S{ .a = S{ .a = S{ .a = S{ ... }, .tu = TU{ ... }, .e = E.Two, .vec = (10.200,2.220) }, .tu = TU{ .ptr = TU{ ... } }, .e = E.Two, .vec = (10.200,2.220) }, .tu = TU{ .ptr = TU{ .ptr = TU{ ... } } }, .e = E.Two, .vec = (10.200,2.220) }"));
1670}1685}
lib/std/fs.zig+17-17
...@@ -598,8 +598,8 @@ pub const Dir = struct {...@@ -598,8 +598,8 @@ pub const Dir = struct {
598 self.index = 0;598 self.index = 0;
599 self.end_index = io.Information;599 self.end_index = io.Information;
600 switch (rc) {600 switch (rc) {
601 w.STATUS.SUCCESS => {},601 .SUCCESS => {},
602 w.STATUS.ACCESS_DENIED => return error.AccessDenied,602 .ACCESS_DENIED => return error.AccessDenied,
603 else => return w.unexpectedStatus(rc),603 else => return w.unexpectedStatus(rc),
604 }604 }
605 }605 }
...@@ -837,16 +837,16 @@ pub const Dir = struct {...@@ -837,16 +837,16 @@ pub const Dir = struct {
837 0,837 0,
838 );838 );
839 switch (rc) {839 switch (rc) {
840 w.STATUS.SUCCESS => return result,840 .SUCCESS => return result,
841 w.STATUS.OBJECT_NAME_INVALID => unreachable,841 .OBJECT_NAME_INVALID => unreachable,
842 w.STATUS.OBJECT_NAME_NOT_FOUND => return error.FileNotFound,842 .OBJECT_NAME_NOT_FOUND => return error.FileNotFound,
843 w.STATUS.OBJECT_PATH_NOT_FOUND => return error.FileNotFound,843 .OBJECT_PATH_NOT_FOUND => return error.FileNotFound,
844 w.STATUS.INVALID_PARAMETER => unreachable,844 .INVALID_PARAMETER => unreachable,
845 w.STATUS.SHARING_VIOLATION => return error.SharingViolation,845 .SHARING_VIOLATION => return error.SharingViolation,
846 w.STATUS.ACCESS_DENIED => return error.AccessDenied,846 .ACCESS_DENIED => return error.AccessDenied,
847 w.STATUS.PIPE_BUSY => return error.PipeBusy,847 .PIPE_BUSY => return error.PipeBusy,
848 w.STATUS.OBJECT_PATH_SYNTAX_BAD => unreachable,848 .OBJECT_PATH_SYNTAX_BAD => unreachable,
849 w.STATUS.OBJECT_NAME_COLLISION => return error.PathAlreadyExists,849 .OBJECT_NAME_COLLISION => return error.PathAlreadyExists,
850 else => return w.unexpectedStatus(rc),850 else => return w.unexpectedStatus(rc),
851 }851 }
852 }852 }
...@@ -990,11 +990,11 @@ pub const Dir = struct {...@@ -990,11 +990,11 @@ pub const Dir = struct {
990 0,990 0,
991 );991 );
992 switch (rc) {992 switch (rc) {
993 w.STATUS.SUCCESS => return result,993 .SUCCESS => return result,
994 w.STATUS.OBJECT_NAME_INVALID => unreachable,994 .OBJECT_NAME_INVALID => unreachable,
995 w.STATUS.OBJECT_NAME_NOT_FOUND => return error.FileNotFound,995 .OBJECT_NAME_NOT_FOUND => return error.FileNotFound,
996 w.STATUS.OBJECT_PATH_NOT_FOUND => return error.FileNotFound,996 .OBJECT_PATH_NOT_FOUND => return error.FileNotFound,
997 w.STATUS.INVALID_PARAMETER => unreachable,997 .INVALID_PARAMETER => unreachable,
998 else => return w.unexpectedStatus(rc),998 else => return w.unexpectedStatus(rc),
999 }999 }
1000 }1000 }
lib/std/fs/file.zig+4-4
...@@ -225,10 +225,10 @@ pub const File = struct {...@@ -225,10 +225,10 @@ pub const File = struct {
225 var info: windows.FILE_ALL_INFORMATION = undefined;225 var info: windows.FILE_ALL_INFORMATION = undefined;
226 const rc = windows.ntdll.NtQueryInformationFile(self.handle, &io_status_block, &info, @sizeOf(windows.FILE_ALL_INFORMATION), .FileAllInformation);226 const rc = windows.ntdll.NtQueryInformationFile(self.handle, &io_status_block, &info, @sizeOf(windows.FILE_ALL_INFORMATION), .FileAllInformation);
227 switch (rc) {227 switch (rc) {
228 windows.STATUS.SUCCESS => {},228 .SUCCESS => {},
229 windows.STATUS.BUFFER_OVERFLOW => {},229 .BUFFER_OVERFLOW => {},
230 windows.STATUS.INVALID_PARAMETER => unreachable,230 .INVALID_PARAMETER => unreachable,
231 windows.STATUS.ACCESS_DENIED => return error.AccessDenied,231 .ACCESS_DENIED => return error.AccessDenied,
232 else => return windows.unexpectedStatus(rc),232 else => return windows.unexpectedStatus(rc),
233 }233 }
234 return Stat{234 return Stat{
lib/std/fs/path.zig+87-79
...@@ -665,15 +665,16 @@ pub fn resolvePosix(allocator: *Allocator, paths: []const []const u8) ![]u8 {...@@ -665,15 +665,16 @@ pub fn resolvePosix(allocator: *Allocator, paths: []const []const u8) ![]u8 {
665}665}
666666
667test "resolve" {667test "resolve" {
668 const cwd = try process.getCwdAlloc(debug.global_allocator);668 const cwd = try process.getCwdAlloc(testing.allocator);
669 defer testing.allocator.free(cwd);
669 if (builtin.os == .windows) {670 if (builtin.os == .windows) {
670 if (windowsParsePath(cwd).kind == WindowsPath.Kind.Drive) {671 if (windowsParsePath(cwd).kind == WindowsPath.Kind.Drive) {
671 cwd[0] = asciiUpper(cwd[0]);672 cwd[0] = asciiUpper(cwd[0]);
672 }673 }
673 testing.expect(mem.eql(u8, testResolveWindows(&[_][]const u8{"."}), cwd));674 try testResolveWindows(&[_][]const u8{"."}, cwd);
674 } else {675 } else {
675 testing.expect(mem.eql(u8, testResolvePosix(&[_][]const u8{ "a/b/c/", "../../.." }), cwd));676 try testResolvePosix(&[_][]const u8{ "a/b/c/", "../../.." }, cwd);
676 testing.expect(mem.eql(u8, testResolvePosix(&[_][]const u8{"."}), cwd));677 try testResolvePosix(&[_][]const u8{"."}, cwd);
677 }678 }
678}679}
679680
...@@ -683,66 +684,71 @@ test "resolveWindows" {...@@ -683,66 +684,71 @@ test "resolveWindows" {
683 return error.SkipZigTest;684 return error.SkipZigTest;
684 }685 }
685 if (builtin.os == .windows) {686 if (builtin.os == .windows) {
686 const cwd = try process.getCwdAlloc(debug.global_allocator);687 const cwd = try process.getCwdAlloc(testing.allocator);
688 defer testing.allocator.free(cwd);
687 const parsed_cwd = windowsParsePath(cwd);689 const parsed_cwd = windowsParsePath(cwd);
688 {690 {
689 const result = testResolveWindows(&[_][]const u8{ "/usr/local", "lib\\zig\\std\\array_list.zig" });691 const expected = try join(testing.allocator, &[_][]const u8{
690 const expected = try join(debug.global_allocator, &[_][]const u8{
691 parsed_cwd.disk_designator,692 parsed_cwd.disk_designator,
692 "usr\\local\\lib\\zig\\std\\array_list.zig",693 "usr\\local\\lib\\zig\\std\\array_list.zig",
693 });694 });
695 defer testing.allocator.free(expected);
694 if (parsed_cwd.kind == WindowsPath.Kind.Drive) {696 if (parsed_cwd.kind == WindowsPath.Kind.Drive) {
695 expected[0] = asciiUpper(parsed_cwd.disk_designator[0]);697 expected[0] = asciiUpper(parsed_cwd.disk_designator[0]);
696 }698 }
697 testing.expect(mem.eql(u8, result, expected));699 try testResolveWindows(&[_][]const u8{ "/usr/local", "lib\\zig\\std\\array_list.zig" }, expected);
698 }700 }
699 {701 {
700 const result = testResolveWindows(&[_][]const u8{ "usr/local", "lib\\zig" });702 const expected = try join(testing.allocator, &[_][]const u8{
701 const expected = try join(debug.global_allocator, &[_][]const u8{
702 cwd,703 cwd,
703 "usr\\local\\lib\\zig",704 "usr\\local\\lib\\zig",
704 });705 });
706 defer testing.allocator.free(expected);
705 if (parsed_cwd.kind == WindowsPath.Kind.Drive) {707 if (parsed_cwd.kind == WindowsPath.Kind.Drive) {
706 expected[0] = asciiUpper(parsed_cwd.disk_designator[0]);708 expected[0] = asciiUpper(parsed_cwd.disk_designator[0]);
707 }709 }
708 testing.expect(mem.eql(u8, result, expected));710 try testResolveWindows(&[_][]const u8{ "usr/local", "lib\\zig" }, expected);
709 }711 }
710 }712 }
711713
712 testing.expect(mem.eql(u8, testResolveWindows(&[_][]const u8{ "c:\\a\\b\\c", "/hi", "ok" }), "C:\\hi\\ok"));714 try testResolveWindows(&[_][]const u8{ "c:\\a\\b\\c", "/hi", "ok" }, "C:\\hi\\ok");
713 testing.expect(mem.eql(u8, testResolveWindows(&[_][]const u8{ "c:/blah\\blah", "d:/games", "c:../a" }), "C:\\blah\\a"));715 try testResolveWindows(&[_][]const u8{ "c:/blah\\blah", "d:/games", "c:../a" }, "C:\\blah\\a");
714 testing.expect(mem.eql(u8, testResolveWindows(&[_][]const u8{ "c:/blah\\blah", "d:/games", "C:../a" }), "C:\\blah\\a"));716 try testResolveWindows(&[_][]const u8{ "c:/blah\\blah", "d:/games", "C:../a" }, "C:\\blah\\a");
715 testing.expect(mem.eql(u8, testResolveWindows(&[_][]const u8{ "c:/ignore", "d:\\a/b\\c/d", "\\e.exe" }), "D:\\e.exe"));717 try testResolveWindows(&[_][]const u8{ "c:/ignore", "d:\\a/b\\c/d", "\\e.exe" }, "D:\\e.exe");
716 testing.expect(mem.eql(u8, testResolveWindows(&[_][]const u8{ "c:/ignore", "c:/some/file" }), "C:\\some\\file"));718 try testResolveWindows(&[_][]const u8{ "c:/ignore", "c:/some/file" }, "C:\\some\\file");
717 testing.expect(mem.eql(u8, testResolveWindows(&[_][]const u8{ "d:/ignore", "d:some/dir//" }), "D:\\ignore\\some\\dir"));719 try testResolveWindows(&[_][]const u8{ "d:/ignore", "d:some/dir//" }, "D:\\ignore\\some\\dir");
718 testing.expect(mem.eql(u8, testResolveWindows(&[_][]const u8{ "//server/share", "..", "relative\\" }), "\\\\server\\share\\relative"));720 try testResolveWindows(&[_][]const u8{ "//server/share", "..", "relative\\" }, "\\\\server\\share\\relative");
719 testing.expect(mem.eql(u8, testResolveWindows(&[_][]const u8{ "c:/", "//" }), "C:\\"));721 try testResolveWindows(&[_][]const u8{ "c:/", "//" }, "C:\\");
720 testing.expect(mem.eql(u8, testResolveWindows(&[_][]const u8{ "c:/", "//dir" }), "C:\\dir"));722 try testResolveWindows(&[_][]const u8{ "c:/", "//dir" }, "C:\\dir");
721 testing.expect(mem.eql(u8, testResolveWindows(&[_][]const u8{ "c:/", "//server/share" }), "\\\\server\\share\\"));723 try testResolveWindows(&[_][]const u8{ "c:/", "//server/share" }, "\\\\server\\share\\");
722 testing.expect(mem.eql(u8, testResolveWindows(&[_][]const u8{ "c:/", "//server//share" }), "\\\\server\\share\\"));724 try testResolveWindows(&[_][]const u8{ "c:/", "//server//share" }, "\\\\server\\share\\");
723 testing.expect(mem.eql(u8, testResolveWindows(&[_][]const u8{ "c:/", "///some//dir" }), "C:\\some\\dir"));725 try testResolveWindows(&[_][]const u8{ "c:/", "///some//dir" }, "C:\\some\\dir");
724 testing.expect(mem.eql(u8, testResolveWindows(&[_][]const u8{ "C:\\foo\\tmp.3\\", "..\\tmp.3\\cycles\\root.js" }), "C:\\foo\\tmp.3\\cycles\\root.js"));726 try testResolveWindows(&[_][]const u8{ "C:\\foo\\tmp.3\\", "..\\tmp.3\\cycles\\root.js" }, "C:\\foo\\tmp.3\\cycles\\root.js");
725}727}
726728
727test "resolvePosix" {729test "resolvePosix" {
728 testing.expect(mem.eql(u8, testResolvePosix(&[_][]const u8{ "/a/b", "c" }), "/a/b/c"));730 try testResolvePosix(&[_][]const u8{ "/a/b", "c" }, "/a/b/c");
729 testing.expect(mem.eql(u8, testResolvePosix(&[_][]const u8{ "/a/b", "c", "//d", "e///" }), "/d/e"));731 try testResolvePosix(&[_][]const u8{ "/a/b", "c", "//d", "e///" }, "/d/e");
730 testing.expect(mem.eql(u8, testResolvePosix(&[_][]const u8{ "/a/b/c", "..", "../" }), "/a"));732 try testResolvePosix(&[_][]const u8{ "/a/b/c", "..", "../" }, "/a");
731 testing.expect(mem.eql(u8, testResolvePosix(&[_][]const u8{ "/", "..", ".." }), "/"));733 try testResolvePosix(&[_][]const u8{ "/", "..", ".." }, "/");
732 testing.expect(mem.eql(u8, testResolvePosix(&[_][]const u8{"/a/b/c/"}), "/a/b/c"));734 try testResolvePosix(&[_][]const u8{"/a/b/c/"}, "/a/b/c");
733735
734 testing.expect(mem.eql(u8, testResolvePosix(&[_][]const u8{ "/var/lib", "../", "file/" }), "/var/file"));736 try testResolvePosix(&[_][]const u8{ "/var/lib", "../", "file/" }, "/var/file");
735 testing.expect(mem.eql(u8, testResolvePosix(&[_][]const u8{ "/var/lib", "/../", "file/" }), "/file"));737 try testResolvePosix(&[_][]const u8{ "/var/lib", "/../", "file/" }, "/file");
736 testing.expect(mem.eql(u8, testResolvePosix(&[_][]const u8{ "/some/dir", ".", "/absolute/" }), "/absolute"));738 try testResolvePosix(&[_][]const u8{ "/some/dir", ".", "/absolute/" }, "/absolute");
737 testing.expect(mem.eql(u8, testResolvePosix(&[_][]const u8{ "/foo/tmp.3/", "../tmp.3/cycles/root.js" }), "/foo/tmp.3/cycles/root.js"));739 try testResolvePosix(&[_][]const u8{ "/foo/tmp.3/", "../tmp.3/cycles/root.js" }, "/foo/tmp.3/cycles/root.js");
738}740}
739741
740fn testResolveWindows(paths: []const []const u8) []u8 {742fn testResolveWindows(paths: []const []const u8, expected: []const u8) !void {
741 return resolveWindows(debug.global_allocator, paths) catch unreachable;743 const actual = try resolveWindows(testing.allocator, paths);
744 defer testing.allocator.free(actual);
745 return testing.expect(mem.eql(u8, actual, expected));
742}746}
743747
744fn testResolvePosix(paths: []const []const u8) []u8 {748fn testResolvePosix(paths: []const []const u8, expected: []const u8) !void {
745 return resolvePosix(debug.global_allocator, paths) catch unreachable;749 const actual = try resolvePosix(testing.allocator, paths);
750 defer testing.allocator.free(actual);
751 return testing.expect(mem.eql(u8, actual, expected));
746}752}
747753
748/// If the path is a file in the current directory (no directory component)754/// If the path is a file in the current directory (no directory component)
...@@ -1126,51 +1132,53 @@ test "relative" {...@@ -1126,51 +1132,53 @@ test "relative" {
1126 // TODO https://github.com/ziglang/zig/issues/32881132 // TODO https://github.com/ziglang/zig/issues/3288
1127 return error.SkipZigTest;1133 return error.SkipZigTest;
1128 }1134 }
1129 testRelativeWindows("c:/blah\\blah", "d:/games", "D:\\games");1135 try testRelativeWindows("c:/blah\\blah", "d:/games", "D:\\games");
1130 testRelativeWindows("c:/aaaa/bbbb", "c:/aaaa", "..");1136 try testRelativeWindows("c:/aaaa/bbbb", "c:/aaaa", "..");
1131 testRelativeWindows("c:/aaaa/bbbb", "c:/cccc", "..\\..\\cccc");1137 try testRelativeWindows("c:/aaaa/bbbb", "c:/cccc", "..\\..\\cccc");
1132 testRelativeWindows("c:/aaaa/bbbb", "c:/aaaa/bbbb", "");1138 try testRelativeWindows("c:/aaaa/bbbb", "c:/aaaa/bbbb", "");
1133 testRelativeWindows("c:/aaaa/bbbb", "c:/aaaa/cccc", "..\\cccc");1139 try testRelativeWindows("c:/aaaa/bbbb", "c:/aaaa/cccc", "..\\cccc");
1134 testRelativeWindows("c:/aaaa/", "c:/aaaa/cccc", "cccc");1140 try testRelativeWindows("c:/aaaa/", "c:/aaaa/cccc", "cccc");
1135 testRelativeWindows("c:/", "c:\\aaaa\\bbbb", "aaaa\\bbbb");1141 try testRelativeWindows("c:/", "c:\\aaaa\\bbbb", "aaaa\\bbbb");
1136 testRelativeWindows("c:/aaaa/bbbb", "d:\\", "D:\\");1142 try testRelativeWindows("c:/aaaa/bbbb", "d:\\", "D:\\");
1137 testRelativeWindows("c:/AaAa/bbbb", "c:/aaaa/bbbb", "");1143 try testRelativeWindows("c:/AaAa/bbbb", "c:/aaaa/bbbb", "");
1138 testRelativeWindows("c:/aaaaa/", "c:/aaaa/cccc", "..\\aaaa\\cccc");1144 try testRelativeWindows("c:/aaaaa/", "c:/aaaa/cccc", "..\\aaaa\\cccc");
1139 testRelativeWindows("C:\\foo\\bar\\baz\\quux", "C:\\", "..\\..\\..\\..");1145 try testRelativeWindows("C:\\foo\\bar\\baz\\quux", "C:\\", "..\\..\\..\\..");
1140 testRelativeWindows("C:\\foo\\test", "C:\\foo\\test\\bar\\package.json", "bar\\package.json");1146 try testRelativeWindows("C:\\foo\\test", "C:\\foo\\test\\bar\\package.json", "bar\\package.json");
1141 testRelativeWindows("C:\\foo\\bar\\baz-quux", "C:\\foo\\bar\\baz", "..\\baz");1147 try testRelativeWindows("C:\\foo\\bar\\baz-quux", "C:\\foo\\bar\\baz", "..\\baz");
1142 testRelativeWindows("C:\\foo\\bar\\baz", "C:\\foo\\bar\\baz-quux", "..\\baz-quux");1148 try testRelativeWindows("C:\\foo\\bar\\baz", "C:\\foo\\bar\\baz-quux", "..\\baz-quux");
1143 testRelativeWindows("\\\\foo\\bar", "\\\\foo\\bar\\baz", "baz");1149 try testRelativeWindows("\\\\foo\\bar", "\\\\foo\\bar\\baz", "baz");
1144 testRelativeWindows("\\\\foo\\bar\\baz", "\\\\foo\\bar", "..");1150 try testRelativeWindows("\\\\foo\\bar\\baz", "\\\\foo\\bar", "..");
1145 testRelativeWindows("\\\\foo\\bar\\baz-quux", "\\\\foo\\bar\\baz", "..\\baz");1151 try testRelativeWindows("\\\\foo\\bar\\baz-quux", "\\\\foo\\bar\\baz", "..\\baz");
1146 testRelativeWindows("\\\\foo\\bar\\baz", "\\\\foo\\bar\\baz-quux", "..\\baz-quux");1152 try testRelativeWindows("\\\\foo\\bar\\baz", "\\\\foo\\bar\\baz-quux", "..\\baz-quux");
1147 testRelativeWindows("C:\\baz-quux", "C:\\baz", "..\\baz");1153 try testRelativeWindows("C:\\baz-quux", "C:\\baz", "..\\baz");
1148 testRelativeWindows("C:\\baz", "C:\\baz-quux", "..\\baz-quux");1154 try testRelativeWindows("C:\\baz", "C:\\baz-quux", "..\\baz-quux");
1149 testRelativeWindows("\\\\foo\\baz-quux", "\\\\foo\\baz", "..\\baz");1155 try testRelativeWindows("\\\\foo\\baz-quux", "\\\\foo\\baz", "..\\baz");
1150 testRelativeWindows("\\\\foo\\baz", "\\\\foo\\baz-quux", "..\\baz-quux");1156 try testRelativeWindows("\\\\foo\\baz", "\\\\foo\\baz-quux", "..\\baz-quux");
1151 testRelativeWindows("C:\\baz", "\\\\foo\\bar\\baz", "\\\\foo\\bar\\baz");1157 try testRelativeWindows("C:\\baz", "\\\\foo\\bar\\baz", "\\\\foo\\bar\\baz");
1152 testRelativeWindows("\\\\foo\\bar\\baz", "C:\\baz", "C:\\baz");1158 try testRelativeWindows("\\\\foo\\bar\\baz", "C:\\baz", "C:\\baz");
11531159
1154 testRelativePosix("/var/lib", "/var", "..");1160 try testRelativePosix("/var/lib", "/var", "..");
1155 testRelativePosix("/var/lib", "/bin", "../../bin");1161 try testRelativePosix("/var/lib", "/bin", "../../bin");
1156 testRelativePosix("/var/lib", "/var/lib", "");1162 try testRelativePosix("/var/lib", "/var/lib", "");
1157 testRelativePosix("/var/lib", "/var/apache", "../apache");1163 try testRelativePosix("/var/lib", "/var/apache", "../apache");
1158 testRelativePosix("/var/", "/var/lib", "lib");1164 try testRelativePosix("/var/", "/var/lib", "lib");
1159 testRelativePosix("/", "/var/lib", "var/lib");1165 try testRelativePosix("/", "/var/lib", "var/lib");
1160 testRelativePosix("/foo/test", "/foo/test/bar/package.json", "bar/package.json");1166 try testRelativePosix("/foo/test", "/foo/test/bar/package.json", "bar/package.json");
1161 testRelativePosix("/Users/a/web/b/test/mails", "/Users/a/web/b", "../..");1167 try testRelativePosix("/Users/a/web/b/test/mails", "/Users/a/web/b", "../..");
1162 testRelativePosix("/foo/bar/baz-quux", "/foo/bar/baz", "../baz");1168 try testRelativePosix("/foo/bar/baz-quux", "/foo/bar/baz", "../baz");
1163 testRelativePosix("/foo/bar/baz", "/foo/bar/baz-quux", "../baz-quux");1169 try testRelativePosix("/foo/bar/baz", "/foo/bar/baz-quux", "../baz-quux");
1164 testRelativePosix("/baz-quux", "/baz", "../baz");1170 try testRelativePosix("/baz-quux", "/baz", "../baz");
1165 testRelativePosix("/baz", "/baz-quux", "../baz-quux");1171 try testRelativePosix("/baz", "/baz-quux", "../baz-quux");
1166}1172}
11671173
1168fn testRelativePosix(from: []const u8, to: []const u8, expected_output: []const u8) void {1174fn testRelativePosix(from: []const u8, to: []const u8, expected_output: []const u8) !void {
1169 const result = relativePosix(debug.global_allocator, from, to) catch unreachable;1175 const result = try relativePosix(testing.allocator, from, to);
1176 defer testing.allocator.free(result);
1170 testing.expectEqualSlices(u8, expected_output, result);1177 testing.expectEqualSlices(u8, expected_output, result);
1171}1178}
11721179
1173fn testRelativeWindows(from: []const u8, to: []const u8, expected_output: []const u8) void {1180fn testRelativeWindows(from: []const u8, to: []const u8, expected_output: []const u8) !void {
1174 const result = relativeWindows(debug.global_allocator, from, to) catch unreachable;1181 const result = try relativeWindows(testing.allocator, from, to);
1182 defer testing.allocator.free(result);
1175 testing.expectEqualSlices(u8, expected_output, result);1183 testing.expectEqualSlices(u8, expected_output, result);
1176}1184}
lib/std/hash/auto_hash.zig+5-5
...@@ -234,8 +234,8 @@ test "hash pointer" {...@@ -234,8 +234,8 @@ test "hash pointer" {
234test "hash slice shallow" {234test "hash slice shallow" {
235 // Allocate one array dynamically so that we're assured it is not merged235 // Allocate one array dynamically so that we're assured it is not merged
236 // with the other by the optimization passes.236 // with the other by the optimization passes.
237 const array1 = try std.heap.page_allocator.create([6]u32);237 const array1 = try std.testing.allocator.create([6]u32);
238 defer std.heap.page_allocator.destroy(array1);238 defer std.testing.allocator.destroy(array1);
239 array1.* = [_]u32{ 1, 2, 3, 4, 5, 6 };239 array1.* = [_]u32{ 1, 2, 3, 4, 5, 6 };
240 const array2 = [_]u32{ 1, 2, 3, 4, 5, 6 };240 const array2 = [_]u32{ 1, 2, 3, 4, 5, 6 };
241 const a = array1[0..];241 const a = array1[0..];
...@@ -250,8 +250,8 @@ test "hash slice shallow" {...@@ -250,8 +250,8 @@ test "hash slice shallow" {
250test "hash slice deep" {250test "hash slice deep" {
251 // Allocate one array dynamically so that we're assured it is not merged251 // Allocate one array dynamically so that we're assured it is not merged
252 // with the other by the optimization passes.252 // with the other by the optimization passes.
253 const array1 = try std.heap.page_allocator.create([6]u32);253 const array1 = try std.testing.allocator.create([6]u32);
254 defer std.heap.page_allocator.destroy(array1);254 defer std.testing.allocator.destroy(array1);
255 array1.* = [_]u32{ 1, 2, 3, 4, 5, 6 };255 array1.* = [_]u32{ 1, 2, 3, 4, 5, 6 };
256 const array2 = [_]u32{ 1, 2, 3, 4, 5, 6 };256 const array2 = [_]u32{ 1, 2, 3, 4, 5, 6 };
257 const a = array1[0..];257 const a = array1[0..];
...@@ -278,7 +278,7 @@ test "hash struct deep" {...@@ -278,7 +278,7 @@ test "hash struct deep" {
278 }278 }
279 };279 };
280280
281 const allocator = std.heap.page_allocator;281 const allocator = std.testing.allocator;
282 const foo = try Foo.init(allocator, 123, 1.0, true);282 const foo = try Foo.init(allocator, 123, 1.0, true);
283 const bar = try Foo.init(allocator, 123, 1.0, true);283 const bar = try Foo.init(allocator, 123, 1.0, true);
284 const baz = try Foo.init(allocator, 123, 1.0, false);284 const baz = try Foo.init(allocator, 123, 1.0, false);
lib/std/hash/benchmark.zig+2-2
...@@ -250,13 +250,13 @@ pub fn main() !void {...@@ -250,13 +250,13 @@ pub fn main() !void {
250 if (H.has_iterative_api) {250 if (H.has_iterative_api) {
251 prng.seed(seed);251 prng.seed(seed);
252 const result = try benchmarkHash(H, count);252 const result = try benchmarkHash(H, count);
253 try stdout.print(" iterative: {:4} MiB/s [{x:0<16}]\n", .{result.throughput / (1 * MiB), result.hash});253 try stdout.print(" iterative: {:4} MiB/s [{x:0<16}]\n", .{ result.throughput / (1 * MiB), result.hash });
254 }254 }
255255
256 if (!test_iterative_only) {256 if (!test_iterative_only) {
257 prng.seed(seed);257 prng.seed(seed);
258 const result_small = try benchmarkHashSmallKeys(H, key_size, count);258 const result_small = try benchmarkHashSmallKeys(H, key_size, count);
259 try stdout.print(" small keys: {:4} MiB/s [{x:0<16}]\n", .{result_small.throughput / (1 * MiB), result_small.hash});259 try stdout.print(" small keys: {:4} MiB/s [{x:0<16}]\n", .{ result_small.throughput / (1 * MiB), result_small.hash });
260 }260 }
261 }261 }
262 }262 }
lib/std/hash_map.zig+3-3
...@@ -419,7 +419,7 @@ pub fn HashMap(comptime K: type, comptime V: type, comptime hash: fn (key: K) u3...@@ -419,7 +419,7 @@ pub fn HashMap(comptime K: type, comptime V: type, comptime hash: fn (key: K) u3
419}419}
420420
421test "basic hash map usage" {421test "basic hash map usage" {
422 var map = AutoHashMap(i32, i32).init(std.heap.page_allocator);422 var map = AutoHashMap(i32, i32).init(std.testing.allocator);
423 defer map.deinit();423 defer map.deinit();
424424
425 testing.expect((try map.put(1, 11)) == null);425 testing.expect((try map.put(1, 11)) == null);
...@@ -463,7 +463,7 @@ test "basic hash map usage" {...@@ -463,7 +463,7 @@ test "basic hash map usage" {
463}463}
464464
465test "iterator hash map" {465test "iterator hash map" {
466 var reset_map = AutoHashMap(i32, i32).init(std.heap.page_allocator);466 var reset_map = AutoHashMap(i32, i32).init(std.testing.allocator);
467 defer reset_map.deinit();467 defer reset_map.deinit();
468468
469 try reset_map.putNoClobber(1, 11);469 try reset_map.putNoClobber(1, 11);
...@@ -509,7 +509,7 @@ test "iterator hash map" {...@@ -509,7 +509,7 @@ test "iterator hash map" {
509}509}
510510
511test "ensure capacity" {511test "ensure capacity" {
512 var map = AutoHashMap(i32, i32).init(std.heap.page_allocator);512 var map = AutoHashMap(i32, i32).init(std.testing.allocator);
513 defer map.deinit();513 defer map.deinit();
514514
515 try map.ensureCapacity(20);515 try map.ensureCapacity(20);
lib/std/heap.zig+4
...@@ -711,6 +711,10 @@ pub const ThreadSafeFixedBufferAllocator = blk: {...@@ -711,6 +711,10 @@ pub const ThreadSafeFixedBufferAllocator = blk: {
711 fn shrink(allocator: *Allocator, old_mem: []u8, old_align: u29, new_size: usize, new_align: u29) []u8 {711 fn shrink(allocator: *Allocator, old_mem: []u8, old_align: u29, new_size: usize, new_align: u29) []u8 {
712 return old_mem[0..new_size];712 return old_mem[0..new_size];
713 }713 }
714
715 pub fn reset(self: *ThreadSafeFixedBufferAllocator) void {
716 self.end_index = 0;
717 }
714 };718 };
715 }719 }
716};720};
lib/std/heap/logging_allocator.zig+1-1
...@@ -57,7 +57,7 @@ test "LoggingAllocator" {...@@ -57,7 +57,7 @@ test "LoggingAllocator" {
57 var slice_stream = std.io.SliceOutStream.init(buf[0..]);57 var slice_stream = std.io.SliceOutStream.init(buf[0..]);
58 const stream = &slice_stream.stream;58 const stream = &slice_stream.stream;
5959
60 const allocator = &LoggingAllocator.init(std.heap.page_allocator, @ptrCast(*AnyErrorOutStream, stream)).allocator;60 const allocator = &LoggingAllocator.init(std.testing.allocator, @ptrCast(*AnyErrorOutStream, stream)).allocator;
6161
62 const ptr = try allocator.alloc(u8, 10);62 const ptr = try allocator.alloc(u8, 10);
63 allocator.free(ptr);63 allocator.free(ptr);
lib/std/io.zig+1-1
...@@ -891,7 +891,7 @@ pub fn readLineSlice(slice: []u8) ![]u8 {...@@ -891,7 +891,7 @@ pub fn readLineSlice(slice: []u8) ![]u8 {
891pub fn readLineSliceFrom(stream: var, slice: []u8) ![]u8 {891pub fn readLineSliceFrom(stream: var, slice: []u8) ![]u8 {
892 // We cannot use Buffer.fromOwnedSlice, as it wants to append a null byte892 // We cannot use Buffer.fromOwnedSlice, as it wants to append a null byte
893 // after taking ownership, which would always require an allocation.893 // after taking ownership, which would always require an allocation.
894 var buf = std.Buffer{ .list = std.ArrayList(u8).fromOwnedSlice(debug.failing_allocator, slice) };894 var buf = std.Buffer{ .list = std.ArrayList(u8).fromOwnedSlice(testing.failing_allocator, slice) };
895 try buf.resize(0);895 try buf.resize(0);
896 return try readLineFrom(stream, &buf);896 return try readLineFrom(stream, &buf);
897}897}
lib/std/linked_list.zig+3-3
...@@ -143,7 +143,7 @@ pub fn SinglyLinkedList(comptime T: type) type {...@@ -143,7 +143,7 @@ pub fn SinglyLinkedList(comptime T: type) type {
143}143}
144144
145test "basic SinglyLinkedList test" {145test "basic SinglyLinkedList test" {
146 const allocator = debug.global_allocator;146 const allocator = testing.allocator;
147 var list = SinglyLinkedList(u32).init();147 var list = SinglyLinkedList(u32).init();
148148
149 var one = try list.createNode(1, allocator);149 var one = try list.createNode(1, allocator);
...@@ -404,7 +404,7 @@ pub fn TailQueue(comptime T: type) type {...@@ -404,7 +404,7 @@ pub fn TailQueue(comptime T: type) type {
404}404}
405405
406test "basic TailQueue test" {406test "basic TailQueue test" {
407 const allocator = debug.global_allocator;407 const allocator = testing.allocator;
408 var list = TailQueue(u32).init();408 var list = TailQueue(u32).init();
409409
410 var one = try list.createNode(1, allocator);410 var one = try list.createNode(1, allocator);
...@@ -456,7 +456,7 @@ test "basic TailQueue test" {...@@ -456,7 +456,7 @@ test "basic TailQueue test" {
456}456}
457457
458test "TailQueue concatenation" {458test "TailQueue concatenation" {
459 const allocator = debug.global_allocator;459 const allocator = testing.allocator;
460 var list1 = TailQueue(u32).init();460 var list1 = TailQueue(u32).init();
461 var list2 = TailQueue(u32).init();461 var list2 = TailQueue(u32).init();
462462
lib/std/mutex.zig+2-8
...@@ -126,7 +126,7 @@ else if (builtin.os == .windows)...@@ -126,7 +126,7 @@ else if (builtin.os == .windows)
126 // then unset the WAKE bit so that another unlocker can wake up a thread.126 // then unset the WAKE bit so that another unlocker can wake up a thread.
127 } else if (@cmpxchgWeak(u32, &self.waiters, waiters, (waiters + WAIT) | 1, .Monotonic, .Monotonic) == null) {127 } else if (@cmpxchgWeak(u32, &self.waiters, waiters, (waiters + WAIT) | 1, .Monotonic, .Monotonic) == null) {
128 const rc = windows.ntdll.NtWaitForKeyedEvent(handle, key, windows.FALSE, null);128 const rc = windows.ntdll.NtWaitForKeyedEvent(handle, key, windows.FALSE, null);
129 assert(rc == 0);129 assert(rc == .SUCCESS);
130 _ = @atomicRmw(u32, &self.waiters, .Sub, WAKE, .Monotonic);130 _ = @atomicRmw(u32, &self.waiters, .Sub, WAKE, .Monotonic);
131 }131 }
132 }132 }
...@@ -154,7 +154,7 @@ else if (builtin.os == .windows)...@@ -154,7 +154,7 @@ else if (builtin.os == .windows)
154 // try to decrease the waiter count & set the WAKE bit meaning a thread is waking up154 // try to decrease the waiter count & set the WAKE bit meaning a thread is waking up
155 if (@cmpxchgWeak(u32, &self.mutex.waiters, waiters, waiters - WAIT + WAKE, .Release, .Monotonic) == null) {155 if (@cmpxchgWeak(u32, &self.mutex.waiters, waiters, waiters - WAIT + WAKE, .Release, .Monotonic) == null) {
156 const rc = windows.ntdll.NtReleaseKeyedEvent(handle, key, windows.FALSE, null);156 const rc = windows.ntdll.NtReleaseKeyedEvent(handle, key, windows.FALSE, null);
157 assert(rc == 0);157 assert(rc == .SUCCESS);
158 return;158 return;
159 }159 }
160 }160 }
...@@ -306,12 +306,6 @@ const TestContext = struct {...@@ -306,12 +306,6 @@ const TestContext = struct {
306};306};
307307
308test "std.Mutex" {308test "std.Mutex" {
309 var plenty_of_memory = try std.heap.page_allocator.alloc(u8, 300 * 1024);
310 defer std.heap.page_allocator.free(plenty_of_memory);
311
312 var fixed_buffer_allocator = std.heap.ThreadSafeFixedBufferAllocator.init(plenty_of_memory);
313 var a = &fixed_buffer_allocator.allocator;
314
315 var mutex = Mutex.init();309 var mutex = Mutex.init();
316 defer mutex.deinit();310 defer mutex.deinit();
317311
lib/std/os.zig+9-9
...@@ -1176,15 +1176,15 @@ pub fn unlinkatW(dirfd: fd_t, sub_path_w: [*:0]const u16, flags: u32) UnlinkatEr...@@ -1176,15 +1176,15 @@ pub fn unlinkatW(dirfd: fd_t, sub_path_w: [*:0]const u16, flags: u32) UnlinkatEr
1176 null,1176 null,
1177 0,1177 0,
1178 );1178 );
1179 if (rc == w.STATUS.SUCCESS) {1179 if (rc == .SUCCESS) {
1180 rc = w.ntdll.NtClose(tmp_handle);1180 rc = w.ntdll.NtClose(tmp_handle);
1181 }1181 }
1182 switch (rc) {1182 switch (rc) {
1183 w.STATUS.SUCCESS => return,1183 .SUCCESS => return,
1184 w.STATUS.OBJECT_NAME_INVALID => unreachable,1184 .OBJECT_NAME_INVALID => unreachable,
1185 w.STATUS.OBJECT_NAME_NOT_FOUND => return error.FileNotFound,1185 .OBJECT_NAME_NOT_FOUND => return error.FileNotFound,
1186 w.STATUS.INVALID_PARAMETER => unreachable,1186 .INVALID_PARAMETER => unreachable,
1187 w.STATUS.FILE_IS_A_DIRECTORY => return error.IsDir,1187 .FILE_IS_A_DIRECTORY => return error.IsDir,
1188 else => return w.unexpectedStatus(rc),1188 else => return w.unexpectedStatus(rc),
1189 }1189 }
1190}1190}
...@@ -2345,9 +2345,9 @@ pub fn accessW(path: [*:0]const u16, mode: u32) windows.GetFileAttributesError!v...@@ -2345,9 +2345,9 @@ pub fn accessW(path: [*:0]const u16, mode: u32) windows.GetFileAttributesError!v
2345 return;2345 return;
2346 }2346 }
2347 switch (windows.kernel32.GetLastError()) {2347 switch (windows.kernel32.GetLastError()) {
2348 windows.ERROR.FILE_NOT_FOUND => return error.FileNotFound,2348 .FILE_NOT_FOUND => return error.FileNotFound,
2349 windows.ERROR.PATH_NOT_FOUND => return error.FileNotFound,2349 .PATH_NOT_FOUND => return error.FileNotFound,
2350 windows.ERROR.ACCESS_DENIED => return error.PermissionDenied,2350 .ACCESS_DENIED => return error.PermissionDenied,
2351 else => |err| return windows.unexpectedError(err),2351 else => |err| return windows.unexpectedError(err),
2352 }2352 }
2353}2353}
lib/std/os/bits/linux.zig+65-27
...@@ -604,6 +604,11 @@ pub const CLONE_NEWPID = 0x20000000;...@@ -604,6 +604,11 @@ pub const CLONE_NEWPID = 0x20000000;
604pub const CLONE_NEWNET = 0x40000000;604pub const CLONE_NEWNET = 0x40000000;
605pub const CLONE_IO = 0x80000000;605pub const CLONE_IO = 0x80000000;
606606
607// Flags for the clone3() syscall.
608
609/// Clear any signal handler and reset to SIG_DFL.
610pub const CLONE_CLEAR_SIGHAND = 0x100000000;
611
607pub const EFD_SEMAPHORE = 1;612pub const EFD_SEMAPHORE = 1;
608pub const EFD_CLOEXEC = O_CLOEXEC;613pub const EFD_CLOEXEC = O_CLOEXEC;
609pub const EFD_NONBLOCK = O_NONBLOCK;614pub const EFD_NONBLOCK = O_NONBLOCK;
...@@ -1120,17 +1125,22 @@ pub const io_uring_params = extern struct {...@@ -1120,17 +1125,22 @@ pub const io_uring_params = extern struct {
1120// io_uring_params.features flags1125// io_uring_params.features flags
11211126
1122pub const IORING_FEAT_SINGLE_MMAP = 1 << 0;1127pub const IORING_FEAT_SINGLE_MMAP = 1 << 0;
1128pub const IORING_FEAT_NODROP = 1 << 1;
1129pub const IORING_FEAT_SUBMIT_STABLE = 1 << 2;
11231130
1124// io_uring_params.flags1131// io_uring_params.flags
11251132
1126/// io_context is polled1133/// io_context is polled
1127pub const IORING_SETUP_IOPOLL = (1 << 0);1134pub const IORING_SETUP_IOPOLL = 1 << 0;
11281135
1129/// SQ poll thread1136/// SQ poll thread
1130pub const IORING_SETUP_SQPOLL = (1 << 1);1137pub const IORING_SETUP_SQPOLL = 1 << 1;
11311138
1132/// sq_thread_cpu is valid1139/// sq_thread_cpu is valid
1133pub const IORING_SETUP_SQ_AFF = (1 << 2);1140pub const IORING_SETUP_SQ_AFF = 1 << 2;
1141
1142/// app defines CQ size
1143pub const IORING_SETUP_CQSIZE = 1 << 3;
11341144
1135pub const io_sqring_offsets = extern struct {1145pub const io_sqring_offsets = extern struct {
1136 /// offset of ring head1146 /// offset of ring head
...@@ -1178,52 +1188,73 @@ pub const io_uring_sqe = extern struct {...@@ -1178,52 +1188,73 @@ pub const io_uring_sqe = extern struct {
1178 flags: u8,1188 flags: u8,
1179 ioprio: u16,1189 ioprio: u16,
1180 fd: i32,1190 fd: i32,
1181 off: u64,1191 pub const union1 = extern union {
1192 off: u64,
1193 addr2: u64,
1194 };
1195 union1: union1,
1182 addr: u64,1196 addr: u64,
1183 len: u32,1197 len: u32,
1184 pub const union1 = extern union {1198 pub const union2 = extern union {
1185 rw_flags: kernel_rwf,1199 rw_flags: kernel_rwf,
1186 fsync_flags: u32,1200 fsync_flags: u32,
1187 poll_events: u16,1201 poll_events: u16,
1188 sync_range_flags: u32,1202 sync_range_flags: u32,
1189 msg_flags: u32,1203 msg_flags: u32,
1190 timeout_flags: u32,1204 timeout_flags: u32,
1205 accept_flags: u32,
1206 cancel_flags: u32,
1191 };1207 };
1192 union1: union1,1208 union2: union2,
1193 user_data: u64,1209 user_data: u64,
1194 pub const union2 = extern union {1210 pub const union3 = extern union {
1195 buf_index: u16,1211 buf_index: u16,
1196 __pad2: [3]u64,1212 __pad2: [3]u64,
1197 };1213 };
1198 union2: union2,1214 union3: union3,
1199};1215};
12001216
1201// io_uring_sqe.flags1217// io_uring_sqe.flags
12021218
1203/// use fixed fileset1219/// use fixed fileset
1204pub const IOSQE_FIXED_FILE = (1 << 0);1220pub const IOSQE_FIXED_FILE = 1 << 0;
12051221
1206/// issue after inflight IO1222/// issue after inflight IO
1207pub const IOSQE_IO_DRAIN = (1 << 1);1223pub const IOSQE_IO_DRAIN = 1 << 1;
12081224
1209/// links next sqe1225/// links next sqe
1210pub const IOSQE_IO_LINK = (1 << 2);1226pub const IOSQE_IO_LINK = 1 << 2;
12111227
1212pub const IORING_OP_NOP = 0;1228/// like LINK, but stronger
1213pub const IORING_OP_READV = 1;1229pub const IOSQE_IO_HARDLINK = 1 << 3;
1214pub const IORING_OP_WRITEV = 2;1230
1215pub const IORING_OP_FSYNC = 3;1231pub const IORING_OP = extern enum {
1216pub const IORING_OP_READ_FIXED = 4;1232 NOP,
1217pub const IORING_OP_WRITE_FIXED = 5;1233 READV,
1218pub const IORING_OP_POLL_ADD = 6;1234 WRITEV,
1219pub const IORING_OP_POLL_REMOVE = 7;1235 FSYNC,
1220pub const IORING_OP_SYNC_FILE_RANGE = 8;1236 READ_FIXED,
1221pub const IORING_OP_SENDMSG = 9;1237 WRITE_FIXED,
1222pub const IORING_OP_RECVMSG = 10;1238 POLL_ADD,
1223pub const IORING_OP_TIMEOUT = 11;1239 POLL_REMOVE,
1240 SYNC_FILE_RANGE,
1241 SENDMSG,
1242 RECVMSG,
1243 TIMEOUT,
1244 TIMEOUT_REMOVE,
1245 ACCEPT,
1246 ASYNC_CANCEL,
1247 LINK_TIMEOUT,
1248 CONNECT,
1249
1250 _,
1251};
12241252
1225// io_uring_sqe.fsync_flags1253// io_uring_sqe.fsync_flags
1226pub const IORING_FSYNC_DATASYNC = (1 << 0);1254pub const IORING_FSYNC_DATASYNC = 1 << 0;
1255
1256// io_uring_sqe.timeout_flags
1257pub const IORING_TIMEOUT_ABS = 1 << 0;
12271258
1228// IO completion data structure (Completion Queue Entry)1259// IO completion data structure (Completion Queue Entry)
1229pub const io_uring_cqe = extern struct {1260pub const io_uring_cqe = extern struct {
...@@ -1240,8 +1271,8 @@ pub const IORING_OFF_CQ_RING = 0x8000000;...@@ -1240,8 +1271,8 @@ pub const IORING_OFF_CQ_RING = 0x8000000;
1240pub const IORING_OFF_SQES = 0x10000000;1271pub const IORING_OFF_SQES = 0x10000000;
12411272
1242// io_uring_enter flags1273// io_uring_enter flags
1243pub const IORING_ENTER_GETEVENTS = (1 << 0);1274pub const IORING_ENTER_GETEVENTS = 1 << 0;
1244pub const IORING_ENTER_SQ_WAKEUP = (1 << 1);1275pub const IORING_ENTER_SQ_WAKEUP = 1 << 1;
12451276
1246// io_uring_register opcodes and arguments1277// io_uring_register opcodes and arguments
1247pub const IORING_REGISTER_BUFFERS = 0;1278pub const IORING_REGISTER_BUFFERS = 0;
...@@ -1250,6 +1281,13 @@ pub const IORING_REGISTER_FILES = 2;...@@ -1250,6 +1281,13 @@ pub const IORING_REGISTER_FILES = 2;
1250pub const IORING_UNREGISTER_FILES = 3;1281pub const IORING_UNREGISTER_FILES = 3;
1251pub const IORING_REGISTER_EVENTFD = 4;1282pub const IORING_REGISTER_EVENTFD = 4;
1252pub const IORING_UNREGISTER_EVENTFD = 5;1283pub const IORING_UNREGISTER_EVENTFD = 5;
1284pub const IORING_REGISTER_FILES_UPDATE = 6;
1285
1286pub const io_uring_files_update = struct {
1287 offset: u32,
1288 resv: u32,
1289 fds: u64,
1290};
12531291
1254pub const utsname = extern struct {1292pub const utsname = extern struct {
1255 sysname: [65]u8,1293 sysname: [65]u8,
lib/std/os/test.zig+3-3
...@@ -9,7 +9,7 @@ const elf = std.elf;...@@ -9,7 +9,7 @@ const elf = std.elf;
9const File = std.fs.File;9const File = std.fs.File;
10const Thread = std.Thread;10const Thread = std.Thread;
1111
12const a = std.debug.global_allocator;12const a = std.testing.allocator;
1313
14const builtin = @import("builtin");14const builtin = @import("builtin");
15const AtomicRmwOp = builtin.AtomicRmwOp;15const AtomicRmwOp = builtin.AtomicRmwOp;
...@@ -235,8 +235,8 @@ test "pipe" {...@@ -235,8 +235,8 @@ test "pipe" {
235}235}
236236
237test "argsAlloc" {237test "argsAlloc" {
238 var args = try std.process.argsAlloc(std.heap.page_allocator);238 var args = try std.process.argsAlloc(std.testing.allocator);
239 std.process.argsFree(std.heap.page_allocator, args);239 std.process.argsFree(std.testing.allocator, args);
240}240}
241241
242test "memfd_create" {242test "memfd_create" {
lib/std/os/uefi.zig+2-1
...@@ -40,7 +40,8 @@ pub const Guid = extern struct {...@@ -40,7 +40,8 @@ pub const Guid = extern struct {
40 self.time_mid,40 self.time_mid,
41 self.time_high_and_version,41 self.time_high_and_version,
42 self.clock_seq_high_and_reserved,42 self.clock_seq_high_and_reserved,
43 self.clock_seq_low, self.node,43 self.clock_seq_low,
44 self.node,
44 });45 });
45 } else {46 } else {
46 @compileError("Unknown format character: '" ++ f ++ "'");47 @compileError("Unknown format character: '" ++ f ++ "'");
lib/std/os/windows.zig+71-70
...@@ -15,6 +15,7 @@ pub const advapi32 = @import("windows/advapi32.zig");...@@ -15,6 +15,7 @@ pub const advapi32 = @import("windows/advapi32.zig");
15pub const kernel32 = @import("windows/kernel32.zig");15pub const kernel32 = @import("windows/kernel32.zig");
16pub const ntdll = @import("windows/ntdll.zig");16pub const ntdll = @import("windows/ntdll.zig");
17pub const ole32 = @import("windows/ole32.zig");17pub const ole32 = @import("windows/ole32.zig");
18pub const psapi = @import("windows/psapi.zig");
18pub const shell32 = @import("windows/shell32.zig");19pub const shell32 = @import("windows/shell32.zig");
19pub const ws2_32 = @import("windows/ws2_32.zig");20pub const ws2_32 = @import("windows/ws2_32.zig");
2021
...@@ -72,14 +73,14 @@ pub fn CreateFileW(...@@ -72,14 +73,14 @@ pub fn CreateFileW(
7273
73 if (result == INVALID_HANDLE_VALUE) {74 if (result == INVALID_HANDLE_VALUE) {
74 switch (kernel32.GetLastError()) {75 switch (kernel32.GetLastError()) {
75 ERROR.SHARING_VIOLATION => return error.SharingViolation,76 .SHARING_VIOLATION => return error.SharingViolation,
76 ERROR.ALREADY_EXISTS => return error.PathAlreadyExists,77 .ALREADY_EXISTS => return error.PathAlreadyExists,
77 ERROR.FILE_EXISTS => return error.PathAlreadyExists,78 .FILE_EXISTS => return error.PathAlreadyExists,
78 ERROR.FILE_NOT_FOUND => return error.FileNotFound,79 .FILE_NOT_FOUND => return error.FileNotFound,
79 ERROR.PATH_NOT_FOUND => return error.FileNotFound,80 .PATH_NOT_FOUND => return error.FileNotFound,
80 ERROR.ACCESS_DENIED => return error.AccessDenied,81 .ACCESS_DENIED => return error.AccessDenied,
81 ERROR.PIPE_BUSY => return error.PipeBusy,82 .PIPE_BUSY => return error.PipeBusy,
82 ERROR.FILENAME_EXCED_RANGE => return error.NameTooLong,83 .FILENAME_EXCED_RANGE => return error.NameTooLong,
83 else => |err| return unexpectedError(err),84 else => |err| return unexpectedError(err),
84 }85 }
85 }86 }
...@@ -132,7 +133,7 @@ pub fn DeviceIoControl(...@@ -132,7 +133,7 @@ pub fn DeviceIoControl(
132 overlapped,133 overlapped,
133 ) == 0) {134 ) == 0) {
134 switch (kernel32.GetLastError()) {135 switch (kernel32.GetLastError()) {
135 ERROR.IO_PENDING => if (overlapped == null) unreachable,136 .IO_PENDING => if (overlapped == null) unreachable,
136 else => |err| return unexpectedError(err),137 else => |err| return unexpectedError(err),
137 }138 }
138 }139 }
...@@ -143,7 +144,7 @@ pub fn GetOverlappedResult(h: HANDLE, overlapped: *OVERLAPPED, wait: bool) !DWOR...@@ -143,7 +144,7 @@ pub fn GetOverlappedResult(h: HANDLE, overlapped: *OVERLAPPED, wait: bool) !DWOR
143 var bytes: DWORD = undefined;144 var bytes: DWORD = undefined;
144 if (kernel32.GetOverlappedResult(h, overlapped, &bytes, @boolToInt(wait)) == 0) {145 if (kernel32.GetOverlappedResult(h, overlapped, &bytes, @boolToInt(wait)) == 0) {
145 switch (kernel32.GetLastError()) {146 switch (kernel32.GetLastError()) {
146 ERROR.IO_INCOMPLETE => if (!wait) return error.WouldBlock else unreachable,147 .IO_INCOMPLETE => if (!wait) return error.WouldBlock else unreachable,
147 else => |err| return unexpectedError(err),148 else => |err| return unexpectedError(err),
148 }149 }
149 }150 }
...@@ -246,8 +247,8 @@ pub fn FindFirstFile(dir_path: []const u8, find_file_data: *WIN32_FIND_DATAW) Fi...@@ -246,8 +247,8 @@ pub fn FindFirstFile(dir_path: []const u8, find_file_data: *WIN32_FIND_DATAW) Fi
246247
247 if (handle == INVALID_HANDLE_VALUE) {248 if (handle == INVALID_HANDLE_VALUE) {
248 switch (kernel32.GetLastError()) {249 switch (kernel32.GetLastError()) {
249 ERROR.FILE_NOT_FOUND => return error.FileNotFound,250 .FILE_NOT_FOUND => return error.FileNotFound,
250 ERROR.PATH_NOT_FOUND => return error.FileNotFound,251 .PATH_NOT_FOUND => return error.FileNotFound,
251 else => |err| return unexpectedError(err),252 else => |err| return unexpectedError(err),
252 }253 }
253 }254 }
...@@ -261,7 +262,7 @@ pub const FindNextFileError = error{Unexpected};...@@ -261,7 +262,7 @@ pub const FindNextFileError = error{Unexpected};
261pub fn FindNextFile(handle: HANDLE, find_file_data: *WIN32_FIND_DATAW) FindNextFileError!bool {262pub fn FindNextFile(handle: HANDLE, find_file_data: *WIN32_FIND_DATAW) FindNextFileError!bool {
262 if (kernel32.FindNextFileW(handle, find_file_data) == 0) {263 if (kernel32.FindNextFileW(handle, find_file_data) == 0) {
263 switch (kernel32.GetLastError()) {264 switch (kernel32.GetLastError()) {
264 ERROR.NO_MORE_FILES => return false,265 .NO_MORE_FILES => return false,
265 else => |err| return unexpectedError(err),266 else => |err| return unexpectedError(err),
266 }267 }
267 }268 }
...@@ -278,7 +279,7 @@ pub fn CreateIoCompletionPort(...@@ -278,7 +279,7 @@ pub fn CreateIoCompletionPort(
278) CreateIoCompletionPortError!HANDLE {279) CreateIoCompletionPortError!HANDLE {
279 const handle = kernel32.CreateIoCompletionPort(file_handle, existing_completion_port, completion_key, concurrent_thread_count) orelse {280 const handle = kernel32.CreateIoCompletionPort(file_handle, existing_completion_port, completion_key, concurrent_thread_count) orelse {
280 switch (kernel32.GetLastError()) {281 switch (kernel32.GetLastError()) {
281 ERROR.INVALID_PARAMETER => unreachable,282 .INVALID_PARAMETER => unreachable,
282 else => |err| return unexpectedError(err),283 else => |err| return unexpectedError(err),
283 }284 }
284 };285 };
...@@ -322,9 +323,9 @@ pub fn GetQueuedCompletionStatus(...@@ -322,9 +323,9 @@ pub fn GetQueuedCompletionStatus(
322 dwMilliseconds,323 dwMilliseconds,
323 ) == FALSE) {324 ) == FALSE) {
324 switch (kernel32.GetLastError()) {325 switch (kernel32.GetLastError()) {
325 ERROR.ABANDONED_WAIT_0 => return GetQueuedCompletionStatusResult.Aborted,326 .ABANDONED_WAIT_0 => return GetQueuedCompletionStatusResult.Aborted,
326 ERROR.OPERATION_ABORTED => return GetQueuedCompletionStatusResult.Cancelled,327 .OPERATION_ABORTED => return GetQueuedCompletionStatusResult.Cancelled,
327 ERROR.HANDLE_EOF => return GetQueuedCompletionStatusResult.EOF,328 .HANDLE_EOF => return GetQueuedCompletionStatusResult.EOF,
328 else => |err| {329 else => |err| {
329 if (std.debug.runtime_safety) {330 if (std.debug.runtime_safety) {
330 std.debug.panic("unexpected error: {}\n", .{err});331 std.debug.panic("unexpected error: {}\n", .{err});
...@@ -352,8 +353,8 @@ pub fn ReadFile(in_hFile: HANDLE, buffer: []u8) ReadFileError!usize {...@@ -352,8 +353,8 @@ pub fn ReadFile(in_hFile: HANDLE, buffer: []u8) ReadFileError!usize {
352 var amt_read: DWORD = undefined;353 var amt_read: DWORD = undefined;
353 if (kernel32.ReadFile(in_hFile, buffer.ptr + index, want_read_count, &amt_read, null) == 0) {354 if (kernel32.ReadFile(in_hFile, buffer.ptr + index, want_read_count, &amt_read, null) == 0) {
354 switch (kernel32.GetLastError()) {355 switch (kernel32.GetLastError()) {
355 ERROR.OPERATION_ABORTED => continue,356 .OPERATION_ABORTED => continue,
356 ERROR.BROKEN_PIPE => return index,357 .BROKEN_PIPE => return index,
357 else => |err| return unexpectedError(err),358 else => |err| return unexpectedError(err),
358 }359 }
359 }360 }
...@@ -377,12 +378,12 @@ pub fn WriteFile(handle: HANDLE, bytes: []const u8) WriteFileError!void {...@@ -377,12 +378,12 @@ pub fn WriteFile(handle: HANDLE, bytes: []const u8) WriteFileError!void {
377 // TODO replace this @intCast with a loop that writes all the bytes378 // TODO replace this @intCast with a loop that writes all the bytes
378 if (kernel32.WriteFile(handle, bytes.ptr, @intCast(u32, bytes.len), &bytes_written, null) == 0) {379 if (kernel32.WriteFile(handle, bytes.ptr, @intCast(u32, bytes.len), &bytes_written, null) == 0) {
379 switch (kernel32.GetLastError()) {380 switch (kernel32.GetLastError()) {
380 ERROR.INVALID_USER_BUFFER => return error.SystemResources,381 .INVALID_USER_BUFFER => return error.SystemResources,
381 ERROR.NOT_ENOUGH_MEMORY => return error.SystemResources,382 .NOT_ENOUGH_MEMORY => return error.SystemResources,
382 ERROR.OPERATION_ABORTED => return error.OperationAborted,383 .OPERATION_ABORTED => return error.OperationAborted,
383 ERROR.NOT_ENOUGH_QUOTA => return error.SystemResources,384 .NOT_ENOUGH_QUOTA => return error.SystemResources,
384 ERROR.IO_PENDING => unreachable, // this function is for blocking files only385 .IO_PENDING => unreachable, // this function is for blocking files only
385 ERROR.BROKEN_PIPE => return error.BrokenPipe,386 .BROKEN_PIPE => return error.BrokenPipe,
386 else => |err| return unexpectedError(err),387 else => |err| return unexpectedError(err),
387 }388 }
388 }389 }
...@@ -456,12 +457,12 @@ pub fn DeleteFile(filename: []const u8) DeleteFileError!void {...@@ -456,12 +457,12 @@ pub fn DeleteFile(filename: []const u8) DeleteFileError!void {
456pub fn DeleteFileW(filename: [*:0]const u16) DeleteFileError!void {457pub fn DeleteFileW(filename: [*:0]const u16) DeleteFileError!void {
457 if (kernel32.DeleteFileW(filename) == 0) {458 if (kernel32.DeleteFileW(filename) == 0) {
458 switch (kernel32.GetLastError()) {459 switch (kernel32.GetLastError()) {
459 ERROR.FILE_NOT_FOUND => return error.FileNotFound,460 .FILE_NOT_FOUND => return error.FileNotFound,
460 ERROR.PATH_NOT_FOUND => return error.FileNotFound,461 .PATH_NOT_FOUND => return error.FileNotFound,
461 ERROR.ACCESS_DENIED => return error.AccessDenied,462 .ACCESS_DENIED => return error.AccessDenied,
462 ERROR.FILENAME_EXCED_RANGE => return error.NameTooLong,463 .FILENAME_EXCED_RANGE => return error.NameTooLong,
463 ERROR.INVALID_PARAMETER => return error.NameTooLong,464 .INVALID_PARAMETER => return error.NameTooLong,
464 ERROR.SHARING_VIOLATION => return error.FileBusy,465 .SHARING_VIOLATION => return error.FileBusy,
465 else => |err| return unexpectedError(err),466 else => |err| return unexpectedError(err),
466 }467 }
467 }468 }
...@@ -497,8 +498,8 @@ pub fn CreateDirectory(pathname: []const u8, attrs: ?*SECURITY_ATTRIBUTES) Creat...@@ -497,8 +498,8 @@ pub fn CreateDirectory(pathname: []const u8, attrs: ?*SECURITY_ATTRIBUTES) Creat
497pub fn CreateDirectoryW(pathname: [*:0]const u16, attrs: ?*SECURITY_ATTRIBUTES) CreateDirectoryError!void {498pub fn CreateDirectoryW(pathname: [*:0]const u16, attrs: ?*SECURITY_ATTRIBUTES) CreateDirectoryError!void {
498 if (kernel32.CreateDirectoryW(pathname, attrs) == 0) {499 if (kernel32.CreateDirectoryW(pathname, attrs) == 0) {
499 switch (kernel32.GetLastError()) {500 switch (kernel32.GetLastError()) {
500 ERROR.ALREADY_EXISTS => return error.PathAlreadyExists,501 .ALREADY_EXISTS => return error.PathAlreadyExists,
501 ERROR.PATH_NOT_FOUND => return error.FileNotFound,502 .PATH_NOT_FOUND => return error.FileNotFound,
502 else => |err| return unexpectedError(err),503 else => |err| return unexpectedError(err),
503 }504 }
504 }505 }
...@@ -518,8 +519,8 @@ pub fn RemoveDirectory(dir_path: []const u8) RemoveDirectoryError!void {...@@ -518,8 +519,8 @@ pub fn RemoveDirectory(dir_path: []const u8) RemoveDirectoryError!void {
518pub fn RemoveDirectoryW(dir_path_w: [*:0]const u16) RemoveDirectoryError!void {519pub fn RemoveDirectoryW(dir_path_w: [*:0]const u16) RemoveDirectoryError!void {
519 if (kernel32.RemoveDirectoryW(dir_path_w) == 0) {520 if (kernel32.RemoveDirectoryW(dir_path_w) == 0) {
520 switch (kernel32.GetLastError()) {521 switch (kernel32.GetLastError()) {
521 ERROR.PATH_NOT_FOUND => return error.FileNotFound,522 .PATH_NOT_FOUND => return error.FileNotFound,
522 ERROR.DIR_NOT_EMPTY => return error.DirNotEmpty,523 .DIR_NOT_EMPTY => return error.DirNotEmpty,
523 else => |err| return unexpectedError(err),524 else => |err| return unexpectedError(err),
524 }525 }
525 }526 }
...@@ -550,8 +551,8 @@ pub fn SetFilePointerEx_BEGIN(handle: HANDLE, offset: u64) SetFilePointerError!v...@@ -550,8 +551,8 @@ pub fn SetFilePointerEx_BEGIN(handle: HANDLE, offset: u64) SetFilePointerError!v
550 const ipos = @bitCast(LARGE_INTEGER, offset);551 const ipos = @bitCast(LARGE_INTEGER, offset);
551 if (kernel32.SetFilePointerEx(handle, ipos, null, FILE_BEGIN) == 0) {552 if (kernel32.SetFilePointerEx(handle, ipos, null, FILE_BEGIN) == 0) {
552 switch (kernel32.GetLastError()) {553 switch (kernel32.GetLastError()) {
553 ERROR.INVALID_PARAMETER => unreachable,554 .INVALID_PARAMETER => unreachable,
554 ERROR.INVALID_HANDLE => unreachable,555 .INVALID_HANDLE => unreachable,
555 else => |err| return unexpectedError(err),556 else => |err| return unexpectedError(err),
556 }557 }
557 }558 }
...@@ -561,8 +562,8 @@ pub fn SetFilePointerEx_BEGIN(handle: HANDLE, offset: u64) SetFilePointerError!v...@@ -561,8 +562,8 @@ pub fn SetFilePointerEx_BEGIN(handle: HANDLE, offset: u64) SetFilePointerError!v
561pub fn SetFilePointerEx_CURRENT(handle: HANDLE, offset: i64) SetFilePointerError!void {562pub fn SetFilePointerEx_CURRENT(handle: HANDLE, offset: i64) SetFilePointerError!void {
562 if (kernel32.SetFilePointerEx(handle, offset, null, FILE_CURRENT) == 0) {563 if (kernel32.SetFilePointerEx(handle, offset, null, FILE_CURRENT) == 0) {
563 switch (kernel32.GetLastError()) {564 switch (kernel32.GetLastError()) {
564 ERROR.INVALID_PARAMETER => unreachable,565 .INVALID_PARAMETER => unreachable,
565 ERROR.INVALID_HANDLE => unreachable,566 .INVALID_HANDLE => unreachable,
566 else => |err| return unexpectedError(err),567 else => |err| return unexpectedError(err),
567 }568 }
568 }569 }
...@@ -572,8 +573,8 @@ pub fn SetFilePointerEx_CURRENT(handle: HANDLE, offset: i64) SetFilePointerError...@@ -572,8 +573,8 @@ pub fn SetFilePointerEx_CURRENT(handle: HANDLE, offset: i64) SetFilePointerError
572pub fn SetFilePointerEx_END(handle: HANDLE, offset: i64) SetFilePointerError!void {573pub fn SetFilePointerEx_END(handle: HANDLE, offset: i64) SetFilePointerError!void {
573 if (kernel32.SetFilePointerEx(handle, offset, null, FILE_END) == 0) {574 if (kernel32.SetFilePointerEx(handle, offset, null, FILE_END) == 0) {
574 switch (kernel32.GetLastError()) {575 switch (kernel32.GetLastError()) {
575 ERROR.INVALID_PARAMETER => unreachable,576 .INVALID_PARAMETER => unreachable,
576 ERROR.INVALID_HANDLE => unreachable,577 .INVALID_HANDLE => unreachable,
577 else => |err| return unexpectedError(err),578 else => |err| return unexpectedError(err),
578 }579 }
579 }580 }
...@@ -584,8 +585,8 @@ pub fn SetFilePointerEx_CURRENT_get(handle: HANDLE) SetFilePointerError!u64 {...@@ -584,8 +585,8 @@ pub fn SetFilePointerEx_CURRENT_get(handle: HANDLE) SetFilePointerError!u64 {
584 var result: LARGE_INTEGER = undefined;585 var result: LARGE_INTEGER = undefined;
585 if (kernel32.SetFilePointerEx(handle, 0, &result, FILE_CURRENT) == 0) {586 if (kernel32.SetFilePointerEx(handle, 0, &result, FILE_CURRENT) == 0) {
586 switch (kernel32.GetLastError()) {587 switch (kernel32.GetLastError()) {
587 ERROR.INVALID_PARAMETER => unreachable,588 .INVALID_PARAMETER => unreachable,
588 ERROR.INVALID_HANDLE => unreachable,589 .INVALID_HANDLE => unreachable,
589 else => |err| return unexpectedError(err),590 else => |err| return unexpectedError(err),
590 }591 }
591 }592 }
...@@ -610,11 +611,11 @@ pub fn GetFinalPathNameByHandleW(...@@ -610,11 +611,11 @@ pub fn GetFinalPathNameByHandleW(
610 const rc = kernel32.GetFinalPathNameByHandleW(hFile, buf_ptr, buf_len, flags);611 const rc = kernel32.GetFinalPathNameByHandleW(hFile, buf_ptr, buf_len, flags);
611 if (rc == 0) {612 if (rc == 0) {
612 switch (kernel32.GetLastError()) {613 switch (kernel32.GetLastError()) {
613 ERROR.FILE_NOT_FOUND => return error.FileNotFound,614 .FILE_NOT_FOUND => return error.FileNotFound,
614 ERROR.PATH_NOT_FOUND => return error.FileNotFound,615 .PATH_NOT_FOUND => return error.FileNotFound,
615 ERROR.NOT_ENOUGH_MEMORY => return error.SystemResources,616 .NOT_ENOUGH_MEMORY => return error.SystemResources,
616 ERROR.FILENAME_EXCED_RANGE => return error.NameTooLong,617 .FILENAME_EXCED_RANGE => return error.NameTooLong,
617 ERROR.INVALID_PARAMETER => unreachable,618 .INVALID_PARAMETER => unreachable,
618 else => |err| return unexpectedError(err),619 else => |err| return unexpectedError(err),
619 }620 }
620 }621 }
...@@ -648,9 +649,9 @@ pub fn GetFileAttributesW(lpFileName: [*:0]const u16) GetFileAttributesError!DWO...@@ -648,9 +649,9 @@ pub fn GetFileAttributesW(lpFileName: [*:0]const u16) GetFileAttributesError!DWO
648 const rc = kernel32.GetFileAttributesW(lpFileName);649 const rc = kernel32.GetFileAttributesW(lpFileName);
649 if (rc == INVALID_FILE_ATTRIBUTES) {650 if (rc == INVALID_FILE_ATTRIBUTES) {
650 switch (kernel32.GetLastError()) {651 switch (kernel32.GetLastError()) {
651 ERROR.FILE_NOT_FOUND => return error.FileNotFound,652 .FILE_NOT_FOUND => return error.FileNotFound,
652 ERROR.PATH_NOT_FOUND => return error.FileNotFound,653 .PATH_NOT_FOUND => return error.FileNotFound,
653 ERROR.ACCESS_DENIED => return error.PermissionDenied,654 .ACCESS_DENIED => return error.PermissionDenied,
654 else => |err| return unexpectedError(err),655 else => |err| return unexpectedError(err),
655 }656 }
656 }657 }
...@@ -661,7 +662,7 @@ pub fn WSAStartup(majorVersion: u8, minorVersion: u8) !ws2_32.WSADATA {...@@ -661,7 +662,7 @@ pub fn WSAStartup(majorVersion: u8, minorVersion: u8) !ws2_32.WSADATA {
661 var wsadata: ws2_32.WSADATA = undefined;662 var wsadata: ws2_32.WSADATA = undefined;
662 return switch (ws2_32.WSAStartup((@as(WORD, minorVersion) << 8) | majorVersion, &wsadata)) {663 return switch (ws2_32.WSAStartup((@as(WORD, minorVersion) << 8) | majorVersion, &wsadata)) {
663 0 => wsadata,664 0 => wsadata,
664 else => |err| unexpectedWSAError(err),665 else => |err| unexpectedWSAError(@intToEnum(WinsockError, err)),
665 };666 };
666}667}
667668
...@@ -686,10 +687,10 @@ pub fn WSASocketW(...@@ -686,10 +687,10 @@ pub fn WSASocketW(
686 const rc = ws2_32.WSASocketW(af, socket_type, protocol, protocolInfo, g, dwFlags);687 const rc = ws2_32.WSASocketW(af, socket_type, protocol, protocolInfo, g, dwFlags);
687 if (rc == ws2_32.INVALID_SOCKET) {688 if (rc == ws2_32.INVALID_SOCKET) {
688 switch (ws2_32.WSAGetLastError()) {689 switch (ws2_32.WSAGetLastError()) {
689 ws2_32.WSAEAFNOSUPPORT => return error.AddressFamilyNotSupported,690 .WSAEAFNOSUPPORT => return error.AddressFamilyNotSupported,
690 ws2_32.WSAEMFILE => return error.ProcessFdQuotaExceeded,691 .WSAEMFILE => return error.ProcessFdQuotaExceeded,
691 ws2_32.WSAENOBUFS => return error.SystemResources,692 .WSAENOBUFS => return error.SystemResources,
692 ws2_32.WSAEPROTONOSUPPORT => return error.ProtocolNotSupported,693 .WSAEPROTONOSUPPORT => return error.ProtocolNotSupported,
693 else => |err| return unexpectedWSAError(err),694 else => |err| return unexpectedWSAError(err),
694 }695 }
695 }696 }
...@@ -800,7 +801,7 @@ pub fn GetEnvironmentVariableW(lpName: LPWSTR, lpBuffer: [*]u16, nSize: DWORD) G...@@ -800,7 +801,7 @@ pub fn GetEnvironmentVariableW(lpName: LPWSTR, lpBuffer: [*]u16, nSize: DWORD) G
800 const rc = kernel32.GetEnvironmentVariableW(lpName, lpBuffer, nSize);801 const rc = kernel32.GetEnvironmentVariableW(lpName, lpBuffer, nSize);
801 if (rc == 0) {802 if (rc == 0) {
802 switch (kernel32.GetLastError()) {803 switch (kernel32.GetLastError()) {
803 ERROR.ENVVAR_NOT_FOUND => return error.EnvironmentVariableNotFound,804 .ENVVAR_NOT_FOUND => return error.EnvironmentVariableNotFound,
804 else => |err| return unexpectedError(err),805 else => |err| return unexpectedError(err),
805 }806 }
806 }807 }
...@@ -839,11 +840,11 @@ pub fn CreateProcessW(...@@ -839,11 +840,11 @@ pub fn CreateProcessW(
839 lpProcessInformation,840 lpProcessInformation,
840 ) == 0) {841 ) == 0) {
841 switch (kernel32.GetLastError()) {842 switch (kernel32.GetLastError()) {
842 ERROR.FILE_NOT_FOUND => return error.FileNotFound,843 .FILE_NOT_FOUND => return error.FileNotFound,
843 ERROR.PATH_NOT_FOUND => return error.FileNotFound,844 .PATH_NOT_FOUND => return error.FileNotFound,
844 ERROR.ACCESS_DENIED => return error.AccessDenied,845 .ACCESS_DENIED => return error.AccessDenied,
845 ERROR.INVALID_PARAMETER => unreachable,846 .INVALID_PARAMETER => unreachable,
846 ERROR.INVALID_NAME => return error.InvalidName,847 .INVALID_NAME => return error.InvalidName,
847 else => |err| return unexpectedError(err),848 else => |err| return unexpectedError(err),
848 }849 }
849 }850 }
...@@ -857,9 +858,9 @@ pub const LoadLibraryError = error{...@@ -857,9 +858,9 @@ pub const LoadLibraryError = error{
857pub fn LoadLibraryW(lpLibFileName: [*:0]const u16) LoadLibraryError!HMODULE {858pub fn LoadLibraryW(lpLibFileName: [*:0]const u16) LoadLibraryError!HMODULE {
858 return kernel32.LoadLibraryW(lpLibFileName) orelse {859 return kernel32.LoadLibraryW(lpLibFileName) orelse {
859 switch (kernel32.GetLastError()) {860 switch (kernel32.GetLastError()) {
860 ERROR.FILE_NOT_FOUND => return error.FileNotFound,861 .FILE_NOT_FOUND => return error.FileNotFound,
861 ERROR.PATH_NOT_FOUND => return error.FileNotFound,862 .PATH_NOT_FOUND => return error.FileNotFound,
862 ERROR.MOD_NOT_FOUND => return error.FileNotFound,863 .MOD_NOT_FOUND => return error.FileNotFound,
863 else => |err| return unexpectedError(err),864 else => |err| return unexpectedError(err),
864 }865 }
865 };866 };
...@@ -1036,28 +1037,28 @@ inline fn MAKELANGID(p: c_ushort, s: c_ushort) LANGID {...@@ -1036,28 +1037,28 @@ inline fn MAKELANGID(p: c_ushort, s: c_ushort) LANGID {
10361037
1037/// Call this when you made a windows DLL call or something that does SetLastError1038/// Call this when you made a windows DLL call or something that does SetLastError
1038/// and you get an unexpected error.1039/// and you get an unexpected error.
1039pub fn unexpectedError(err: DWORD) std.os.UnexpectedError {1040pub fn unexpectedError(err: Win32Error) std.os.UnexpectedError {
1040 if (std.os.unexpected_error_tracing) {1041 if (std.os.unexpected_error_tracing) {
1041 // 614 is the length of the longest windows error desciption1042 // 614 is the length of the longest windows error desciption
1042 var buf_u16: [614]u16 = undefined;1043 var buf_u16: [614]u16 = undefined;
1043 var buf_u8: [614]u8 = undefined;1044 var buf_u8: [614]u8 = undefined;
1044 var len = kernel32.FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, null, err, MAKELANGID(LANG.NEUTRAL, SUBLANG.DEFAULT), buf_u16[0..].ptr, buf_u16.len / @sizeOf(TCHAR), null);1045 var len = kernel32.FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, null, err, MAKELANGID(LANG.NEUTRAL, SUBLANG.DEFAULT), buf_u16[0..].ptr, buf_u16.len / @sizeOf(TCHAR), null);
1045 _ = std.unicode.utf16leToUtf8(&buf_u8, buf_u16[0..len]) catch unreachable;1046 _ = std.unicode.utf16leToUtf8(&buf_u8, buf_u16[0..len]) catch unreachable;
1046 std.debug.warn("error.Unexpected: GetLastError({}): {}\n", .{ err, buf_u8[0..len] });1047 std.debug.warn("error.Unexpected: GetLastError({}): {}\n", .{ @enumToInt(err), buf_u8[0..len] });
1047 std.debug.dumpCurrentStackTrace(null);1048 std.debug.dumpCurrentStackTrace(null);
1048 }1049 }
1049 return error.Unexpected;1050 return error.Unexpected;
1050}1051}
10511052
1052pub fn unexpectedWSAError(err: c_int) std.os.UnexpectedError {1053pub fn unexpectedWSAError(err: WinsockError) std.os.UnexpectedError {
1053 return unexpectedError(@intCast(DWORD, err));1054 return unexpectedError(@intToEnum(Win32Error, @enumToInt(err)));
1054}1055}
10551056
1056/// Call this when you made a windows NtDll call1057/// Call this when you made a windows NtDll call
1057/// and you get an unexpected status.1058/// and you get an unexpected status.
1058pub fn unexpectedStatus(status: NTSTATUS) std.os.UnexpectedError {1059pub fn unexpectedStatus(status: NTSTATUS) std.os.UnexpectedError {
1059 if (std.os.unexpected_error_tracing) {1060 if (std.os.unexpected_error_tracing) {
1060 std.debug.warn("error.Unexpected NTSTATUS=0x{x}\n", .{status});1061 std.debug.warn("error.Unexpected NTSTATUS=0x{x}\n", .{@enumToInt(status)});
1061 std.debug.dumpCurrentStackTrace(null);1062 std.debug.dumpCurrentStackTrace(null);
1062 }1063 }
1063 return error.Unexpected;1064 return error.Unexpected;
lib/std/os/windows/bits.zig+314-5
...@@ -5,8 +5,8 @@ const std = @import("../../std.zig");...@@ -5,8 +5,8 @@ const std = @import("../../std.zig");
5const assert = std.debug.assert;5const assert = std.debug.assert;
6const maxInt = std.math.maxInt;6const maxInt = std.math.maxInt;
77
8pub const ERROR = @import("error.zig");8pub usingnamespace @import("win32error.zig");
9pub const STATUS = @import("status.zig");9pub usingnamespace @import("ntstatus.zig");
10pub const LANG = @import("lang.zig");10pub const LANG = @import("lang.zig");
11pub const SUBLANG = @import("sublang.zig");11pub const SUBLANG = @import("sublang.zig");
1212
...@@ -23,7 +23,6 @@ pub const BOOL = c_int;...@@ -23,7 +23,6 @@ pub const BOOL = c_int;
23pub const BOOLEAN = BYTE;23pub const BOOLEAN = BYTE;
24pub const BYTE = u8;24pub const BYTE = u8;
25pub const CHAR = u8;25pub const CHAR = u8;
26pub const DWORD = u32;
27pub const FLOAT = f32;26pub const FLOAT = f32;
28pub const HANDLE = *c_void;27pub const HANDLE = *c_void;
29pub const HCRYPTPROV = ULONG_PTR;28pub const HCRYPTPROV = ULONG_PTR;
...@@ -52,6 +51,8 @@ pub const DWORD_PTR = ULONG_PTR;...@@ -52,6 +51,8 @@ pub const DWORD_PTR = ULONG_PTR;
52pub const UNICODE = false;51pub const UNICODE = false;
53pub const WCHAR = u16;52pub const WCHAR = u16;
54pub const WORD = u16;53pub const WORD = u16;
54pub const DWORD = u32;
55pub const DWORD64 = u64;
55pub const LARGE_INTEGER = i64;56pub const LARGE_INTEGER = i64;
56pub const USHORT = u16;57pub const USHORT = u16;
57pub const SHORT = i16;58pub const SHORT = i16;
...@@ -61,7 +62,6 @@ pub const ULONGLONG = u64;...@@ -61,7 +62,6 @@ pub const ULONGLONG = u64;
61pub const LONGLONG = i64;62pub const LONGLONG = i64;
62pub const HLOCAL = HANDLE;63pub const HLOCAL = HANDLE;
63pub const LANGID = c_ushort;64pub const LANGID = c_ushort;
64pub const NTSTATUS = ULONG;
6565
66pub const va_list = *@OpaqueType();66pub const va_list = *@OpaqueType();
6767
...@@ -887,9 +887,236 @@ pub const EXCEPTION_RECORD = extern struct {...@@ -887,9 +887,236 @@ pub const EXCEPTION_RECORD = extern struct {
887 ExceptionInformation: [15]usize,887 ExceptionInformation: [15]usize,
888};888};
889889
890pub usingnamespace switch (builtin.arch) {
891 .i386 => struct {
892 pub const FLOATING_SAVE_AREA = extern struct {
893 ControlWord: DWORD,
894 StatusWord: DWORD,
895 TagWord: DWORD,
896 ErrorOffset: DWORD,
897 ErrorSelector: DWORD,
898 DataOffset: DWORD,
899 DataSelector: DWORD,
900 RegisterArea: [80]BYTE,
901 Cr0NpxState: DWORD,
902 };
903
904 pub const CONTEXT = extern struct {
905 ContextFlags: DWORD,
906 Dr0: DWORD,
907 Dr1: DWORD,
908 Dr2: DWORD,
909 Dr3: DWORD,
910 Dr6: DWORD,
911 Dr7: DWORD,
912 FloatSave: FLOATING_SAVE_AREA,
913 SegGs: DWORD,
914 SegFs: DWORD,
915 SegEs: DWORD,
916 SegDs: DWORD,
917 Edi: DWORD,
918 Esi: DWORD,
919 Ebx: DWORD,
920 Edx: DWORD,
921 Ecx: DWORD,
922 Eax: DWORD,
923 Ebp: DWORD,
924 Eip: DWORD,
925 SegCs: DWORD,
926 EFlags: DWORD,
927 Esp: DWORD,
928 SegSs: DWORD,
929 ExtendedRegisters: [512]BYTE,
930
931 pub fn getRegs(ctx: *const CONTEXT) struct { bp: usize, ip: usize } {
932 return .{ .bp = ctx.Ebp, .ip = ctx.Eip };
933 }
934 };
935
936 pub const PCONTEXT = *CONTEXT;
937 },
938 .x86_64 => struct {
939 pub const M128A = extern struct {
940 Low: ULONGLONG,
941 High: LONGLONG,
942 };
943
944 pub const XMM_SAVE_AREA32 = extern struct {
945 ControlWord: WORD,
946 StatusWord: WORD,
947 TagWord: BYTE,
948 Reserved1: BYTE,
949 ErrorOpcode: WORD,
950 ErrorOffset: DWORD,
951 ErrorSelector: WORD,
952 Reserved2: WORD,
953 DataOffset: DWORD,
954 DataSelector: WORD,
955 Reserved3: WORD,
956 MxCsr: DWORD,
957 MxCsr_Mask: DWORD,
958 FloatRegisters: [8]M128A,
959 XmmRegisters: [16]M128A,
960 Reserved4: [96]BYTE,
961 };
962
963 pub const CONTEXT = extern struct {
964 P1Home: DWORD64,
965 P2Home: DWORD64,
966 P3Home: DWORD64,
967 P4Home: DWORD64,
968 P5Home: DWORD64,
969 P6Home: DWORD64,
970 ContextFlags: DWORD,
971 MxCsr: DWORD,
972 SegCs: WORD,
973 SegDs: WORD,
974 SegEs: WORD,
975 SegFs: WORD,
976 SegGs: WORD,
977 SegSs: WORD,
978 EFlags: DWORD,
979 Dr0: DWORD64,
980 Dr1: DWORD64,
981 Dr2: DWORD64,
982 Dr3: DWORD64,
983 Dr6: DWORD64,
984 Dr7: DWORD64,
985 Rax: DWORD64,
986 Rcx: DWORD64,
987 Rdx: DWORD64,
988 Rbx: DWORD64,
989 Rsp: DWORD64,
990 Rbp: DWORD64,
991 Rsi: DWORD64,
992 Rdi: DWORD64,
993 R8: DWORD64,
994 R9: DWORD64,
995 R10: DWORD64,
996 R11: DWORD64,
997 R12: DWORD64,
998 R13: DWORD64,
999 R14: DWORD64,
1000 R15: DWORD64,
1001 Rip: DWORD64,
1002 DUMMYUNIONNAME: extern union {
1003 FltSave: XMM_SAVE_AREA32,
1004 FloatSave: XMM_SAVE_AREA32,
1005 DUMMYSTRUCTNAME: extern struct {
1006 Header: [2]M128A,
1007 Legacy: [8]M128A,
1008 Xmm0: M128A,
1009 Xmm1: M128A,
1010 Xmm2: M128A,
1011 Xmm3: M128A,
1012 Xmm4: M128A,
1013 Xmm5: M128A,
1014 Xmm6: M128A,
1015 Xmm7: M128A,
1016 Xmm8: M128A,
1017 Xmm9: M128A,
1018 Xmm10: M128A,
1019 Xmm11: M128A,
1020 Xmm12: M128A,
1021 Xmm13: M128A,
1022 Xmm14: M128A,
1023 Xmm15: M128A,
1024 },
1025 },
1026 VectorRegister: [26]M128A,
1027 VectorControl: DWORD64,
1028 DebugControl: DWORD64,
1029 LastBranchToRip: DWORD64,
1030 LastBranchFromRip: DWORD64,
1031 LastExceptionToRip: DWORD64,
1032 LastExceptionFromRip: DWORD64,
1033
1034 pub fn getRegs(ctx: *const CONTEXT) struct { bp: usize, ip: usize } {
1035 return .{ .bp = ctx.Rbp, .ip = ctx.Rip };
1036 }
1037 };
1038
1039 pub const PCONTEXT = *CONTEXT;
1040 },
1041 .aarch64 => struct {
1042 pub const NEON128 = extern union {
1043 DUMMYSTRUCTNAME: extern struct {
1044 Low: ULONGLONG,
1045 High: LONGLONG,
1046 },
1047 D: [2]f64,
1048 S: [4]f32,
1049 H: [8]WORD,
1050 B: [16]BYTE,
1051 };
1052
1053 pub const CONTEXT = extern struct {
1054 ContextFlags: ULONG,
1055 Cpsr: ULONG,
1056 DUMMYUNIONNAME: extern union {
1057 DUMMYSTRUCTNAME: extern struct {
1058 X0: DWORD64,
1059 X1: DWORD64,
1060 X2: DWORD64,
1061 X3: DWORD64,
1062 X4: DWORD64,
1063 X5: DWORD64,
1064 X6: DWORD64,
1065 X7: DWORD64,
1066 X8: DWORD64,
1067 X9: DWORD64,
1068 X10: DWORD64,
1069 X11: DWORD64,
1070 X12: DWORD64,
1071 X13: DWORD64,
1072 X14: DWORD64,
1073 X15: DWORD64,
1074 X16: DWORD64,
1075 X17: DWORD64,
1076 X18: DWORD64,
1077 X19: DWORD64,
1078 X20: DWORD64,
1079 X21: DWORD64,
1080 X22: DWORD64,
1081 X23: DWORD64,
1082 X24: DWORD64,
1083 X25: DWORD64,
1084 X26: DWORD64,
1085 X27: DWORD64,
1086 X28: DWORD64,
1087 Fp: DWORD64,
1088 Lr: DWORD64,
1089 },
1090 X: [31]DWORD64,
1091 },
1092 Sp: DWORD64,
1093 Pc: DWORD64,
1094 V: [32]NEON128,
1095 Fpcr: DWORD,
1096 Fpsr: DWORD,
1097 Bcr: [8]DWORD,
1098 Bvr: [8]DWORD64,
1099 Wcr: [2]DWORD,
1100 Wvr: [2]DWORD64,
1101
1102 pub fn getRegs(ctx: *const CONTEXT) struct { bp: usize, ip: usize } {
1103 return .{
1104 .bp = ctx.DUMMYUNIONNAME.DUMMYSTRUCTNAME.Fp,
1105 .ip = ctx.Pc,
1106 };
1107 }
1108 };
1109
1110 pub const PCONTEXT = *CONTEXT;
1111 },
1112 else => struct {
1113 pub const PCONTEXT = *c_void;
1114 },
1115};
1116
890pub const EXCEPTION_POINTERS = extern struct {1117pub const EXCEPTION_POINTERS = extern struct {
891 ExceptionRecord: *EXCEPTION_RECORD,1118 ExceptionRecord: *EXCEPTION_RECORD,
892 ContextRecord: *c_void,1119 ContextRecord: PCONTEXT,
893};1120};
8941121
895pub const VECTORED_EXCEPTION_HANDLER = fn (ExceptionInfo: *EXCEPTION_POINTERS) callconv(.Stdcall) c_long;1122pub const VECTORED_EXCEPTION_HANDLER = fn (ExceptionInfo: *EXCEPTION_POINTERS) callconv(.Stdcall) c_long;
...@@ -1012,3 +1239,85 @@ pub const CURDIR = extern struct {...@@ -1012,3 +1239,85 @@ pub const CURDIR = extern struct {
1012};1239};
10131240
1014pub const DUPLICATE_SAME_ACCESS = 2;1241pub const DUPLICATE_SAME_ACCESS = 2;
1242
1243pub const MODULEINFO = extern struct {
1244 lpBaseOfDll: LPVOID,
1245 SizeOfImage: DWORD,
1246 EntryPoint: LPVOID,
1247};
1248pub const LPMODULEINFO = *MODULEINFO;
1249
1250pub const PSAPI_WS_WATCH_INFORMATION = extern struct {
1251 FaultingPc: LPVOID,
1252 FaultingVa: LPVOID,
1253};
1254pub const PPSAPI_WS_WATCH_INFORMATION = *PSAPI_WS_WATCH_INFORMATION;
1255
1256pub const PROCESS_MEMORY_COUNTERS = extern struct {
1257 cb: DWORD,
1258 PageFaultCount: DWORD,
1259 PeakWorkingSetSize: SIZE_T,
1260 WorkingSetSize: SIZE_T,
1261 QuotaPeakPagedPoolUsage: SIZE_T,
1262 QuotaPagedPoolUsage: SIZE_T,
1263 QuotaPeakNonPagedPoolUsage: SIZE_T,
1264 QuotaNonPagedPoolUsage: SIZE_T,
1265 PagefileUsage: SIZE_T,
1266 PeakPagefileUsage: SIZE_T,
1267};
1268pub const PPROCESS_MEMORY_COUNTERS = *PROCESS_MEMORY_COUNTERS;
1269
1270pub const PROCESS_MEMORY_COUNTERS_EX = extern struct {
1271 cb: DWORD,
1272 PageFaultCount: DWORD,
1273 PeakWorkingSetSize: SIZE_T,
1274 WorkingSetSize: SIZE_T,
1275 QuotaPeakPagedPoolUsage: SIZE_T,
1276 QuotaPagedPoolUsage: SIZE_T,
1277 QuotaPeakNonPagedPoolUsage: SIZE_T,
1278 QuotaNonPagedPoolUsage: SIZE_T,
1279 PagefileUsage: SIZE_T,
1280 PeakPagefileUsage: SIZE_T,
1281 PrivateUsage: SIZE_T,
1282};
1283pub const PPROCESS_MEMORY_COUNTERS_EX = *PROCESS_MEMORY_COUNTERS_EX;
1284
1285pub const PERFORMANCE_INFORMATION = extern struct {
1286 cb: DWORD,
1287 CommitTotal: SIZE_T,
1288 CommitLimit: SIZE_T,
1289 CommitPeak: SIZE_T,
1290 PhysicalTotal: SIZE_T,
1291 PhysicalAvailable: SIZE_T,
1292 SystemCache: SIZE_T,
1293 KernelTotal: SIZE_T,
1294 KernelPaged: SIZE_T,
1295 KernelNonpaged: SIZE_T,
1296 PageSize: SIZE_T,
1297 HandleCount: DWORD,
1298 ProcessCount: DWORD,
1299 ThreadCount: DWORD,
1300};
1301pub const PPERFORMANCE_INFORMATION = *PERFORMANCE_INFORMATION;
1302
1303pub const PERFORMACE_INFORMATION = PERFORMANCE_INFORMATION;
1304pub const PPERFORMACE_INFORMATION = *PERFORMANCE_INFORMATION;
1305
1306pub const ENUM_PAGE_FILE_INFORMATION = extern struct {
1307 cb: DWORD,
1308 Reserved: DWORD,
1309 TotalSize: SIZE_T,
1310 TotalInUse: SIZE_T,
1311 PeakUsage: SIZE_T,
1312};
1313pub const PENUM_PAGE_FILE_INFORMATION = *ENUM_PAGE_FILE_INFORMATION;
1314
1315pub const PENUM_PAGE_FILE_CALLBACKW = ?fn (?LPVOID, PENUM_PAGE_FILE_INFORMATION, LPCWSTR) callconv(.C) BOOL;
1316pub const PENUM_PAGE_FILE_CALLBACKA = ?fn (?LPVOID, PENUM_PAGE_FILE_INFORMATION, LPCSTR) callconv(.C) BOOL;
1317
1318pub const PSAPI_WS_WATCH_INFORMATION_EX = extern struct {
1319 BasicInfo: PSAPI_WS_WATCH_INFORMATION,
1320 FaultingThreadId: ULONG_PTR,
1321 Flags: ULONG_PTR,
1322};
1323pub const PPSAPI_WS_WATCH_INFORMATION_EX = *PSAPI_WS_WATCH_INFORMATION_EX;
lib/std/os/windows/error.zig deleted-3567
...@@ -1,3567 +0,0 @@
1/// The operation completed successfully.
2pub const SUCCESS = 0;
3
4/// Incorrect function.
5pub const INVALID_FUNCTION = 1;
6
7/// The system cannot find the file specified.
8pub const FILE_NOT_FOUND = 2;
9
10/// The system cannot find the path specified.
11pub const PATH_NOT_FOUND = 3;
12
13/// The system cannot open the file.
14pub const TOO_MANY_OPEN_FILES = 4;
15
16/// Access is denied.
17pub const ACCESS_DENIED = 5;
18
19/// The handle is invalid.
20pub const INVALID_HANDLE = 6;
21
22/// The storage control blocks were destroyed.
23pub const ARENA_TRASHED = 7;
24
25/// Not enough storage is available to process this command.
26pub const NOT_ENOUGH_MEMORY = 8;
27
28/// The storage control block address is invalid.
29pub const INVALID_BLOCK = 9;
30
31/// The environment is incorrect.
32pub const BAD_ENVIRONMENT = 10;
33
34/// An attempt was made to load a program with an incorrect format.
35pub const BAD_FORMAT = 11;
36
37/// The access code is invalid.
38pub const INVALID_ACCESS = 12;
39
40/// The data is invalid.
41pub const INVALID_DATA = 13;
42
43/// Not enough storage is available to complete this operation.
44pub const OUTOFMEMORY = 14;
45
46/// The system cannot find the drive specified.
47pub const INVALID_DRIVE = 15;
48
49/// The directory cannot be removed.
50pub const CURRENT_DIRECTORY = 16;
51
52/// The system cannot move the file to a different disk drive.
53pub const NOT_SAME_DEVICE = 17;
54
55/// There are no more files.
56pub const NO_MORE_FILES = 18;
57
58/// The media is write protected.
59pub const WRITE_PROTECT = 19;
60
61/// The system cannot find the device specified.
62pub const BAD_UNIT = 20;
63
64/// The device is not ready.
65pub const NOT_READY = 21;
66
67/// The device does not recognize the command.
68pub const BAD_COMMAND = 22;
69
70/// Data error (cyclic redundancy check).
71pub const CRC = 23;
72
73/// The program issued a command but the command length is incorrect.
74pub const BAD_LENGTH = 24;
75
76/// The drive cannot locate a specific area or track on the disk.
77pub const SEEK = 25;
78
79/// The specified disk or diskette cannot be accessed.
80pub const NOT_DOS_DISK = 26;
81
82/// The drive cannot find the sector requested.
83pub const SECTOR_NOT_FOUND = 27;
84
85/// The printer is out of paper.
86pub const OUT_OF_PAPER = 28;
87
88/// The system cannot write to the specified device.
89pub const WRITE_FAULT = 29;
90
91/// The system cannot read from the specified device.
92pub const READ_FAULT = 30;
93
94/// A device attached to the system is not functioning.
95pub const GEN_FAILURE = 31;
96
97/// The process cannot access the file because it is being used by another process.
98pub const SHARING_VIOLATION = 32;
99
100/// The process cannot access the file because another process has locked a portion of the file.
101pub const LOCK_VIOLATION = 33;
102
103/// The wrong diskette is in the drive. Insert %2 (Volume Serial Number: %3) into drive %1.
104pub const WRONG_DISK = 34;
105
106/// Too many files opened for sharing.
107pub const SHARING_BUFFER_EXCEEDED = 36;
108
109/// Reached the end of the file.
110pub const HANDLE_EOF = 38;
111
112/// The disk is full.
113pub const HANDLE_DISK_FULL = 39;
114
115/// The request is not supported.
116pub const NOT_SUPPORTED = 50;
117
118/// Windows cannot find the network path. Verify that the network path is correct and the destination computer is not busy or turned off. If Windows still cannot find the network path, contact your network administrator.
119pub const REM_NOT_LIST = 51;
120
121/// You were not connected because a duplicate name exists on the network. If joining a domain, go to System in Control Panel to change the computer name and try again. If joining a workgroup, choose another workgroup name.
122pub const DUP_NAME = 52;
123
124/// The network path was not found.
125pub const BAD_NETPATH = 53;
126
127/// The network is busy.
128pub const NETWORK_BUSY = 54;
129
130/// The specified network resource or device is no longer available.
131pub const DEV_NOT_EXIST = 55;
132
133/// The network BIOS command limit has been reached.
134pub const TOO_MANY_CMDS = 56;
135
136/// A network adapter hardware error occurred.
137pub const ADAP_HDW_ERR = 57;
138
139/// The specified server cannot perform the requested operation.
140pub const BAD_NET_RESP = 58;
141
142/// An unexpected network error occurred.
143pub const UNEXP_NET_ERR = 59;
144
145/// The remote adapter is not compatible.
146pub const BAD_REM_ADAP = 60;
147
148/// The printer queue is full.
149pub const PRINTQ_FULL = 61;
150
151/// Space to store the file waiting to be printed is not available on the server.
152pub const NO_SPOOL_SPACE = 62;
153
154/// Your file waiting to be printed was deleted.
155pub const PRINT_CANCELLED = 63;
156
157/// The specified network name is no longer available.
158pub const NETNAME_DELETED = 64;
159
160/// Network access is denied.
161pub const NETWORK_ACCESS_DENIED = 65;
162
163/// The network resource type is not correct.
164pub const BAD_DEV_TYPE = 66;
165
166/// The network name cannot be found.
167pub const BAD_NET_NAME = 67;
168
169/// The name limit for the local computer network adapter card was exceeded.
170pub const TOO_MANY_NAMES = 68;
171
172/// The network BIOS session limit was exceeded.
173pub const TOO_MANY_SESS = 69;
174
175/// The remote server has been paused or is in the process of being started.
176pub const SHARING_PAUSED = 70;
177
178/// No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept.
179pub const REQ_NOT_ACCEP = 71;
180
181/// The specified printer or disk device has been paused.
182pub const REDIR_PAUSED = 72;
183
184/// The file exists.
185pub const FILE_EXISTS = 80;
186
187/// The directory or file cannot be created.
188pub const CANNOT_MAKE = 82;
189
190/// Fail on INT 24.
191pub const FAIL_I24 = 83;
192
193/// Storage to process this request is not available.
194pub const OUT_OF_STRUCTURES = 84;
195
196/// The local device name is already in use.
197pub const ALREADY_ASSIGNED = 85;
198
199/// The specified network password is not correct.
200pub const INVALID_PASSWORD = 86;
201
202/// The parameter is incorrect.
203pub const INVALID_PARAMETER = 87;
204
205/// A write fault occurred on the network.
206pub const NET_WRITE_FAULT = 88;
207
208/// The system cannot start another process at this time.
209pub const NO_PROC_SLOTS = 89;
210
211/// Cannot create another system semaphore.
212pub const TOO_MANY_SEMAPHORES = 100;
213
214/// The exclusive semaphore is owned by another process.
215pub const EXCL_SEM_ALREADY_OWNED = 101;
216
217/// The semaphore is set and cannot be closed.
218pub const SEM_IS_SET = 102;
219
220/// The semaphore cannot be set again.
221pub const TOO_MANY_SEM_REQUESTS = 103;
222
223/// Cannot request exclusive semaphores at interrupt time.
224pub const INVALID_AT_INTERRUPT_TIME = 104;
225
226/// The previous ownership of this semaphore has ended.
227pub const SEM_OWNER_DIED = 105;
228
229/// Insert the diskette for drive %1.
230pub const SEM_USER_LIMIT = 106;
231
232/// The program stopped because an alternate diskette was not inserted.
233pub const DISK_CHANGE = 107;
234
235/// The disk is in use or locked by another process.
236pub const DRIVE_LOCKED = 108;
237
238/// The pipe has been ended.
239pub const BROKEN_PIPE = 109;
240
241/// The system cannot open the device or file specified.
242pub const OPEN_FAILED = 110;
243
244/// The file name is too long.
245pub const BUFFER_OVERFLOW = 111;
246
247/// There is not enough space on the disk.
248pub const DISK_FULL = 112;
249
250/// No more internal file identifiers available.
251pub const NO_MORE_SEARCH_HANDLES = 113;
252
253/// The target internal file identifier is incorrect.
254pub const INVALID_TARGET_HANDLE = 114;
255
256/// The IOCTL call made by the application program is not correct.
257pub const INVALID_CATEGORY = 117;
258
259/// The verify-on-write switch parameter value is not correct.
260pub const INVALID_VERIFY_SWITCH = 118;
261
262/// The system does not support the command requested.
263pub const BAD_DRIVER_LEVEL = 119;
264
265/// This function is not supported on this system.
266pub const CALL_NOT_IMPLEMENTED = 120;
267
268/// The semaphore timeout period has expired.
269pub const SEM_TIMEOUT = 121;
270
271/// The data area passed to a system call is too small.
272pub const INSUFFICIENT_BUFFER = 122;
273
274/// The filename, directory name, or volume label syntax is incorrect.
275pub const INVALID_NAME = 123;
276
277/// The system call level is not correct.
278pub const INVALID_LEVEL = 124;
279
280/// The disk has no volume label.
281pub const NO_VOLUME_LABEL = 125;
282
283/// The specified module could not be found.
284pub const MOD_NOT_FOUND = 126;
285
286/// The specified procedure could not be found.
287pub const PROC_NOT_FOUND = 127;
288
289/// There are no child processes to wait for.
290pub const WAIT_NO_CHILDREN = 128;
291
292/// The %1 application cannot be run in Win32 mode.
293pub const CHILD_NOT_COMPLETE = 129;
294
295/// Attempt to use a file handle to an open disk partition for an operation other than raw disk I/O.
296pub const DIRECT_ACCESS_HANDLE = 130;
297
298/// An attempt was made to move the file pointer before the beginning of the file.
299pub const NEGATIVE_SEEK = 131;
300
301/// The file pointer cannot be set on the specified device or file.
302pub const SEEK_ON_DEVICE = 132;
303
304/// A JOIN or SUBST command cannot be used for a drive that contains previously joined drives.
305pub const IS_JOIN_TARGET = 133;
306
307/// An attempt was made to use a JOIN or SUBST command on a drive that has already been joined.
308pub const IS_JOINED = 134;
309
310/// An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted.
311pub const IS_SUBSTED = 135;
312
313/// The system tried to delete the JOIN of a drive that is not joined.
314pub const NOT_JOINED = 136;
315
316/// The system tried to delete the substitution of a drive that is not substituted.
317pub const NOT_SUBSTED = 137;
318
319/// The system tried to join a drive to a directory on a joined drive.
320pub const JOIN_TO_JOIN = 138;
321
322/// The system tried to substitute a drive to a directory on a substituted drive.
323pub const SUBST_TO_SUBST = 139;
324
325/// The system tried to join a drive to a directory on a substituted drive.
326pub const JOIN_TO_SUBST = 140;
327
328/// The system tried to SUBST a drive to a directory on a joined drive.
329pub const SUBST_TO_JOIN = 141;
330
331/// The system cannot perform a JOIN or SUBST at this time.
332pub const BUSY_DRIVE = 142;
333
334/// The system cannot join or substitute a drive to or for a directory on the same drive.
335pub const SAME_DRIVE = 143;
336
337/// The directory is not a subdirectory of the root directory.
338pub const DIR_NOT_ROOT = 144;
339
340/// The directory is not empty.
341pub const DIR_NOT_EMPTY = 145;
342
343/// The path specified is being used in a substitute.
344pub const IS_SUBST_PATH = 146;
345
346/// Not enough resources are available to process this command.
347pub const IS_JOIN_PATH = 147;
348
349/// The path specified cannot be used at this time.
350pub const PATH_BUSY = 148;
351
352/// An attempt was made to join or substitute a drive for which a directory on the drive is the target of a previous substitute.
353pub const IS_SUBST_TARGET = 149;
354
355/// System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed.
356pub const SYSTEM_TRACE = 150;
357
358/// The number of specified semaphore events for DosMuxSemWait is not correct.
359pub const INVALID_EVENT_COUNT = 151;
360
361/// DosMuxSemWait did not execute; too many semaphores are already set.
362pub const TOO_MANY_MUXWAITERS = 152;
363
364/// The DosMuxSemWait list is not correct.
365pub const INVALID_LIST_FORMAT = 153;
366
367/// The volume label you entered exceeds the label character limit of the target file system.
368pub const LABEL_TOO_LONG = 154;
369
370/// Cannot create another thread.
371pub const TOO_MANY_TCBS = 155;
372
373/// The recipient process has refused the signal.
374pub const SIGNAL_REFUSED = 156;
375
376/// The segment is already discarded and cannot be locked.
377pub const DISCARDED = 157;
378
379/// The segment is already unlocked.
380pub const NOT_LOCKED = 158;
381
382/// The address for the thread ID is not correct.
383pub const BAD_THREADID_ADDR = 159;
384
385/// One or more arguments are not correct.
386pub const BAD_ARGUMENTS = 160;
387
388/// The specified path is invalid.
389pub const BAD_PATHNAME = 161;
390
391/// A signal is already pending.
392pub const SIGNAL_PENDING = 162;
393
394/// No more threads can be created in the system.
395pub const MAX_THRDS_REACHED = 164;
396
397/// Unable to lock a region of a file.
398pub const LOCK_FAILED = 167;
399
400/// The requested resource is in use.
401pub const BUSY = 170;
402
403/// Device's command support detection is in progress.
404pub const DEVICE_SUPPORT_IN_PROGRESS = 171;
405
406/// A lock request was not outstanding for the supplied cancel region.
407pub const CANCEL_VIOLATION = 173;
408
409/// The file system does not support atomic changes to the lock type.
410pub const ATOMIC_LOCKS_NOT_SUPPORTED = 174;
411
412/// The system detected a segment number that was not correct.
413pub const INVALID_SEGMENT_NUMBER = 180;
414
415/// The operating system cannot run %1.
416pub const INVALID_ORDINAL = 182;
417
418/// Cannot create a file when that file already exists.
419pub const ALREADY_EXISTS = 183;
420
421/// The flag passed is not correct.
422pub const INVALID_FLAG_NUMBER = 186;
423
424/// The specified system semaphore name was not found.
425pub const SEM_NOT_FOUND = 187;
426
427/// The operating system cannot run %1.
428pub const INVALID_STARTING_CODESEG = 188;
429
430/// The operating system cannot run %1.
431pub const INVALID_STACKSEG = 189;
432
433/// The operating system cannot run %1.
434pub const INVALID_MODULETYPE = 190;
435
436/// Cannot run %1 in Win32 mode.
437pub const INVALID_EXE_SIGNATURE = 191;
438
439/// The operating system cannot run %1.
440pub const EXE_MARKED_INVALID = 192;
441
442/// %1 is not a valid Win32 application.
443pub const BAD_EXE_FORMAT = 193;
444
445/// The operating system cannot run %1.
446pub const ITERATED_DATA_EXCEEDS_64k = 194;
447
448/// The operating system cannot run %1.
449pub const INVALID_MINALLOCSIZE = 195;
450
451/// The operating system cannot run this application program.
452pub const DYNLINK_FROM_INVALID_RING = 196;
453
454/// The operating system is not presently configured to run this application.
455pub const IOPL_NOT_ENABLED = 197;
456
457/// The operating system cannot run %1.
458pub const INVALID_SEGDPL = 198;
459
460/// The operating system cannot run this application program.
461pub const AUTODATASEG_EXCEEDS_64k = 199;
462
463/// The code segment cannot be greater than or equal to 64K.
464pub const RING2SEG_MUST_BE_MOVABLE = 200;
465
466/// The operating system cannot run %1.
467pub const RELOC_CHAIN_XEEDS_SEGLIM = 201;
468
469/// The operating system cannot run %1.
470pub const INFLOOP_IN_RELOC_CHAIN = 202;
471
472/// The system could not find the environment option that was entered.
473pub const ENVVAR_NOT_FOUND = 203;
474
475/// No process in the command subtree has a signal handler.
476pub const NO_SIGNAL_SENT = 205;
477
478/// The filename or extension is too long.
479pub const FILENAME_EXCED_RANGE = 206;
480
481/// The ring 2 stack is in use.
482pub const RING2_STACK_IN_USE = 207;
483
484/// The global filename characters, * or ?, are entered incorrectly or too many global filename characters are specified.
485pub const META_EXPANSION_TOO_LONG = 208;
486
487/// The signal being posted is not correct.
488pub const INVALID_SIGNAL_NUMBER = 209;
489
490/// The signal handler cannot be set.
491pub const THREAD_1_INACTIVE = 210;
492
493/// The segment is locked and cannot be reallocated.
494pub const LOCKED = 212;
495
496/// Too many dynamic-link modules are attached to this program or dynamic-link module.
497pub const TOO_MANY_MODULES = 214;
498
499/// Cannot nest calls to LoadModule.
500pub const NESTING_NOT_ALLOWED = 215;
501
502/// This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.
503pub const EXE_MACHINE_TYPE_MISMATCH = 216;
504
505/// The image file %1 is signed, unable to modify.
506pub const EXE_CANNOT_MODIFY_SIGNED_BINARY = 217;
507
508/// The image file %1 is strong signed, unable to modify.
509pub const EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY = 218;
510
511/// This file is checked out or locked for editing by another user.
512pub const FILE_CHECKED_OUT = 220;
513
514/// The file must be checked out before saving changes.
515pub const CHECKOUT_REQUIRED = 221;
516
517/// The file type being saved or retrieved has been blocked.
518pub const BAD_FILE_TYPE = 222;
519
520/// The file size exceeds the limit allowed and cannot be saved.
521pub const FILE_TOO_LARGE = 223;
522
523/// Access Denied. Before opening files in this location, you must first add the web site to your trusted sites list, browse to the web site, and select the option to login automatically.
524pub const FORMS_AUTH_REQUIRED = 224;
525
526/// Operation did not complete successfully because the file contains a virus or potentially unwanted software.
527pub const VIRUS_INFECTED = 225;
528
529/// This file contains a virus or potentially unwanted software and cannot be opened. Due to the nature of this virus or potentially unwanted software, the file has been removed from this location.
530pub const VIRUS_DELETED = 226;
531
532/// The pipe is local.
533pub const PIPE_LOCAL = 229;
534
535/// The pipe state is invalid.
536pub const BAD_PIPE = 230;
537
538/// All pipe instances are busy.
539pub const PIPE_BUSY = 231;
540
541/// The pipe is being closed.
542pub const NO_DATA = 232;
543
544/// No process is on the other end of the pipe.
545pub const PIPE_NOT_CONNECTED = 233;
546
547/// More data is available.
548pub const MORE_DATA = 234;
549
550/// The session was canceled.
551pub const VC_DISCONNECTED = 240;
552
553/// The specified extended attribute name was invalid.
554pub const INVALID_EA_NAME = 254;
555
556/// The extended attributes are inconsistent.
557pub const EA_LIST_INCONSISTENT = 255;
558
559/// The wait operation timed out.
560pub const IMEOUT = 258;
561
562/// No more data is available.
563pub const NO_MORE_ITEMS = 259;
564
565/// The copy functions cannot be used.
566pub const CANNOT_COPY = 266;
567
568/// The directory name is invalid.
569pub const DIRECTORY = 267;
570
571/// The extended attributes did not fit in the buffer.
572pub const EAS_DIDNT_FIT = 275;
573
574/// The extended attribute file on the mounted file system is corrupt.
575pub const EA_FILE_CORRUPT = 276;
576
577/// The extended attribute table file is full.
578pub const EA_TABLE_FULL = 277;
579
580/// The specified extended attribute handle is invalid.
581pub const INVALID_EA_HANDLE = 278;
582
583/// The mounted file system does not support extended attributes.
584pub const EAS_NOT_SUPPORTED = 282;
585
586/// Attempt to release mutex not owned by caller.
587pub const NOT_OWNER = 288;
588
589/// Too many posts were made to a semaphore.
590pub const TOO_MANY_POSTS = 298;
591
592/// Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
593pub const PARTIAL_COPY = 299;
594
595/// The oplock request is denied.
596pub const OPLOCK_NOT_GRANTED = 300;
597
598/// An invalid oplock acknowledgment was received by the system.
599pub const INVALID_OPLOCK_PROTOCOL = 301;
600
601/// The volume is too fragmented to complete this operation.
602pub const DISK_TOO_FRAGMENTED = 302;
603
604/// The file cannot be opened because it is in the process of being deleted.
605pub const DELETE_PENDING = 303;
606
607/// Short name settings may not be changed on this volume due to the global registry setting.
608pub const INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING = 304;
609
610/// Short names are not enabled on this volume.
611pub const SHORT_NAMES_NOT_ENABLED_ON_VOLUME = 305;
612
613/// The security stream for the given volume is in an inconsistent state. Please run CHKDSK on the volume.
614pub const SECURITY_STREAM_IS_INCONSISTENT = 306;
615
616/// A requested file lock operation cannot be processed due to an invalid byte range.
617pub const INVALID_LOCK_RANGE = 307;
618
619/// The subsystem needed to support the image type is not present.
620pub const IMAGE_SUBSYSTEM_NOT_PRESENT = 308;
621
622/// The specified file already has a notification GUID associated with it.
623pub const NOTIFICATION_GUID_ALREADY_DEFINED = 309;
624
625/// An invalid exception handler routine has been detected.
626pub const INVALID_EXCEPTION_HANDLER = 310;
627
628/// Duplicate privileges were specified for the token.
629pub const DUPLICATE_PRIVILEGES = 311;
630
631/// No ranges for the specified operation were able to be processed.
632pub const NO_RANGES_PROCESSED = 312;
633
634/// Operation is not allowed on a file system internal file.
635pub const NOT_ALLOWED_ON_SYSTEM_FILE = 313;
636
637/// The physical resources of this disk have been exhausted.
638pub const DISK_RESOURCES_EXHAUSTED = 314;
639
640/// The token representing the data is invalid.
641pub const INVALID_TOKEN = 315;
642
643/// The device does not support the command feature.
644pub const DEVICE_FEATURE_NOT_SUPPORTED = 316;
645
646/// The system cannot find message text for message number 0x%1 in the message file for %2.
647pub const MR_MID_NOT_FOUND = 317;
648
649/// The scope specified was not found.
650pub const SCOPE_NOT_FOUND = 318;
651
652/// The Central Access Policy specified is not defined on the target machine.
653pub const UNDEFINED_SCOPE = 319;
654
655/// The Central Access Policy obtained from Active Directory is invalid.
656pub const INVALID_CAP = 320;
657
658/// The device is unreachable.
659pub const DEVICE_UNREACHABLE = 321;
660
661/// The target device has insufficient resources to complete the operation.
662pub const DEVICE_NO_RESOURCES = 322;
663
664/// A data integrity checksum error occurred. Data in the file stream is corrupt.
665pub const DATA_CHECKSUM_ERROR = 323;
666
667/// An attempt was made to modify both a KERNEL and normal Extended Attribute (EA) in the same operation.
668pub const INTERMIXED_KERNEL_EA_OPERATION = 324;
669
670/// Device does not support file-level TRIM.
671pub const FILE_LEVEL_TRIM_NOT_SUPPORTED = 326;
672
673/// The command specified a data offset that does not align to the device's granularity/alignment.
674pub const OFFSET_ALIGNMENT_VIOLATION = 327;
675
676/// The command specified an invalid field in its parameter list.
677pub const INVALID_FIELD_IN_PARAMETER_LIST = 328;
678
679/// An operation is currently in progress with the device.
680pub const OPERATION_IN_PROGRESS = 329;
681
682/// An attempt was made to send down the command via an invalid path to the target device.
683pub const BAD_DEVICE_PATH = 330;
684
685/// The command specified a number of descriptors that exceeded the maximum supported by the device.
686pub const TOO_MANY_DESCRIPTORS = 331;
687
688/// Scrub is disabled on the specified file.
689pub const SCRUB_DATA_DISABLED = 332;
690
691/// The storage device does not provide redundancy.
692pub const NOT_REDUNDANT_STORAGE = 333;
693
694/// An operation is not supported on a resident file.
695pub const RESIDENT_FILE_NOT_SUPPORTED = 334;
696
697/// An operation is not supported on a compressed file.
698pub const COMPRESSED_FILE_NOT_SUPPORTED = 335;
699
700/// An operation is not supported on a directory.
701pub const DIRECTORY_NOT_SUPPORTED = 336;
702
703/// The specified copy of the requested data could not be read.
704pub const NOT_READ_FROM_COPY = 337;
705
706/// No action was taken as a system reboot is required.
707pub const FAIL_NOACTION_REBOOT = 350;
708
709/// The shutdown operation failed.
710pub const FAIL_SHUTDOWN = 351;
711
712/// The restart operation failed.
713pub const FAIL_RESTART = 352;
714
715/// The maximum number of sessions has been reached.
716pub const MAX_SESSIONS_REACHED = 353;
717
718/// The thread is already in background processing mode.
719pub const THREAD_MODE_ALREADY_BACKGROUND = 400;
720
721/// The thread is not in background processing mode.
722pub const THREAD_MODE_NOT_BACKGROUND = 401;
723
724/// The process is already in background processing mode.
725pub const PROCESS_MODE_ALREADY_BACKGROUND = 402;
726
727/// The process is not in background processing mode.
728pub const PROCESS_MODE_NOT_BACKGROUND = 403;
729
730/// Attempt to access invalid address.
731pub const INVALID_ADDRESS = 487;
732
733/// User profile cannot be loaded.
734pub const USER_PROFILE_LOAD = 500;
735
736/// Arithmetic result exceeded 32 bits.
737pub const ARITHMETIC_OVERFLOW = 534;
738
739/// There is a process on other end of the pipe.
740pub const PIPE_CONNECTED = 535;
741
742/// Waiting for a process to open the other end of the pipe.
743pub const PIPE_LISTENING = 536;
744
745/// Application verifier has found an error in the current process.
746pub const VERIFIER_STOP = 537;
747
748/// An error occurred in the ABIOS subsystem.
749pub const ABIOS_ERROR = 538;
750
751/// A warning occurred in the WX86 subsystem.
752pub const WX86_WARNING = 539;
753
754/// An error occurred in the WX86 subsystem.
755pub const WX86_ERROR = 540;
756
757/// An attempt was made to cancel or set a timer that has an associated APC and the subject thread is not the thread that originally set the timer with an associated APC routine.
758pub const TIMER_NOT_CANCELED = 541;
759
760/// Unwind exception code.
761pub const UNWIND = 542;
762
763/// An invalid or unaligned stack was encountered during an unwind operation.
764pub const BAD_STACK = 543;
765
766/// An invalid unwind target was encountered during an unwind operation.
767pub const INVALID_UNWIND_TARGET = 544;
768
769/// Invalid Object Attributes specified to NtCreatePort or invalid Port Attributes specified to NtConnectPort
770pub const INVALID_PORT_ATTRIBUTES = 545;
771
772/// Length of message passed to NtRequestPort or NtRequestWaitReplyPort was longer than the maximum message allowed by the port.
773pub const PORT_MESSAGE_TOO_LONG = 546;
774
775/// An attempt was made to lower a quota limit below the current usage.
776pub const INVALID_QUOTA_LOWER = 547;
777
778/// An attempt was made to attach to a device that was already attached to another device.
779pub const DEVICE_ALREADY_ATTACHED = 548;
780
781/// An attempt was made to execute an instruction at an unaligned address and the host system does not support unaligned instruction references.
782pub const INSTRUCTION_MISALIGNMENT = 549;
783
784/// Profiling not started.
785pub const PROFILING_NOT_STARTED = 550;
786
787/// Profiling not stopped.
788pub const PROFILING_NOT_STOPPED = 551;
789
790/// The passed ACL did not contain the minimum required information.
791pub const COULD_NOT_INTERPRET = 552;
792
793/// The number of active profiling objects is at the maximum and no more may be started.
794pub const PROFILING_AT_LIMIT = 553;
795
796/// Used to indicate that an operation cannot continue without blocking for I/O.
797pub const CANT_WAIT = 554;
798
799/// Indicates that a thread attempted to terminate itself by default (called NtTerminateThread with NULL) and it was the last thread in the current process.
800pub const CANT_TERMINATE_SELF = 555;
801
802/// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter. In this case information is lost, however, the filter correctly handles the exception.
803pub const UNEXPECTED_MM_CREATE_ERR = 556;
804
805/// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter. In this case information is lost, however, the filter correctly handles the exception.
806pub const UNEXPECTED_MM_MAP_ERROR = 557;
807
808/// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter. In this case information is lost, however, the filter correctly handles the exception.
809pub const UNEXPECTED_MM_EXTEND_ERR = 558;
810
811/// A malformed function table was encountered during an unwind operation.
812pub const BAD_FUNCTION_TABLE = 559;
813
814/// Indicates that an attempt was made to assign protection to a file system file or directory and one of the SIDs in the security descriptor could not be translated into a GUID that could be stored by the file system. This causes the protection attempt to fail, which may cause a file creation attempt to fail.
815pub const NO_GUID_TRANSLATION = 560;
816
817/// Indicates that an attempt was made to grow an LDT by setting its size, or that the size was not an even number of selectors.
818pub const INVALID_LDT_SIZE = 561;
819
820/// Indicates that the starting value for the LDT information was not an integral multiple of the selector size.
821pub const INVALID_LDT_OFFSET = 563;
822
823/// Indicates that the user supplied an invalid descriptor when trying to set up Ldt descriptors.
824pub const INVALID_LDT_DESCRIPTOR = 564;
825
826/// Indicates a process has too many threads to perform the requested action. For example, assignment of a primary token may only be performed when a process has zero or one threads.
827pub const TOO_MANY_THREADS = 565;
828
829/// An attempt was made to operate on a thread within a specific process, but the thread specified is not in the process specified.
830pub const THREAD_NOT_IN_PROCESS = 566;
831
832/// Page file quota was exceeded.
833pub const PAGEFILE_QUOTA_EXCEEDED = 567;
834
835/// The Netlogon service cannot start because another Netlogon service running in the domain conflicts with the specified role.
836pub const LOGON_SERVER_CONFLICT = 568;
837
838/// The SAM database on a Windows Server is significantly out of synchronization with the copy on the Domain Controller. A complete synchronization is required.
839pub const SYNCHRONIZATION_REQUIRED = 569;
840
841/// The NtCreateFile API failed. This error should never be returned to an application, it is a place holder for the Windows Lan Manager Redirector to use in its internal error mapping routines.
842pub const NET_OPEN_FAILED = 570;
843
844/// {Privilege Failed} The I/O permissions for the process could not be changed.
845pub const IO_PRIVILEGE_FAILED = 571;
846
847/// {Application Exit by CTRL+C} The application terminated as a result of a CTRL+C.
848pub const CONTROL_C_EXIT = 572;
849
850/// {Missing System File} The required system file %hs is bad or missing.
851pub const MISSING_SYSTEMFILE = 573;
852
853/// {Application Error} The exception %s (0x%08lx) occurred in the application at location 0x%08lx.
854pub const UNHANDLED_EXCEPTION = 574;
855
856/// {Application Error} The application was unable to start correctly (0x%lx). Click OK to close the application.
857pub const APP_INIT_FAILURE = 575;
858
859/// {Unable to Create Paging File} The creation of the paging file %hs failed (%lx). The requested size was %ld.
860pub const PAGEFILE_CREATE_FAILED = 576;
861
862/// Windows cannot verify the digital signature for this file. A recent hardware or software change might have installed a file that is signed incorrectly or damaged, or that might be malicious software from an unknown source.
863pub const INVALID_IMAGE_HASH = 577;
864
865/// {No Paging File Specified} No paging file was specified in the system configuration.
866pub const NO_PAGEFILE = 578;
867
868/// {EXCEPTION} A real-mode application issued a floating-point instruction and floating-point hardware is not present.
869pub const ILLEGAL_FLOAT_CONTEXT = 579;
870
871/// An event pair synchronization operation was performed using the thread specific client/server event pair object, but no event pair object was associated with the thread.
872pub const NO_EVENT_PAIR = 580;
873
874/// A Windows Server has an incorrect configuration.
875pub const DOMAIN_CTRLR_CONFIG_ERROR = 581;
876
877/// An illegal character was encountered. For a multi-byte character set this includes a lead byte without a succeeding trail byte. For the Unicode character set this includes the characters 0xFFFF and 0xFFFE.
878pub const ILLEGAL_CHARACTER = 582;
879
880/// The Unicode character is not defined in the Unicode character set installed on the system.
881pub const UNDEFINED_CHARACTER = 583;
882
883/// The paging file cannot be created on a floppy diskette.
884pub const FLOPPY_VOLUME = 584;
885
886/// The system BIOS failed to connect a system interrupt to the device or bus for which the device is connected.
887pub const BIOS_FAILED_TO_CONNECT_INTERRUPT = 585;
888
889/// This operation is only allowed for the Primary Domain Controller of the domain.
890pub const BACKUP_CONTROLLER = 586;
891
892/// An attempt was made to acquire a mutant such that its maximum count would have been exceeded.
893pub const MUTANT_LIMIT_EXCEEDED = 587;
894
895/// A volume has been accessed for which a file system driver is required that has not yet been loaded.
896pub const FS_DRIVER_REQUIRED = 588;
897
898/// {Registry File Failure} The registry cannot load the hive (file): %hs or its log or alternate. It is corrupt, absent, or not writable.
899pub const CANNOT_LOAD_REGISTRY_FILE = 589;
900
901/// {Unexpected Failure in DebugActiveProcess} An unexpected failure occurred while processing a DebugActiveProcess API request. You may choose OK to terminate the process, or Cancel to ignore the error.
902pub const DEBUG_ATTACH_FAILED = 590;
903
904/// {Fatal System Error} The %hs system process terminated unexpectedly with a status of 0x%08x (0x%08x 0x%08x). The system has been shut down.
905pub const SYSTEM_PROCESS_TERMINATED = 591;
906
907/// {Data Not Accepted} The TDI client could not handle the data received during an indication.
908pub const DATA_NOT_ACCEPTED = 592;
909
910/// NTVDM encountered a hard error.
911pub const VDM_HARD_ERROR = 593;
912
913/// {Cancel Timeout} The driver %hs failed to complete a cancelled I/O request in the allotted time.
914pub const DRIVER_CANCEL_TIMEOUT = 594;
915
916/// {Reply Message Mismatch} An attempt was made to reply to an LPC message, but the thread specified by the client ID in the message was not waiting on that message.
917pub const REPLY_MESSAGE_MISMATCH = 595;
918
919/// {Delayed Write Failed} Windows was unable to save all the data for the file %hs. The data has been lost. This error may be caused by a failure of your computer hardware or network connection. Please try to save this file elsewhere.
920pub const LOST_WRITEBEHIND_DATA = 596;
921
922/// The parameter(s) passed to the server in the client/server shared memory window were invalid. Too much data may have been put in the shared memory window.
923pub const CLIENT_SERVER_PARAMETERS_INVALID = 597;
924
925/// The stream is not a tiny stream.
926pub const NOT_TINY_STREAM = 598;
927
928/// The request must be handled by the stack overflow code.
929pub const STACK_OVERFLOW_READ = 599;
930
931/// Internal OFS status codes indicating how an allocation operation is handled. Either it is retried after the containing onode is moved or the extent stream is converted to a large stream.
932pub const CONVERT_TO_LARGE = 600;
933
934/// The attempt to find the object found an object matching by ID on the volume but it is out of the scope of the handle used for the operation.
935pub const FOUND_OUT_OF_SCOPE = 601;
936
937/// The bucket array must be grown. Retry transaction after doing so.
938pub const ALLOCATE_BUCKET = 602;
939
940/// The user/kernel marshalling buffer has overflowed.
941pub const MARSHALL_OVERFLOW = 603;
942
943/// The supplied variant structure contains invalid data.
944pub const INVALID_VARIANT = 604;
945
946/// The specified buffer contains ill-formed data.
947pub const BAD_COMPRESSION_BUFFER = 605;
948
949/// {Audit Failed} An attempt to generate a security audit failed.
950pub const AUDIT_FAILED = 606;
951
952/// The timer resolution was not previously set by the current process.
953pub const TIMER_RESOLUTION_NOT_SET = 607;
954
955/// There is insufficient account information to log you on.
956pub const INSUFFICIENT_LOGON_INFO = 608;
957
958/// {Invalid DLL Entrypoint} The dynamic link library %hs is not written correctly. The stack pointer has been left in an inconsistent state. The entrypoint should be declared as WINAPI or STDCALL. Select YES to fail the DLL load. Select NO to continue execution. Selecting NO may cause the application to operate incorrectly.
959pub const BAD_DLL_ENTRYPOINT = 609;
960
961/// {Invalid Service Callback Entrypoint} The %hs service is not written correctly. The stack pointer has been left in an inconsistent state. The callback entrypoint should be declared as WINAPI or STDCALL. Selecting OK will cause the service to continue operation. However, the service process may operate incorrectly.
962pub const BAD_SERVICE_ENTRYPOINT = 610;
963
964/// There is an IP address conflict with another system on the network.
965pub const IP_ADDRESS_CONFLICT1 = 611;
966
967/// There is an IP address conflict with another system on the network.
968pub const IP_ADDRESS_CONFLICT2 = 612;
969
970/// {Low On Registry Space} The system has reached the maximum size allowed for the system part of the registry. Additional storage requests will be ignored.
971pub const REGISTRY_QUOTA_LIMIT = 613;
972
973/// A callback return system service cannot be executed when no callback is active.
974pub const NO_CALLBACK_ACTIVE = 614;
975
976/// The password provided is too short to meet the policy of your user account. Please choose a longer password.
977pub const PWD_TOO_SHORT = 615;
978
979/// The policy of your user account does not allow you to change passwords too frequently. This is done to prevent users from changing back to a familiar, but potentially discovered, password. If you feel your password has been compromised then please contact your administrator immediately to have a new one assigned.
980pub const PWD_TOO_RECENT = 616;
981
982/// You have attempted to change your password to one that you have used in the past. The policy of your user account does not allow this. Please select a password that you have not previously used.
983pub const PWD_HISTORY_CONFLICT = 617;
984
985/// The specified compression format is unsupported.
986pub const UNSUPPORTED_COMPRESSION = 618;
987
988/// The specified hardware profile configuration is invalid.
989pub const INVALID_HW_PROFILE = 619;
990
991/// The specified Plug and Play registry device path is invalid.
992pub const INVALID_PLUGPLAY_DEVICE_PATH = 620;
993
994/// The specified quota list is internally inconsistent with its descriptor.
995pub const QUOTA_LIST_INCONSISTENT = 621;
996
997/// {Windows Evaluation Notification} The evaluation period for this installation of Windows has expired. This system will shutdown in 1 hour. To restore access to this installation of Windows, please upgrade this installation using a licensed distribution of this product.
998pub const EVALUATION_EXPIRATION = 622;
999
1000/// {Illegal System DLL Relocation} The system DLL %hs was relocated in memory. The application will not run properly. The relocation occurred because the DLL %hs occupied an address range reserved for Windows system DLLs. The vendor supplying the DLL should be contacted for a new DLL.
1001pub const ILLEGAL_DLL_RELOCATION = 623;
1002
1003/// {DLL Initialization Failed} The application failed to initialize because the window station is shutting down.
1004pub const DLL_INIT_FAILED_LOGOFF = 624;
1005
1006/// The validation process needs to continue on to the next step.
1007pub const VALIDATE_CONTINUE = 625;
1008
1009/// There are no more matches for the current index enumeration.
1010pub const NO_MORE_MATCHES = 626;
1011
1012/// The range could not be added to the range list because of a conflict.
1013pub const RANGE_LIST_CONFLICT = 627;
1014
1015/// The server process is running under a SID different than that required by client.
1016pub const SERVER_SID_MISMATCH = 628;
1017
1018/// A group marked use for deny only cannot be enabled.
1019pub const CANT_ENABLE_DENY_ONLY = 629;
1020
1021/// {EXCEPTION} Multiple floating point faults.
1022pub const FLOAT_MULTIPLE_FAULTS = 630;
1023
1024/// {EXCEPTION} Multiple floating point traps.
1025pub const FLOAT_MULTIPLE_TRAPS = 631;
1026
1027/// The requested interface is not supported.
1028pub const NOINTERFACE = 632;
1029
1030/// {System Standby Failed} The driver %hs does not support standby mode. Updating this driver may allow the system to go to standby mode.
1031pub const DRIVER_FAILED_SLEEP = 633;
1032
1033/// The system file %1 has become corrupt and has been replaced.
1034pub const CORRUPT_SYSTEM_FILE = 634;
1035
1036/// {Virtual Memory Minimum Too Low} Your system is low on virtual memory. Windows is increasing the size of your virtual memory paging file. During this process, memory requests for some applications may be denied. For more information, see Help.
1037pub const COMMITMENT_MINIMUM = 635;
1038
1039/// A device was removed so enumeration must be restarted.
1040pub const PNP_RESTART_ENUMERATION = 636;
1041
1042/// {Fatal System Error} The system image %s is not properly signed. The file has been replaced with the signed file. The system has been shut down.
1043pub const SYSTEM_IMAGE_BAD_SIGNATURE = 637;
1044
1045/// Device will not start without a reboot.
1046pub const PNP_REBOOT_REQUIRED = 638;
1047
1048/// There is not enough power to complete the requested operation.
1049pub const INSUFFICIENT_POWER = 639;
1050
1051/// ERROR_MULTIPLE_FAULT_VIOLATION
1052pub const MULTIPLE_FAULT_VIOLATION = 640;
1053
1054/// The system is in the process of shutting down.
1055pub const SYSTEM_SHUTDOWN = 641;
1056
1057/// An attempt to remove a processes DebugPort was made, but a port was not already associated with the process.
1058pub const PORT_NOT_SET = 642;
1059
1060/// This version of Windows is not compatible with the behavior version of directory forest, domain or domain controller.
1061pub const DS_VERSION_CHECK_FAILURE = 643;
1062
1063/// The specified range could not be found in the range list.
1064pub const RANGE_NOT_FOUND = 644;
1065
1066/// The driver was not loaded because the system is booting into safe mode.
1067pub const NOT_SAFE_MODE_DRIVER = 646;
1068
1069/// The driver was not loaded because it failed its initialization call.
1070pub const FAILED_DRIVER_ENTRY = 647;
1071
1072/// The "%hs" encountered an error while applying power or reading the device configuration. This may be caused by a failure of your hardware or by a poor connection.
1073pub const DEVICE_ENUMERATION_ERROR = 648;
1074
1075/// The create operation failed because the name contained at least one mount point which resolves to a volume to which the specified device object is not attached.
1076pub const MOUNT_POINT_NOT_RESOLVED = 649;
1077
1078/// The device object parameter is either not a valid device object or is not attached to the volume specified by the file name.
1079pub const INVALID_DEVICE_OBJECT_PARAMETER = 650;
1080
1081/// A Machine Check Error has occurred. Please check the system eventlog for additional information.
1082pub const MCA_OCCURED = 651;
1083
1084/// There was error [%2] processing the driver database.
1085pub const DRIVER_DATABASE_ERROR = 652;
1086
1087/// System hive size has exceeded its limit.
1088pub const SYSTEM_HIVE_TOO_LARGE = 653;
1089
1090/// The driver could not be loaded because a previous version of the driver is still in memory.
1091pub const DRIVER_FAILED_PRIOR_UNLOAD = 654;
1092
1093/// {Volume Shadow Copy Service} Please wait while the Volume Shadow Copy Service prepares volume %hs for hibernation.
1094pub const VOLSNAP_PREPARE_HIBERNATE = 655;
1095
1096/// The system has failed to hibernate (The error code is %hs). Hibernation will be disabled until the system is restarted.
1097pub const HIBERNATION_FAILURE = 656;
1098
1099/// The password provided is too long to meet the policy of your user account. Please choose a shorter password.
1100pub const PWD_TOO_LONG = 657;
1101
1102/// The requested operation could not be completed due to a file system limitation.
1103pub const FILE_SYSTEM_LIMITATION = 665;
1104
1105/// An assertion failure has occurred.
1106pub const ASSERTION_FAILURE = 668;
1107
1108/// An error occurred in the ACPI subsystem.
1109pub const ACPI_ERROR = 669;
1110
1111/// WOW Assertion Error.
1112pub const WOW_ASSERTION = 670;
1113
1114/// A device is missing in the system BIOS MPS table. This device will not be used. Please contact your system vendor for system BIOS update.
1115pub const PNP_BAD_MPS_TABLE = 671;
1116
1117/// A translator failed to translate resources.
1118pub const PNP_TRANSLATION_FAILED = 672;
1119
1120/// A IRQ translator failed to translate resources.
1121pub const PNP_IRQ_TRANSLATION_FAILED = 673;
1122
1123/// Driver %2 returned invalid ID for a child device (%3).
1124pub const PNP_INVALID_ID = 674;
1125
1126/// {Kernel Debugger Awakened} the system debugger was awakened by an interrupt.
1127pub const WAKE_SYSTEM_DEBUGGER = 675;
1128
1129/// {Handles Closed} Handles to objects have been automatically closed as a result of the requested operation.
1130pub const HANDLES_CLOSED = 676;
1131
1132/// {Too Much Information} The specified access control list (ACL) contained more information than was expected.
1133pub const EXTRANEOUS_INFORMATION = 677;
1134
1135/// This warning level status indicates that the transaction state already exists for the registry sub-tree, but that a transaction commit was previously aborted. The commit has NOT been completed, but has not been rolled back either (so it may still be committed if desired).
1136pub const RXACT_COMMIT_NECESSARY = 678;
1137
1138/// {Media Changed} The media may have changed.
1139pub const MEDIA_CHECK = 679;
1140
1141/// {GUID Substitution} During the translation of a global identifier (GUID) to a Windows security ID (SID), no administratively-defined GUID prefix was found. A substitute prefix was used, which will not compromise system security. However, this may provide a more restrictive access than intended.
1142pub const GUID_SUBSTITUTION_MADE = 680;
1143
1144/// The create operation stopped after reaching a symbolic link.
1145pub const STOPPED_ON_SYMLINK = 681;
1146
1147/// A long jump has been executed.
1148pub const LONGJUMP = 682;
1149
1150/// The Plug and Play query operation was not successful.
1151pub const PLUGPLAY_QUERY_VETOED = 683;
1152
1153/// A frame consolidation has been executed.
1154pub const UNWIND_CONSOLIDATE = 684;
1155
1156/// {Registry Hive Recovered} Registry hive (file): %hs was corrupted and it has been recovered. Some data might have been lost.
1157pub const REGISTRY_HIVE_RECOVERED = 685;
1158
1159/// The application is attempting to run executable code from the module %hs. This may be insecure. An alternative, %hs, is available. Should the application use the secure module %hs?
1160pub const DLL_MIGHT_BE_INSECURE = 686;
1161
1162/// The application is loading executable code from the module %hs. This is secure, but may be incompatible with previous releases of the operating system. An alternative, %hs, is available. Should the application use the secure module %hs?
1163pub const DLL_MIGHT_BE_INCOMPATIBLE = 687;
1164
1165/// Debugger did not handle the exception.
1166pub const DBG_EXCEPTION_NOT_HANDLED = 688;
1167
1168/// Debugger will reply later.
1169pub const DBG_REPLY_LATER = 689;
1170
1171/// Debugger cannot provide handle.
1172pub const DBG_UNABLE_TO_PROVIDE_HANDLE = 690;
1173
1174/// Debugger terminated thread.
1175pub const DBG_TERMINATE_THREAD = 691;
1176
1177/// Debugger terminated process.
1178pub const DBG_TERMINATE_PROCESS = 692;
1179
1180/// Debugger got control C.
1181pub const DBG_CONTROL_C = 693;
1182
1183/// Debugger printed exception on control C.
1184pub const DBG_PRINTEXCEPTION_C = 694;
1185
1186/// Debugger received RIP exception.
1187pub const DBG_RIPEXCEPTION = 695;
1188
1189/// Debugger received control break.
1190pub const DBG_CONTROL_BREAK = 696;
1191
1192/// Debugger command communication exception.
1193pub const DBG_COMMAND_EXCEPTION = 697;
1194
1195/// {Object Exists} An attempt was made to create an object and the object name already existed.
1196pub const OBJECT_NAME_EXISTS = 698;
1197
1198/// {Thread Suspended} A thread termination occurred while the thread was suspended. The thread was resumed, and termination proceeded.
1199pub const THREAD_WAS_SUSPENDED = 699;
1200
1201/// {Image Relocated} An image file could not be mapped at the address specified in the image file. Local fixups must be performed on this image.
1202pub const IMAGE_NOT_AT_BASE = 700;
1203
1204/// This informational level status indicates that a specified registry sub-tree transaction state did not yet exist and had to be created.
1205pub const RXACT_STATE_CREATED = 701;
1206
1207/// {Segment Load} A virtual DOS machine (VDM) is loading, unloading, or moving an MS-DOS or Win16 program segment image. An exception is raised so a debugger can load, unload or track symbols and breakpoints within these 16-bit segments.
1208pub const SEGMENT_NOTIFICATION = 702;
1209
1210/// {Invalid Current Directory} The process cannot switch to the startup current directory %hs. Select OK to set current directory to %hs, or select CANCEL to exit.
1211pub const BAD_CURRENT_DIRECTORY = 703;
1212
1213/// {Redundant Read} To satisfy a read request, the NT fault-tolerant file system successfully read the requested data from a redundant copy. This was done because the file system encountered a failure on a member of the fault-tolerant volume, but was unable to reassign the failing area of the device.
1214pub const FT_READ_RECOVERY_FROM_BACKUP = 704;
1215
1216/// {Redundant Write} To satisfy a write request, the NT fault-tolerant file system successfully wrote a redundant copy of the information. This was done because the file system encountered a failure on a member of the fault-tolerant volume, but was not able to reassign the failing area of the device.
1217pub const FT_WRITE_RECOVERY = 705;
1218
1219/// {Machine Type Mismatch} The image file %hs is valid, but is for a machine type other than the current machine. Select OK to continue, or CANCEL to fail the DLL load.
1220pub const IMAGE_MACHINE_TYPE_MISMATCH = 706;
1221
1222/// {Partial Data Received} The network transport returned partial data to its client. The remaining data will be sent later.
1223pub const RECEIVE_PARTIAL = 707;
1224
1225/// {Expedited Data Received} The network transport returned data to its client that was marked as expedited by the remote system.
1226pub const RECEIVE_EXPEDITED = 708;
1227
1228/// {Partial Expedited Data Received} The network transport returned partial data to its client and this data was marked as expedited by the remote system. The remaining data will be sent later.
1229pub const RECEIVE_PARTIAL_EXPEDITED = 709;
1230
1231/// {TDI Event Done} The TDI indication has completed successfully.
1232pub const EVENT_DONE = 710;
1233
1234/// {TDI Event Pending} The TDI indication has entered the pending state.
1235pub const EVENT_PENDING = 711;
1236
1237/// Checking file system on %wZ.
1238pub const CHECKING_FILE_SYSTEM = 712;
1239
1240/// {Fatal Application Exit} %hs.
1241pub const FATAL_APP_EXIT = 713;
1242
1243/// The specified registry key is referenced by a predefined handle.
1244pub const PREDEFINED_HANDLE = 714;
1245
1246/// {Page Unlocked} The page protection of a locked page was changed to 'No Access' and the page was unlocked from memory and from the process.
1247pub const WAS_UNLOCKED = 715;
1248
1249/// %hs
1250pub const SERVICE_NOTIFICATION = 716;
1251
1252/// {Page Locked} One of the pages to lock was already locked.
1253pub const WAS_LOCKED = 717;
1254
1255/// Application popup: %1 : %2
1256pub const LOG_HARD_ERROR = 718;
1257
1258/// ERROR_ALREADY_WIN32
1259pub const ALREADY_WIN32 = 719;
1260
1261/// {Machine Type Mismatch} The image file %hs is valid, but is for a machine type other than the current machine.
1262pub const IMAGE_MACHINE_TYPE_MISMATCH_EXE = 720;
1263
1264/// A yield execution was performed and no thread was available to run.
1265pub const NO_YIELD_PERFORMED = 721;
1266
1267/// The resumable flag to a timer API was ignored.
1268pub const TIMER_RESUME_IGNORED = 722;
1269
1270/// The arbiter has deferred arbitration of these resources to its parent.
1271pub const ARBITRATION_UNHANDLED = 723;
1272
1273/// The inserted CardBus device cannot be started because of a configuration error on "%hs".
1274pub const CARDBUS_NOT_SUPPORTED = 724;
1275
1276/// The CPUs in this multiprocessor system are not all the same revision level. To use all processors the operating system restricts itself to the features of the least capable processor in the system. Should problems occur with this system, contact the CPU manufacturer to see if this mix of processors is supported.
1277pub const MP_PROCESSOR_MISMATCH = 725;
1278
1279/// The system was put into hibernation.
1280pub const HIBERNATED = 726;
1281
1282/// The system was resumed from hibernation.
1283pub const RESUME_HIBERNATION = 727;
1284
1285/// Windows has detected that the system firmware (BIOS) was updated [previous firmware date = %2, current firmware date %3].
1286pub const FIRMWARE_UPDATED = 728;
1287
1288/// A device driver is leaking locked I/O pages causing system degradation. The system has automatically enabled tracking code in order to try and catch the culprit.
1289pub const DRIVERS_LEAKING_LOCKED_PAGES = 729;
1290
1291/// The system has awoken.
1292pub const WAKE_SYSTEM = 730;
1293
1294/// ERROR_WAIT_1
1295pub const WAIT_1 = 731;
1296
1297/// ERROR_WAIT_2
1298pub const WAIT_2 = 732;
1299
1300/// ERROR_WAIT_3
1301pub const WAIT_3 = 733;
1302
1303/// ERROR_WAIT_63
1304pub const WAIT_63 = 734;
1305
1306/// ERROR_ABANDONED_WAIT_0
1307pub const ABANDONED_WAIT_0 = 735;
1308
1309/// ERROR_ABANDONED_WAIT_63
1310pub const ABANDONED_WAIT_63 = 736;
1311
1312/// ERROR_USER_APC
1313pub const USER_APC = 737;
1314
1315/// ERROR_KERNEL_APC
1316pub const KERNEL_APC = 738;
1317
1318/// ERROR_ALERTED
1319pub const ALERTED = 739;
1320
1321/// The requested operation requires elevation.
1322pub const ELEVATION_REQUIRED = 740;
1323
1324/// A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link.
1325pub const REPARSE = 741;
1326
1327/// An open/create operation completed while an oplock break is underway.
1328pub const OPLOCK_BREAK_IN_PROGRESS = 742;
1329
1330/// A new volume has been mounted by a file system.
1331pub const VOLUME_MOUNTED = 743;
1332
1333/// This success level status indicates that the transaction state already exists for the registry sub-tree, but that a transaction commit was previously aborted. The commit has now been completed.
1334pub const RXACT_COMMITTED = 744;
1335
1336/// This indicates that a notify change request has been completed due to closing the handle which made the notify change request.
1337pub const NOTIFY_CLEANUP = 745;
1338
1339/// {Connect Failure on Primary Transport} An attempt was made to connect to the remote server %hs on the primary transport, but the connection failed. The computer WAS able to connect on a secondary transport.
1340pub const PRIMARY_TRANSPORT_CONNECT_FAILED = 746;
1341
1342/// Page fault was a transition fault.
1343pub const PAGE_FAULT_TRANSITION = 747;
1344
1345/// Page fault was a demand zero fault.
1346pub const PAGE_FAULT_DEMAND_ZERO = 748;
1347
1348/// Page fault was a demand zero fault.
1349pub const PAGE_FAULT_COPY_ON_WRITE = 749;
1350
1351/// Page fault was a demand zero fault.
1352pub const PAGE_FAULT_GUARD_PAGE = 750;
1353
1354/// Page fault was satisfied by reading from a secondary storage device.
1355pub const PAGE_FAULT_PAGING_FILE = 751;
1356
1357/// Cached page was locked during operation.
1358pub const CACHE_PAGE_LOCKED = 752;
1359
1360/// Crash dump exists in paging file.
1361pub const CRASH_DUMP = 753;
1362
1363/// Specified buffer contains all zeros.
1364pub const BUFFER_ALL_ZEROS = 754;
1365
1366/// A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link.
1367pub const REPARSE_OBJECT = 755;
1368
1369/// The device has succeeded a query-stop and its resource requirements have changed.
1370pub const RESOURCE_REQUIREMENTS_CHANGED = 756;
1371
1372/// The translator has translated these resources into the global space and no further translations should be performed.
1373pub const TRANSLATION_COMPLETE = 757;
1374
1375/// A process being terminated has no threads to terminate.
1376pub const NOTHING_TO_TERMINATE = 758;
1377
1378/// The specified process is not part of a job.
1379pub const PROCESS_NOT_IN_JOB = 759;
1380
1381/// The specified process is part of a job.
1382pub const PROCESS_IN_JOB = 760;
1383
1384/// {Volume Shadow Copy Service} The system is now ready for hibernation.
1385pub const VOLSNAP_HIBERNATE_READY = 761;
1386
1387/// A file system or file system filter driver has successfully completed an FsFilter operation.
1388pub const FSFILTER_OP_COMPLETED_SUCCESSFULLY = 762;
1389
1390/// The specified interrupt vector was already connected.
1391pub const INTERRUPT_VECTOR_ALREADY_CONNECTED = 763;
1392
1393/// The specified interrupt vector is still connected.
1394pub const INTERRUPT_STILL_CONNECTED = 764;
1395
1396/// An operation is blocked waiting for an oplock.
1397pub const WAIT_FOR_OPLOCK = 765;
1398
1399/// Debugger handled exception.
1400pub const DBG_EXCEPTION_HANDLED = 766;
1401
1402/// Debugger continued.
1403pub const DBG_CONTINUE = 767;
1404
1405/// An exception occurred in a user mode callback and the kernel callback frame should be removed.
1406pub const CALLBACK_POP_STACK = 768;
1407
1408/// Compression is disabled for this volume.
1409pub const COMPRESSION_DISABLED = 769;
1410
1411/// The data provider cannot fetch backwards through a result set.
1412pub const CANTFETCHBACKWARDS = 770;
1413
1414/// The data provider cannot scroll backwards through a result set.
1415pub const CANTSCROLLBACKWARDS = 771;
1416
1417/// The data provider requires that previously fetched data is released before asking for more data.
1418pub const ROWSNOTRELEASED = 772;
1419
1420/// The data provider was not able to interpret the flags set for a column binding in an accessor.
1421pub const BAD_ACCESSOR_FLAGS = 773;
1422
1423/// One or more errors occurred while processing the request.
1424pub const ERRORS_ENCOUNTERED = 774;
1425
1426/// The implementation is not capable of performing the request.
1427pub const NOT_CAPABLE = 775;
1428
1429/// The client of a component requested an operation which is not valid given the state of the component instance.
1430pub const REQUEST_OUT_OF_SEQUENCE = 776;
1431
1432/// A version number could not be parsed.
1433pub const VERSION_PARSE_ERROR = 777;
1434
1435/// The iterator's start position is invalid.
1436pub const BADSTARTPOSITION = 778;
1437
1438/// The hardware has reported an uncorrectable memory error.
1439pub const MEMORY_HARDWARE = 779;
1440
1441/// The attempted operation required self healing to be enabled.
1442pub const DISK_REPAIR_DISABLED = 780;
1443
1444/// The Desktop heap encountered an error while allocating session memory. There is more information in the system event log.
1445pub const INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE = 781;
1446
1447/// The system power state is transitioning from %2 to %3.
1448pub const SYSTEM_POWERSTATE_TRANSITION = 782;
1449
1450/// The system power state is transitioning from %2 to %3 but could enter %4.
1451pub const SYSTEM_POWERSTATE_COMPLEX_TRANSITION = 783;
1452
1453/// A thread is getting dispatched with MCA EXCEPTION because of MCA.
1454pub const MCA_EXCEPTION = 784;
1455
1456/// Access to %1 is monitored by policy rule %2.
1457pub const ACCESS_AUDIT_BY_POLICY = 785;
1458
1459/// Access to %1 has been restricted by your Administrator by policy rule %2.
1460pub const ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY = 786;
1461
1462/// A valid hibernation file has been invalidated and should be abandoned.
1463pub const ABANDON_HIBERFILE = 787;
1464
1465/// {Delayed Write Failed} Windows was unable to save all the data for the file %hs; the data has been lost. This error may be caused by network connectivity issues. Please try to save this file elsewhere.
1466pub const LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED = 788;
1467
1468/// {Delayed Write Failed} Windows was unable to save all the data for the file %hs; the data has been lost. This error was returned by the server on which the file exists. Please try to save this file elsewhere.
1469pub const LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR = 789;
1470
1471/// {Delayed Write Failed} Windows was unable to save all the data for the file %hs; the data has been lost. This error may be caused if the device has been removed or the media is write-protected.
1472pub const LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR = 790;
1473
1474/// The resources required for this device conflict with the MCFG table.
1475pub const BAD_MCFG_TABLE = 791;
1476
1477/// The volume repair could not be performed while it is online. Please schedule to take the volume offline so that it can be repaired.
1478pub const DISK_REPAIR_REDIRECTED = 792;
1479
1480/// The volume repair was not successful.
1481pub const DISK_REPAIR_UNSUCCESSFUL = 793;
1482
1483/// One of the volume corruption logs is full. Further corruptions that may be detected won't be logged.
1484pub const CORRUPT_LOG_OVERFULL = 794;
1485
1486/// One of the volume corruption logs is internally corrupted and needs to be recreated. The volume may contain undetected corruptions and must be scanned.
1487pub const CORRUPT_LOG_CORRUPTED = 795;
1488
1489/// One of the volume corruption logs is unavailable for being operated on.
1490pub const CORRUPT_LOG_UNAVAILABLE = 796;
1491
1492/// One of the volume corruption logs was deleted while still having corruption records in them. The volume contains detected corruptions and must be scanned.
1493pub const CORRUPT_LOG_DELETED_FULL = 797;
1494
1495/// One of the volume corruption logs was cleared by chkdsk and no longer contains real corruptions.
1496pub const CORRUPT_LOG_CLEARED = 798;
1497
1498/// Orphaned files exist on the volume but could not be recovered because no more new names could be created in the recovery directory. Files must be moved from the recovery directory.
1499pub const ORPHAN_NAME_EXHAUSTED = 799;
1500
1501/// The oplock that was associated with this handle is now associated with a different handle.
1502pub const OPLOCK_SWITCHED_TO_NEW_HANDLE = 800;
1503
1504/// An oplock of the requested level cannot be granted. An oplock of a lower level may be available.
1505pub const CANNOT_GRANT_REQUESTED_OPLOCK = 801;
1506
1507/// The operation did not complete successfully because it would cause an oplock to be broken. The caller has requested that existing oplocks not be broken.
1508pub const CANNOT_BREAK_OPLOCK = 802;
1509
1510/// The handle with which this oplock was associated has been closed. The oplock is now broken.
1511pub const OPLOCK_HANDLE_CLOSED = 803;
1512
1513/// The specified access control entry (ACE) does not contain a condition.
1514pub const NO_ACE_CONDITION = 804;
1515
1516/// The specified access control entry (ACE) contains an invalid condition.
1517pub const INVALID_ACE_CONDITION = 805;
1518
1519/// Access to the specified file handle has been revoked.
1520pub const FILE_HANDLE_REVOKED = 806;
1521
1522/// An image file was mapped at a different address from the one specified in the image file but fixups will still be automatically performed on the image.
1523pub const IMAGE_AT_DIFFERENT_BASE = 807;
1524
1525/// Access to the extended attribute was denied.
1526pub const EA_ACCESS_DENIED = 994;
1527
1528/// The I/O operation has been aborted because of either a thread exit or an application request.
1529pub const OPERATION_ABORTED = 995;
1530
1531/// Overlapped I/O event is not in a signaled state.
1532pub const IO_INCOMPLETE = 996;
1533
1534/// Overlapped I/O operation is in progress.
1535pub const IO_PENDING = 997;
1536
1537/// Invalid access to memory location.
1538pub const NOACCESS = 998;
1539
1540/// Error performing inpage operation.
1541pub const SWAPERROR = 999;
1542
1543/// Recursion too deep; the stack overflowed.
1544pub const STACK_OVERFLOW = 1001;
1545
1546/// The window cannot act on the sent message.
1547pub const INVALID_MESSAGE = 1002;
1548
1549/// Cannot complete this function.
1550pub const CAN_NOT_COMPLETE = 1003;
1551
1552/// Invalid flags.
1553pub const INVALID_FLAGS = 1004;
1554
1555/// The volume does not contain a recognized file system. Please make sure that all required file system drivers are loaded and that the volume is not corrupted.
1556pub const UNRECOGNIZED_VOLUME = 1005;
1557
1558/// The volume for a file has been externally altered so that the opened file is no longer valid.
1559pub const FILE_INVALID = 1006;
1560
1561/// The requested operation cannot be performed in full-screen mode.
1562pub const FULLSCREEN_MODE = 1007;
1563
1564/// An attempt was made to reference a token that does not exist.
1565pub const NO_TOKEN = 1008;
1566
1567/// The configuration registry database is corrupt.
1568pub const BADDB = 1009;
1569
1570/// The configuration registry key is invalid.
1571pub const BADKEY = 1010;
1572
1573/// The configuration registry key could not be opened.
1574pub const CANTOPEN = 1011;
1575
1576/// The configuration registry key could not be read.
1577pub const CANTREAD = 1012;
1578
1579/// The configuration registry key could not be written.
1580pub const CANTWRITE = 1013;
1581
1582/// One of the files in the registry database had to be recovered by use of a log or alternate copy. The recovery was successful.
1583pub const REGISTRY_RECOVERED = 1014;
1584
1585/// The registry is corrupted. The structure of one of the files containing registry data is corrupted, or the system's memory image of the file is corrupted, or the file could not be recovered because the alternate copy or log was absent or corrupted.
1586pub const REGISTRY_CORRUPT = 1015;
1587
1588/// An I/O operation initiated by the registry failed unrecoverably. The registry could not read in, or write out, or flush, one of the files that contain the system's image of the registry.
1589pub const REGISTRY_IO_FAILED = 1016;
1590
1591/// The system has attempted to load or restore a file into the registry, but the specified file is not in a registry file format.
1592pub const NOT_REGISTRY_FILE = 1017;
1593
1594/// Illegal operation attempted on a registry key that has been marked for deletion.
1595pub const KEY_DELETED = 1018;
1596
1597/// System could not allocate the required space in a registry log.
1598pub const NO_LOG_SPACE = 1019;
1599
1600/// Cannot create a symbolic link in a registry key that already has subkeys or values.
1601pub const KEY_HAS_CHILDREN = 1020;
1602
1603/// Cannot create a stable subkey under a volatile parent key.
1604pub const CHILD_MUST_BE_VOLATILE = 1021;
1605
1606/// A notify change request is being completed and the information is not being returned in the caller's buffer. The caller now needs to enumerate the files to find the changes.
1607pub const NOTIFY_ENUM_DIR = 1022;
1608
1609/// A stop control has been sent to a service that other running services are dependent on.
1610pub const DEPENDENT_SERVICES_RUNNING = 1051;
1611
1612/// The requested control is not valid for this service.
1613pub const INVALID_SERVICE_CONTROL = 1052;
1614
1615/// The service did not respond to the start or control request in a timely fashion.
1616pub const SERVICE_REQUEST_TIMEOUT = 1053;
1617
1618/// A thread could not be created for the service.
1619pub const SERVICE_NO_THREAD = 1054;
1620
1621/// The service database is locked.
1622pub const SERVICE_DATABASE_LOCKED = 1055;
1623
1624/// An instance of the service is already running.
1625pub const SERVICE_ALREADY_RUNNING = 1056;
1626
1627/// The account name is invalid or does not exist, or the password is invalid for the account name specified.
1628pub const INVALID_SERVICE_ACCOUNT = 1057;
1629
1630/// The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
1631pub const SERVICE_DISABLED = 1058;
1632
1633/// Circular service dependency was specified.
1634pub const CIRCULAR_DEPENDENCY = 1059;
1635
1636/// The specified service does not exist as an installed service.
1637pub const SERVICE_DOES_NOT_EXIST = 1060;
1638
1639/// The service cannot accept control messages at this time.
1640pub const SERVICE_CANNOT_ACCEPT_CTRL = 1061;
1641
1642/// The service has not been started.
1643pub const SERVICE_NOT_ACTIVE = 1062;
1644
1645/// The service process could not connect to the service controller.
1646pub const FAILED_SERVICE_CONTROLLER_CONNECT = 1063;
1647
1648/// An exception occurred in the service when handling the control request.
1649pub const EXCEPTION_IN_SERVICE = 1064;
1650
1651/// The database specified does not exist.
1652pub const DATABASE_DOES_NOT_EXIST = 1065;
1653
1654/// The service has returned a service-specific error code.
1655pub const SERVICE_SPECIFIC_ERROR = 1066;
1656
1657/// The process terminated unexpectedly.
1658pub const PROCESS_ABORTED = 1067;
1659
1660/// The dependency service or group failed to start.
1661pub const SERVICE_DEPENDENCY_FAIL = 1068;
1662
1663/// The service did not start due to a logon failure.
1664pub const SERVICE_LOGON_FAILED = 1069;
1665
1666/// After starting, the service hung in a start-pending state.
1667pub const SERVICE_START_HANG = 1070;
1668
1669/// The specified service database lock is invalid.
1670pub const INVALID_SERVICE_LOCK = 1071;
1671
1672/// The specified service has been marked for deletion.
1673pub const SERVICE_MARKED_FOR_DELETE = 1072;
1674
1675/// The specified service already exists.
1676pub const SERVICE_EXISTS = 1073;
1677
1678/// The system is currently running with the last-known-good configuration.
1679pub const ALREADY_RUNNING_LKG = 1074;
1680
1681/// The dependency service does not exist or has been marked for deletion.
1682pub const SERVICE_DEPENDENCY_DELETED = 1075;
1683
1684/// The current boot has already been accepted for use as the last-known-good control set.
1685pub const BOOT_ALREADY_ACCEPTED = 1076;
1686
1687/// No attempts to start the service have been made since the last boot.
1688pub const SERVICE_NEVER_STARTED = 1077;
1689
1690/// The name is already in use as either a service name or a service display name.
1691pub const DUPLICATE_SERVICE_NAME = 1078;
1692
1693/// The account specified for this service is different from the account specified for other services running in the same process.
1694pub const DIFFERENT_SERVICE_ACCOUNT = 1079;
1695
1696/// Failure actions can only be set for Win32 services, not for drivers.
1697pub const CANNOT_DETECT_DRIVER_FAILURE = 1080;
1698
1699/// This service runs in the same process as the service control manager. Therefore, the service control manager cannot take action if this service's process terminates unexpectedly.
1700pub const CANNOT_DETECT_PROCESS_ABORT = 1081;
1701
1702/// No recovery program has been configured for this service.
1703pub const NO_RECOVERY_PROGRAM = 1082;
1704
1705/// The executable program that this service is configured to run in does not implement the service.
1706pub const SERVICE_NOT_IN_EXE = 1083;
1707
1708/// This service cannot be started in Safe Mode.
1709pub const NOT_SAFEBOOT_SERVICE = 1084;
1710
1711/// The physical end of the tape has been reached.
1712pub const END_OF_MEDIA = 1100;
1713
1714/// A tape access reached a filemark.
1715pub const FILEMARK_DETECTED = 1101;
1716
1717/// The beginning of the tape or a partition was encountered.
1718pub const BEGINNING_OF_MEDIA = 1102;
1719
1720/// A tape access reached the end of a set of files.
1721pub const SETMARK_DETECTED = 1103;
1722
1723/// No more data is on the tape.
1724pub const NO_DATA_DETECTED = 1104;
1725
1726/// Tape could not be partitioned.
1727pub const PARTITION_FAILURE = 1105;
1728
1729/// When accessing a new tape of a multivolume partition, the current block size is incorrect.
1730pub const INVALID_BLOCK_LENGTH = 1106;
1731
1732/// Tape partition information could not be found when loading a tape.
1733pub const DEVICE_NOT_PARTITIONED = 1107;
1734
1735/// Unable to lock the media eject mechanism.
1736pub const UNABLE_TO_LOCK_MEDIA = 1108;
1737
1738/// Unable to unload the media.
1739pub const UNABLE_TO_UNLOAD_MEDIA = 1109;
1740
1741/// The media in the drive may have changed.
1742pub const MEDIA_CHANGED = 1110;
1743
1744/// The I/O bus was reset.
1745pub const BUS_RESET = 1111;
1746
1747/// No media in drive.
1748pub const NO_MEDIA_IN_DRIVE = 1112;
1749
1750/// No mapping for the Unicode character exists in the target multi-byte code page.
1751pub const NO_UNICODE_TRANSLATION = 1113;
1752
1753/// A dynamic link library (DLL) initialization routine failed.
1754pub const DLL_INIT_FAILED = 1114;
1755
1756/// A system shutdown is in progress.
1757pub const SHUTDOWN_IN_PROGRESS = 1115;
1758
1759/// Unable to abort the system shutdown because no shutdown was in progress.
1760pub const NO_SHUTDOWN_IN_PROGRESS = 1116;
1761
1762/// The request could not be performed because of an I/O device error.
1763pub const IO_DEVICE = 1117;
1764
1765/// No serial device was successfully initialized. The serial driver will unload.
1766pub const SERIAL_NO_DEVICE = 1118;
1767
1768/// Unable to open a device that was sharing an interrupt request (IRQ) with other devices. At least one other device that uses that IRQ was already opened.
1769pub const IRQ_BUSY = 1119;
1770
1771/// A serial I/O operation was completed by another write to the serial port. The IOCTL_SERIAL_XOFF_COUNTER reached zero.)
1772pub const MORE_WRITES = 1120;
1773
1774/// A serial I/O operation completed because the timeout period expired. The IOCTL_SERIAL_XOFF_COUNTER did not reach zero.)
1775pub const COUNTER_TIMEOUT = 1121;
1776
1777/// No ID address mark was found on the floppy disk.
1778pub const FLOPPY_ID_MARK_NOT_FOUND = 1122;
1779
1780/// Mismatch between the floppy disk sector ID field and the floppy disk controller track address.
1781pub const FLOPPY_WRONG_CYLINDER = 1123;
1782
1783/// The floppy disk controller reported an error that is not recognized by the floppy disk driver.
1784pub const FLOPPY_UNKNOWN_ERROR = 1124;
1785
1786/// The floppy disk controller returned inconsistent results in its registers.
1787pub const FLOPPY_BAD_REGISTERS = 1125;
1788
1789/// While accessing the hard disk, a recalibrate operation failed, even after retries.
1790pub const DISK_RECALIBRATE_FAILED = 1126;
1791
1792/// While accessing the hard disk, a disk operation failed even after retries.
1793pub const DISK_OPERATION_FAILED = 1127;
1794
1795/// While accessing the hard disk, a disk controller reset was needed, but even that failed.
1796pub const DISK_RESET_FAILED = 1128;
1797
1798/// Physical end of tape encountered.
1799pub const EOM_OVERFLOW = 1129;
1800
1801/// Not enough server storage is available to process this command.
1802pub const NOT_ENOUGH_SERVER_MEMORY = 1130;
1803
1804/// A potential deadlock condition has been detected.
1805pub const POSSIBLE_DEADLOCK = 1131;
1806
1807/// The base address or the file offset specified does not have the proper alignment.
1808pub const MAPPED_ALIGNMENT = 1132;
1809
1810/// An attempt to change the system power state was vetoed by another application or driver.
1811pub const SET_POWER_STATE_VETOED = 1140;
1812
1813/// The system BIOS failed an attempt to change the system power state.
1814pub const SET_POWER_STATE_FAILED = 1141;
1815
1816/// An attempt was made to create more links on a file than the file system supports.
1817pub const TOO_MANY_LINKS = 1142;
1818
1819/// The specified program requires a newer version of Windows.
1820pub const OLD_WIN_VERSION = 1150;
1821
1822/// The specified program is not a Windows or MS-DOS program.
1823pub const APP_WRONG_OS = 1151;
1824
1825/// Cannot start more than one instance of the specified program.
1826pub const SINGLE_INSTANCE_APP = 1152;
1827
1828/// The specified program was written for an earlier version of Windows.
1829pub const RMODE_APP = 1153;
1830
1831/// One of the library files needed to run this application is damaged.
1832pub const INVALID_DLL = 1154;
1833
1834/// No application is associated with the specified file for this operation.
1835pub const NO_ASSOCIATION = 1155;
1836
1837/// An error occurred in sending the command to the application.
1838pub const DDE_FAIL = 1156;
1839
1840/// One of the library files needed to run this application cannot be found.
1841pub const DLL_NOT_FOUND = 1157;
1842
1843/// The current process has used all of its system allowance of handles for Window Manager objects.
1844pub const NO_MORE_USER_HANDLES = 1158;
1845
1846/// The message can be used only with synchronous operations.
1847pub const MESSAGE_SYNC_ONLY = 1159;
1848
1849/// The indicated source element has no media.
1850pub const SOURCE_ELEMENT_EMPTY = 1160;
1851
1852/// The indicated destination element already contains media.
1853pub const DESTINATION_ELEMENT_FULL = 1161;
1854
1855/// The indicated element does not exist.
1856pub const ILLEGAL_ELEMENT_ADDRESS = 1162;
1857
1858/// The indicated element is part of a magazine that is not present.
1859pub const MAGAZINE_NOT_PRESENT = 1163;
1860
1861/// The indicated device requires reinitialization due to hardware errors.
1862pub const DEVICE_REINITIALIZATION_NEEDED = 1164;
1863
1864/// The device has indicated that cleaning is required before further operations are attempted.
1865pub const DEVICE_REQUIRES_CLEANING = 1165;
1866
1867/// The device has indicated that its door is open.
1868pub const DEVICE_DOOR_OPEN = 1166;
1869
1870/// The device is not connected.
1871pub const DEVICE_NOT_CONNECTED = 1167;
1872
1873/// Element not found.
1874pub const NOT_FOUND = 1168;
1875
1876/// There was no match for the specified key in the index.
1877pub const NO_MATCH = 1169;
1878
1879/// The property set specified does not exist on the object.
1880pub const SET_NOT_FOUND = 1170;
1881
1882/// The point passed to GetMouseMovePoints is not in the buffer.
1883pub const POINT_NOT_FOUND = 1171;
1884
1885/// The tracking (workstation) service is not running.
1886pub const NO_TRACKING_SERVICE = 1172;
1887
1888/// The Volume ID could not be found.
1889pub const NO_VOLUME_ID = 1173;
1890
1891/// Unable to remove the file to be replaced.
1892pub const UNABLE_TO_REMOVE_REPLACED = 1175;
1893
1894/// Unable to move the replacement file to the file to be replaced. The file to be replaced has retained its original name.
1895pub const UNABLE_TO_MOVE_REPLACEMENT = 1176;
1896
1897/// Unable to move the replacement file to the file to be replaced. The file to be replaced has been renamed using the backup name.
1898pub const UNABLE_TO_MOVE_REPLACEMENT_2 = 1177;
1899
1900/// The volume change journal is being deleted.
1901pub const JOURNAL_DELETE_IN_PROGRESS = 1178;
1902
1903/// The volume change journal is not active.
1904pub const JOURNAL_NOT_ACTIVE = 1179;
1905
1906/// A file was found, but it may not be the correct file.
1907pub const POTENTIAL_FILE_FOUND = 1180;
1908
1909/// The journal entry has been deleted from the journal.
1910pub const JOURNAL_ENTRY_DELETED = 1181;
1911
1912/// A system shutdown has already been scheduled.
1913pub const SHUTDOWN_IS_SCHEDULED = 1190;
1914
1915/// The system shutdown cannot be initiated because there are other users logged on to the computer.
1916pub const SHUTDOWN_USERS_LOGGED_ON = 1191;
1917
1918/// The specified device name is invalid.
1919pub const BAD_DEVICE = 1200;
1920
1921/// The device is not currently connected but it is a remembered connection.
1922pub const CONNECTION_UNAVAIL = 1201;
1923
1924/// The local device name has a remembered connection to another network resource.
1925pub const DEVICE_ALREADY_REMEMBERED = 1202;
1926
1927/// The network path was either typed incorrectly, does not exist, or the network provider is not currently available. Please try retyping the path or contact your network administrator.
1928pub const NO_NET_OR_BAD_PATH = 1203;
1929
1930/// The specified network provider name is invalid.
1931pub const BAD_PROVIDER = 1204;
1932
1933/// Unable to open the network connection profile.
1934pub const CANNOT_OPEN_PROFILE = 1205;
1935
1936/// The network connection profile is corrupted.
1937pub const BAD_PROFILE = 1206;
1938
1939/// Cannot enumerate a noncontainer.
1940pub const NOT_CONTAINER = 1207;
1941
1942/// An extended error has occurred.
1943pub const EXTENDED_ERROR = 1208;
1944
1945/// The format of the specified group name is invalid.
1946pub const INVALID_GROUPNAME = 1209;
1947
1948/// The format of the specified computer name is invalid.
1949pub const INVALID_COMPUTERNAME = 1210;
1950
1951/// The format of the specified event name is invalid.
1952pub const INVALID_EVENTNAME = 1211;
1953
1954/// The format of the specified domain name is invalid.
1955pub const INVALID_DOMAINNAME = 1212;
1956
1957/// The format of the specified service name is invalid.
1958pub const INVALID_SERVICENAME = 1213;
1959
1960/// The format of the specified network name is invalid.
1961pub const INVALID_NETNAME = 1214;
1962
1963/// The format of the specified share name is invalid.
1964pub const INVALID_SHARENAME = 1215;
1965
1966/// The format of the specified password is invalid.
1967pub const INVALID_PASSWORDNAME = 1216;
1968
1969/// The format of the specified message name is invalid.
1970pub const INVALID_MESSAGENAME = 1217;
1971
1972/// The format of the specified message destination is invalid.
1973pub const INVALID_MESSAGEDEST = 1218;
1974
1975/// Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.
1976pub const SESSION_CREDENTIAL_CONFLICT = 1219;
1977
1978/// An attempt was made to establish a session to a network server, but there are already too many sessions established to that server.
1979pub const REMOTE_SESSION_LIMIT_EXCEEDED = 1220;
1980
1981/// The workgroup or domain name is already in use by another computer on the network.
1982pub const DUP_DOMAINNAME = 1221;
1983
1984/// The network is not present or not started.
1985pub const NO_NETWORK = 1222;
1986
1987/// The operation was canceled by the user.
1988pub const CANCELLED = 1223;
1989
1990/// The requested operation cannot be performed on a file with a user-mapped section open.
1991pub const USER_MAPPED_FILE = 1224;
1992
1993/// The remote computer refused the network connection.
1994pub const CONNECTION_REFUSED = 1225;
1995
1996/// The network connection was gracefully closed.
1997pub const GRACEFUL_DISCONNECT = 1226;
1998
1999/// The network transport endpoint already has an address associated with it.
2000pub const ADDRESS_ALREADY_ASSOCIATED = 1227;
2001
2002/// An address has not yet been associated with the network endpoint.
2003pub const ADDRESS_NOT_ASSOCIATED = 1228;
2004
2005/// An operation was attempted on a nonexistent network connection.
2006pub const CONNECTION_INVALID = 1229;
2007
2008/// An invalid operation was attempted on an active network connection.
2009pub const CONNECTION_ACTIVE = 1230;
2010
2011/// The network location cannot be reached. For information about network troubleshooting, see Windows Help.
2012pub const NETWORK_UNREACHABLE = 1231;
2013
2014/// The network location cannot be reached. For information about network troubleshooting, see Windows Help.
2015pub const HOST_UNREACHABLE = 1232;
2016
2017/// The network location cannot be reached. For information about network troubleshooting, see Windows Help.
2018pub const PROTOCOL_UNREACHABLE = 1233;
2019
2020/// No service is operating at the destination network endpoint on the remote system.
2021pub const PORT_UNREACHABLE = 1234;
2022
2023/// The request was aborted.
2024pub const REQUEST_ABORTED = 1235;
2025
2026/// The network connection was aborted by the local system.
2027pub const CONNECTION_ABORTED = 1236;
2028
2029/// The operation could not be completed. A retry should be performed.
2030pub const RETRY = 1237;
2031
2032/// A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached.
2033pub const CONNECTION_COUNT_LIMIT = 1238;
2034
2035/// Attempting to log in during an unauthorized time of day for this account.
2036pub const LOGIN_TIME_RESTRICTION = 1239;
2037
2038/// The account is not authorized to log in from this station.
2039pub const LOGIN_WKSTA_RESTRICTION = 1240;
2040
2041/// The network address could not be used for the operation requested.
2042pub const INCORRECT_ADDRESS = 1241;
2043
2044/// The service is already registered.
2045pub const ALREADY_REGISTERED = 1242;
2046
2047/// The specified service does not exist.
2048pub const SERVICE_NOT_FOUND = 1243;
2049
2050/// The operation being requested was not performed because the user has not been authenticated.
2051pub const NOT_AUTHENTICATED = 1244;
2052
2053/// The operation being requested was not performed because the user has not logged on to the network. The specified service does not exist.
2054pub const NOT_LOGGED_ON = 1245;
2055
2056/// Continue with work in progress.
2057pub const CONTINUE = 1246;
2058
2059/// An attempt was made to perform an initialization operation when initialization has already been completed.
2060pub const ALREADY_INITIALIZED = 1247;
2061
2062/// No more local devices.
2063pub const NO_MORE_DEVICES = 1248;
2064
2065/// The specified site does not exist.
2066pub const NO_SUCH_SITE = 1249;
2067
2068/// A domain controller with the specified name already exists.
2069pub const DOMAIN_CONTROLLER_EXISTS = 1250;
2070
2071/// This operation is supported only when you are connected to the server.
2072pub const ONLY_IF_CONNECTED = 1251;
2073
2074/// The group policy framework should call the extension even if there are no changes.
2075pub const OVERRIDE_NOCHANGES = 1252;
2076
2077/// The specified user does not have a valid profile.
2078pub const BAD_USER_PROFILE = 1253;
2079
2080/// This operation is not supported on a computer running Windows Server 2003 for Small Business Server.
2081pub const NOT_SUPPORTED_ON_SBS = 1254;
2082
2083/// The server machine is shutting down.
2084pub const SERVER_SHUTDOWN_IN_PROGRESS = 1255;
2085
2086/// The remote system is not available. For information about network troubleshooting, see Windows Help.
2087pub const HOST_DOWN = 1256;
2088
2089/// The security identifier provided is not from an account domain.
2090pub const NON_ACCOUNT_SID = 1257;
2091
2092/// The security identifier provided does not have a domain component.
2093pub const NON_DOMAIN_SID = 1258;
2094
2095/// AppHelp dialog canceled thus preventing the application from starting.
2096pub const APPHELP_BLOCK = 1259;
2097
2098/// This program is blocked by group policy. For more information, contact your system administrator.
2099pub const ACCESS_DISABLED_BY_POLICY = 1260;
2100
2101/// A program attempt to use an invalid register value. Normally caused by an uninitialized register. This error is Itanium specific.
2102pub const REG_NAT_CONSUMPTION = 1261;
2103
2104/// The share is currently offline or does not exist.
2105pub const CSCSHARE_OFFLINE = 1262;
2106
2107/// The Kerberos protocol encountered an error while validating the KDC certificate during smartcard logon. There is more information in the system event log.
2108pub const PKINIT_FAILURE = 1263;
2109
2110/// The Kerberos protocol encountered an error while attempting to utilize the smartcard subsystem.
2111pub const SMARTCARD_SUBSYSTEM_FAILURE = 1264;
2112
2113/// The system cannot contact a domain controller to service the authentication request. Please try again later.
2114pub const DOWNGRADE_DETECTED = 1265;
2115
2116/// The machine is locked and cannot be shut down without the force option.
2117pub const MACHINE_LOCKED = 1271;
2118
2119/// An application-defined callback gave invalid data when called.
2120pub const CALLBACK_SUPPLIED_INVALID_DATA = 1273;
2121
2122/// The group policy framework should call the extension in the synchronous foreground policy refresh.
2123pub const SYNC_FOREGROUND_REFRESH_REQUIRED = 1274;
2124
2125/// This driver has been blocked from loading.
2126pub const DRIVER_BLOCKED = 1275;
2127
2128/// A dynamic link library (DLL) referenced a module that was neither a DLL nor the process's executable image.
2129pub const INVALID_IMPORT_OF_NON_DLL = 1276;
2130
2131/// Windows cannot open this program since it has been disabled.
2132pub const ACCESS_DISABLED_WEBBLADE = 1277;
2133
2134/// Windows cannot open this program because the license enforcement system has been tampered with or become corrupted.
2135pub const ACCESS_DISABLED_WEBBLADE_TAMPER = 1278;
2136
2137/// A transaction recover failed.
2138pub const RECOVERY_FAILURE = 1279;
2139
2140/// The current thread has already been converted to a fiber.
2141pub const ALREADY_FIBER = 1280;
2142
2143/// The current thread has already been converted from a fiber.
2144pub const ALREADY_THREAD = 1281;
2145
2146/// The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application.
2147pub const STACK_BUFFER_OVERRUN = 1282;
2148
2149/// Data present in one of the parameters is more than the function can operate on.
2150pub const PARAMETER_QUOTA_EXCEEDED = 1283;
2151
2152/// An attempt to do an operation on a debug object failed because the object is in the process of being deleted.
2153pub const DEBUGGER_INACTIVE = 1284;
2154
2155/// An attempt to delay-load a .dll or get a function address in a delay-loaded .dll failed.
2156pub const DELAY_LOAD_FAILED = 1285;
2157
2158/// %1 is a 16-bit application. You do not have permissions to execute 16-bit applications. Check your permissions with your system administrator.
2159pub const VDM_DISALLOWED = 1286;
2160
2161/// Insufficient information exists to identify the cause of failure.
2162pub const UNIDENTIFIED_ERROR = 1287;
2163
2164/// The parameter passed to a C runtime function is incorrect.
2165pub const INVALID_CRUNTIME_PARAMETER = 1288;
2166
2167/// The operation occurred beyond the valid data length of the file.
2168pub const BEYOND_VDL = 1289;
2169
2170/// The service start failed since one or more services in the same process have an incompatible service SID type setting. A service with restricted service SID type can only coexist in the same process with other services with a restricted SID type. If the service SID type for this service was just configured, the hosting process must be restarted in order to start this service.
2171/// On Windows Server 2003 and Windows XP, an unrestricted service cannot coexist in the same process with other services. The service with the unrestricted service SID type must be moved to an owned process in order to start this service.
2172pub const INCOMPATIBLE_SERVICE_SID_TYPE = 1290;
2173
2174/// The process hosting the driver for this device has been terminated.
2175pub const DRIVER_PROCESS_TERMINATED = 1291;
2176
2177/// An operation attempted to exceed an implementation-defined limit.
2178pub const IMPLEMENTATION_LIMIT = 1292;
2179
2180/// Either the target process, or the target thread's containing process, is a protected process.
2181pub const PROCESS_IS_PROTECTED = 1293;
2182
2183/// The service notification client is lagging too far behind the current state of services in the machine.
2184pub const SERVICE_NOTIFY_CLIENT_LAGGING = 1294;
2185
2186/// The requested file operation failed because the storage quota was exceeded. To free up disk space, move files to a different location or delete unnecessary files. For more information, contact your system administrator.
2187pub const DISK_QUOTA_EXCEEDED = 1295;
2188
2189/// The requested file operation failed because the storage policy blocks that type of file. For more information, contact your system administrator.
2190pub const CONTENT_BLOCKED = 1296;
2191
2192/// A privilege that the service requires to function properly does not exist in the service account configuration. You may use the Services Microsoft Management Console (MMC) snap-in (services.msc) and the Local Security Settings MMC snap-in (secpol.msc) to view the service configuration and the account configuration.
2193pub const INCOMPATIBLE_SERVICE_PRIVILEGE = 1297;
2194
2195/// A thread involved in this operation appears to be unresponsive.
2196pub const APP_HANG = 1298;
2197
2198/// Indicates a particular Security ID may not be assigned as the label of an object.
2199pub const INVALID_LABEL = 1299;
2200
2201/// Not all privileges or groups referenced are assigned to the caller.
2202pub const NOT_ALL_ASSIGNED = 1300;
2203
2204/// Some mapping between account names and security IDs was not done.
2205pub const SOME_NOT_MAPPED = 1301;
2206
2207/// No system quota limits are specifically set for this account.
2208pub const NO_QUOTAS_FOR_ACCOUNT = 1302;
2209
2210/// No encryption key is available. A well-known encryption key was returned.
2211pub const LOCAL_USER_SESSION_KEY = 1303;
2212
2213/// The password is too complex to be converted to a LAN Manager password. The LAN Manager password returned is a NULL string.
2214pub const NULL_LM_PASSWORD = 1304;
2215
2216/// The revision level is unknown.
2217pub const UNKNOWN_REVISION = 1305;
2218
2219/// Indicates two revision levels are incompatible.
2220pub const REVISION_MISMATCH = 1306;
2221
2222/// This security ID may not be assigned as the owner of this object.
2223pub const INVALID_OWNER = 1307;
2224
2225/// This security ID may not be assigned as the primary group of an object.
2226pub const INVALID_PRIMARY_GROUP = 1308;
2227
2228/// An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client.
2229pub const NO_IMPERSONATION_TOKEN = 1309;
2230
2231/// The group may not be disabled.
2232pub const CANT_DISABLE_MANDATORY = 1310;
2233
2234/// There are currently no logon servers available to service the logon request.
2235pub const NO_LOGON_SERVERS = 1311;
2236
2237/// A specified logon session does not exist. It may already have been terminated.
2238pub const NO_SUCH_LOGON_SESSION = 1312;
2239
2240/// A specified privilege does not exist.
2241pub const NO_SUCH_PRIVILEGE = 1313;
2242
2243/// A required privilege is not held by the client.
2244pub const PRIVILEGE_NOT_HELD = 1314;
2245
2246/// The name provided is not a properly formed account name.
2247pub const INVALID_ACCOUNT_NAME = 1315;
2248
2249/// The specified account already exists.
2250pub const USER_EXISTS = 1316;
2251
2252/// The specified account does not exist.
2253pub const NO_SUCH_USER = 1317;
2254
2255/// The specified group already exists.
2256pub const GROUP_EXISTS = 1318;
2257
2258/// The specified group does not exist.
2259pub const NO_SUCH_GROUP = 1319;
2260
2261/// Either the specified user account is already a member of the specified group, or the specified group cannot be deleted because it contains a member.
2262pub const MEMBER_IN_GROUP = 1320;
2263
2264/// The specified user account is not a member of the specified group account.
2265pub const MEMBER_NOT_IN_GROUP = 1321;
2266
2267/// This operation is disallowed as it could result in an administration account being disabled, deleted or unable to log on.
2268pub const LAST_ADMIN = 1322;
2269
2270/// Unable to update the password. The value provided as the current password is incorrect.
2271pub const WRONG_PASSWORD = 1323;
2272
2273/// Unable to update the password. The value provided for the new password contains values that are not allowed in passwords.
2274pub const ILL_FORMED_PASSWORD = 1324;
2275
2276/// Unable to update the password. The value provided for the new password does not meet the length, complexity, or history requirements of the domain.
2277pub const PASSWORD_RESTRICTION = 1325;
2278
2279/// The user name or password is incorrect.
2280pub const LOGON_FAILURE = 1326;
2281
2282/// Account restrictions are preventing this user from signing in. For example: blank passwords aren't allowed, sign-in times are limited, or a policy restriction has been enforced.
2283pub const ACCOUNT_RESTRICTION = 1327;
2284
2285/// Your account has time restrictions that keep you from signing in right now.
2286pub const INVALID_LOGON_HOURS = 1328;
2287
2288/// This user isn't allowed to sign in to this computer.
2289pub const INVALID_WORKSTATION = 1329;
2290
2291/// The password for this account has expired.
2292pub const PASSWORD_EXPIRED = 1330;
2293
2294/// This user can't sign in because this account is currently disabled.
2295pub const ACCOUNT_DISABLED = 1331;
2296
2297/// No mapping between account names and security IDs was done.
2298pub const NONE_MAPPED = 1332;
2299
2300/// Too many local user identifiers (LUIDs) were requested at one time.
2301pub const TOO_MANY_LUIDS_REQUESTED = 1333;
2302
2303/// No more local user identifiers (LUIDs) are available.
2304pub const LUIDS_EXHAUSTED = 1334;
2305
2306/// The subauthority part of a security ID is invalid for this particular use.
2307pub const INVALID_SUB_AUTHORITY = 1335;
2308
2309/// The access control list (ACL) structure is invalid.
2310pub const INVALID_ACL = 1336;
2311
2312/// The security ID structure is invalid.
2313pub const INVALID_SID = 1337;
2314
2315/// The security descriptor structure is invalid.
2316pub const INVALID_SECURITY_DESCR = 1338;
2317
2318/// The inherited access control list (ACL) or access control entry (ACE) could not be built.
2319pub const BAD_INHERITANCE_ACL = 1340;
2320
2321/// The server is currently disabled.
2322pub const SERVER_DISABLED = 1341;
2323
2324/// The server is currently enabled.
2325pub const SERVER_NOT_DISABLED = 1342;
2326
2327/// The value provided was an invalid value for an identifier authority.
2328pub const INVALID_ID_AUTHORITY = 1343;
2329
2330/// No more memory is available for security information updates.
2331pub const ALLOTTED_SPACE_EXCEEDED = 1344;
2332
2333/// The specified attributes are invalid, or incompatible with the attributes for the group as a whole.
2334pub const INVALID_GROUP_ATTRIBUTES = 1345;
2335
2336/// Either a required impersonation level was not provided, or the provided impersonation level is invalid.
2337pub const BAD_IMPERSONATION_LEVEL = 1346;
2338
2339/// Cannot open an anonymous level security token.
2340pub const CANT_OPEN_ANONYMOUS = 1347;
2341
2342/// The validation information class requested was invalid.
2343pub const BAD_VALIDATION_CLASS = 1348;
2344
2345/// The type of the token is inappropriate for its attempted use.
2346pub const BAD_TOKEN_TYPE = 1349;
2347
2348/// Unable to perform a security operation on an object that has no associated security.
2349pub const NO_SECURITY_ON_OBJECT = 1350;
2350
2351/// Configuration information could not be read from the domain controller, either because the machine is unavailable, or access has been denied.
2352pub const CANT_ACCESS_DOMAIN_INFO = 1351;
2353
2354/// The security account manager (SAM) or local security authority (LSA) server was in the wrong state to perform the security operation.
2355pub const INVALID_SERVER_STATE = 1352;
2356
2357/// The domain was in the wrong state to perform the security operation.
2358pub const INVALID_DOMAIN_STATE = 1353;
2359
2360/// This operation is only allowed for the Primary Domain Controller of the domain.
2361pub const INVALID_DOMAIN_ROLE = 1354;
2362
2363/// The specified domain either does not exist or could not be contacted.
2364pub const NO_SUCH_DOMAIN = 1355;
2365
2366/// The specified domain already exists.
2367pub const DOMAIN_EXISTS = 1356;
2368
2369/// An attempt was made to exceed the limit on the number of domains per server.
2370pub const DOMAIN_LIMIT_EXCEEDED = 1357;
2371
2372/// Unable to complete the requested operation because of either a catastrophic media failure or a data structure corruption on the disk.
2373pub const INTERNAL_DB_CORRUPTION = 1358;
2374
2375/// An internal error occurred.
2376pub const INTERNAL_ERROR = 1359;
2377
2378/// Generic access types were contained in an access mask which should already be mapped to nongeneric types.
2379pub const GENERIC_NOT_MAPPED = 1360;
2380
2381/// A security descriptor is not in the right format (absolute or self-relative).
2382pub const BAD_DESCRIPTOR_FORMAT = 1361;
2383
2384/// The requested action is restricted for use by logon processes only. The calling process has not registered as a logon process.
2385pub const NOT_LOGON_PROCESS = 1362;
2386
2387/// Cannot start a new logon session with an ID that is already in use.
2388pub const LOGON_SESSION_EXISTS = 1363;
2389
2390/// A specified authentication package is unknown.
2391pub const NO_SUCH_PACKAGE = 1364;
2392
2393/// The logon session is not in a state that is consistent with the requested operation.
2394pub const BAD_LOGON_SESSION_STATE = 1365;
2395
2396/// The logon session ID is already in use.
2397pub const LOGON_SESSION_COLLISION = 1366;
2398
2399/// A logon request contained an invalid logon type value.
2400pub const INVALID_LOGON_TYPE = 1367;
2401
2402/// Unable to impersonate using a named pipe until data has been read from that pipe.
2403pub const CANNOT_IMPERSONATE = 1368;
2404
2405/// The transaction state of a registry subtree is incompatible with the requested operation.
2406pub const RXACT_INVALID_STATE = 1369;
2407
2408/// An internal security database corruption has been encountered.
2409pub const RXACT_COMMIT_FAILURE = 1370;
2410
2411/// Cannot perform this operation on built-in accounts.
2412pub const SPECIAL_ACCOUNT = 1371;
2413
2414/// Cannot perform this operation on this built-in special group.
2415pub const SPECIAL_GROUP = 1372;
2416
2417/// Cannot perform this operation on this built-in special user.
2418pub const SPECIAL_USER = 1373;
2419
2420/// The user cannot be removed from a group because the group is currently the user's primary group.
2421pub const MEMBERS_PRIMARY_GROUP = 1374;
2422
2423/// The token is already in use as a primary token.
2424pub const TOKEN_ALREADY_IN_USE = 1375;
2425
2426/// The specified local group does not exist.
2427pub const NO_SUCH_ALIAS = 1376;
2428
2429/// The specified account name is not a member of the group.
2430pub const MEMBER_NOT_IN_ALIAS = 1377;
2431
2432/// The specified account name is already a member of the group.
2433pub const MEMBER_IN_ALIAS = 1378;
2434
2435/// The specified local group already exists.
2436pub const ALIAS_EXISTS = 1379;
2437
2438/// Logon failure: the user has not been granted the requested logon type at this computer.
2439pub const LOGON_NOT_GRANTED = 1380;
2440
2441/// The maximum number of secrets that may be stored in a single system has been exceeded.
2442pub const TOO_MANY_SECRETS = 1381;
2443
2444/// The length of a secret exceeds the maximum length allowed.
2445pub const SECRET_TOO_LONG = 1382;
2446
2447/// The local security authority database contains an internal inconsistency.
2448pub const INTERNAL_DB_ERROR = 1383;
2449
2450/// During a logon attempt, the user's security context accumulated too many security IDs.
2451pub const TOO_MANY_CONTEXT_IDS = 1384;
2452
2453/// Logon failure: the user has not been granted the requested logon type at this computer.
2454pub const LOGON_TYPE_NOT_GRANTED = 1385;
2455
2456/// A cross-encrypted password is necessary to change a user password.
2457pub const NT_CROSS_ENCRYPTION_REQUIRED = 1386;
2458
2459/// A member could not be added to or removed from the local group because the member does not exist.
2460pub const NO_SUCH_MEMBER = 1387;
2461
2462/// A new member could not be added to a local group because the member has the wrong account type.
2463pub const INVALID_MEMBER = 1388;
2464
2465/// Too many security IDs have been specified.
2466pub const TOO_MANY_SIDS = 1389;
2467
2468/// A cross-encrypted password is necessary to change this user password.
2469pub const LM_CROSS_ENCRYPTION_REQUIRED = 1390;
2470
2471/// Indicates an ACL contains no inheritable components.
2472pub const NO_INHERITANCE = 1391;
2473
2474/// The file or directory is corrupted and unreadable.
2475pub const FILE_CORRUPT = 1392;
2476
2477/// The disk structure is corrupted and unreadable.
2478pub const DISK_CORRUPT = 1393;
2479
2480/// There is no user session key for the specified logon session.
2481pub const NO_USER_SESSION_KEY = 1394;
2482
2483/// The service being accessed is licensed for a particular number of connections. No more connections can be made to the service at this time because there are already as many connections as the service can accept.
2484pub const LICENSE_QUOTA_EXCEEDED = 1395;
2485
2486/// The target account name is incorrect.
2487pub const WRONG_TARGET_NAME = 1396;
2488
2489/// Mutual Authentication failed. The server's password is out of date at the domain controller.
2490pub const MUTUAL_AUTH_FAILED = 1397;
2491
2492/// There is a time and/or date difference between the client and server.
2493pub const TIME_SKEW = 1398;
2494
2495/// This operation cannot be performed on the current domain.
2496pub const CURRENT_DOMAIN_NOT_ALLOWED = 1399;
2497
2498/// Invalid window handle.
2499pub const INVALID_WINDOW_HANDLE = 1400;
2500
2501/// Invalid menu handle.
2502pub const INVALID_MENU_HANDLE = 1401;
2503
2504/// Invalid cursor handle.
2505pub const INVALID_CURSOR_HANDLE = 1402;
2506
2507/// Invalid accelerator table handle.
2508pub const INVALID_ACCEL_HANDLE = 1403;
2509
2510/// Invalid hook handle.
2511pub const INVALID_HOOK_HANDLE = 1404;
2512
2513/// Invalid handle to a multiple-window position structure.
2514pub const INVALID_DWP_HANDLE = 1405;
2515
2516/// Cannot create a top-level child window.
2517pub const TLW_WITH_WSCHILD = 1406;
2518
2519/// Cannot find window class.
2520pub const CANNOT_FIND_WND_CLASS = 1407;
2521
2522/// Invalid window; it belongs to other thread.
2523pub const WINDOW_OF_OTHER_THREAD = 1408;
2524
2525/// Hot key is already registered.
2526pub const HOTKEY_ALREADY_REGISTERED = 1409;
2527
2528/// Class already exists.
2529pub const CLASS_ALREADY_EXISTS = 1410;
2530
2531/// Class does not exist.
2532pub const CLASS_DOES_NOT_EXIST = 1411;
2533
2534/// Class still has open windows.
2535pub const CLASS_HAS_WINDOWS = 1412;
2536
2537/// Invalid index.
2538pub const INVALID_INDEX = 1413;
2539
2540/// Invalid icon handle.
2541pub const INVALID_ICON_HANDLE = 1414;
2542
2543/// Using private DIALOG window words.
2544pub const PRIVATE_DIALOG_INDEX = 1415;
2545
2546/// The list box identifier was not found.
2547pub const LISTBOX_ID_NOT_FOUND = 1416;
2548
2549/// No wildcards were found.
2550pub const NO_WILDCARD_CHARACTERS = 1417;
2551
2552/// Thread does not have a clipboard open.
2553pub const CLIPBOARD_NOT_OPEN = 1418;
2554
2555/// Hot key is not registered.
2556pub const HOTKEY_NOT_REGISTERED = 1419;
2557
2558/// The window is not a valid dialog window.
2559pub const WINDOW_NOT_DIALOG = 1420;
2560
2561/// Control ID not found.
2562pub const CONTROL_ID_NOT_FOUND = 1421;
2563
2564/// Invalid message for a combo box because it does not have an edit control.
2565pub const INVALID_COMBOBOX_MESSAGE = 1422;
2566
2567/// The window is not a combo box.
2568pub const WINDOW_NOT_COMBOBOX = 1423;
2569
2570/// Height must be less than 256.
2571pub const INVALID_EDIT_HEIGHT = 1424;
2572
2573/// Invalid device context (DC) handle.
2574pub const DC_NOT_FOUND = 1425;
2575
2576/// Invalid hook procedure type.
2577pub const INVALID_HOOK_FILTER = 1426;
2578
2579/// Invalid hook procedure.
2580pub const INVALID_FILTER_PROC = 1427;
2581
2582/// Cannot set nonlocal hook without a module handle.
2583pub const HOOK_NEEDS_HMOD = 1428;
2584
2585/// This hook procedure can only be set globally.
2586pub const GLOBAL_ONLY_HOOK = 1429;
2587
2588/// The journal hook procedure is already installed.
2589pub const JOURNAL_HOOK_SET = 1430;
2590
2591/// The hook procedure is not installed.
2592pub const HOOK_NOT_INSTALLED = 1431;
2593
2594/// Invalid message for single-selection list box.
2595pub const INVALID_LB_MESSAGE = 1432;
2596
2597/// LB_SETCOUNT sent to non-lazy list box.
2598pub const SETCOUNT_ON_BAD_LB = 1433;
2599
2600/// This list box does not support tab stops.
2601pub const LB_WITHOUT_TABSTOPS = 1434;
2602
2603/// Cannot destroy object created by another thread.
2604pub const DESTROY_OBJECT_OF_OTHER_THREAD = 1435;
2605
2606/// Child windows cannot have menus.
2607pub const CHILD_WINDOW_MENU = 1436;
2608
2609/// The window does not have a system menu.
2610pub const NO_SYSTEM_MENU = 1437;
2611
2612/// Invalid message box style.
2613pub const INVALID_MSGBOX_STYLE = 1438;
2614
2615/// Invalid system-wide (SPI_*) parameter.
2616pub const INVALID_SPI_VALUE = 1439;
2617
2618/// Screen already locked.
2619pub const SCREEN_ALREADY_LOCKED = 1440;
2620
2621/// All handles to windows in a multiple-window position structure must have the same parent.
2622pub const HWNDS_HAVE_DIFF_PARENT = 1441;
2623
2624/// The window is not a child window.
2625pub const NOT_CHILD_WINDOW = 1442;
2626
2627/// Invalid GW_* command.
2628pub const INVALID_GW_COMMAND = 1443;
2629
2630/// Invalid thread identifier.
2631pub const INVALID_THREAD_ID = 1444;
2632
2633/// Cannot process a message from a window that is not a multiple document interface (MDI) window.
2634pub const NON_MDICHILD_WINDOW = 1445;
2635
2636/// Popup menu already active.
2637pub const POPUP_ALREADY_ACTIVE = 1446;
2638
2639/// The window does not have scroll bars.
2640pub const NO_SCROLLBARS = 1447;
2641
2642/// Scroll bar range cannot be greater than MAXLONG.
2643pub const INVALID_SCROLLBAR_RANGE = 1448;
2644
2645/// Cannot show or remove the window in the way specified.
2646pub const INVALID_SHOWWIN_COMMAND = 1449;
2647
2648/// Insufficient system resources exist to complete the requested service.
2649pub const NO_SYSTEM_RESOURCES = 1450;
2650
2651/// Insufficient system resources exist to complete the requested service.
2652pub const NONPAGED_SYSTEM_RESOURCES = 1451;
2653
2654/// Insufficient system resources exist to complete the requested service.
2655pub const PAGED_SYSTEM_RESOURCES = 1452;
2656
2657/// Insufficient quota to complete the requested service.
2658pub const WORKING_SET_QUOTA = 1453;
2659
2660/// Insufficient quota to complete the requested service.
2661pub const PAGEFILE_QUOTA = 1454;
2662
2663/// The paging file is too small for this operation to complete.
2664pub const COMMITMENT_LIMIT = 1455;
2665
2666/// A menu item was not found.
2667pub const MENU_ITEM_NOT_FOUND = 1456;
2668
2669/// Invalid keyboard layout handle.
2670pub const INVALID_KEYBOARD_HANDLE = 1457;
2671
2672/// Hook type not allowed.
2673pub const HOOK_TYPE_NOT_ALLOWED = 1458;
2674
2675/// This operation requires an interactive window station.
2676pub const REQUIRES_INTERACTIVE_WINDOWSTATION = 1459;
2677
2678/// This operation returned because the timeout period expired.
2679pub const TIMEOUT = 1460;
2680
2681/// Invalid monitor handle.
2682pub const INVALID_MONITOR_HANDLE = 1461;
2683
2684/// Incorrect size argument.
2685pub const INCORRECT_SIZE = 1462;
2686
2687/// The symbolic link cannot be followed because its type is disabled.
2688pub const SYMLINK_CLASS_DISABLED = 1463;
2689
2690/// This application does not support the current operation on symbolic links.
2691pub const SYMLINK_NOT_SUPPORTED = 1464;
2692
2693/// Windows was unable to parse the requested XML data.
2694pub const XML_PARSE_ERROR = 1465;
2695
2696/// An error was encountered while processing an XML digital signature.
2697pub const XMLDSIG_ERROR = 1466;
2698
2699/// This application must be restarted.
2700pub const RESTART_APPLICATION = 1467;
2701
2702/// The caller made the connection request in the wrong routing compartment.
2703pub const WRONG_COMPARTMENT = 1468;
2704
2705/// There was an AuthIP failure when attempting to connect to the remote host.
2706pub const AUTHIP_FAILURE = 1469;
2707
2708/// Insufficient NVRAM resources exist to complete the requested service. A reboot might be required.
2709pub const NO_NVRAM_RESOURCES = 1470;
2710
2711/// Unable to finish the requested operation because the specified process is not a GUI process.
2712pub const NOT_GUI_PROCESS = 1471;
2713
2714/// The event log file is corrupted.
2715pub const EVENTLOG_FILE_CORRUPT = 1500;
2716
2717/// No event log file could be opened, so the event logging service did not start.
2718pub const EVENTLOG_CANT_START = 1501;
2719
2720/// The event log file is full.
2721pub const LOG_FILE_FULL = 1502;
2722
2723/// The event log file has changed between read operations.
2724pub const EVENTLOG_FILE_CHANGED = 1503;
2725
2726/// The specified task name is invalid.
2727pub const INVALID_TASK_NAME = 1550;
2728
2729/// The specified task index is invalid.
2730pub const INVALID_TASK_INDEX = 1551;
2731
2732/// The specified thread is already joining a task.
2733pub const THREAD_ALREADY_IN_TASK = 1552;
2734
2735/// The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.
2736pub const INSTALL_SERVICE_FAILURE = 1601;
2737
2738/// User cancelled installation.
2739pub const INSTALL_USEREXIT = 1602;
2740
2741/// Fatal error during installation.
2742pub const INSTALL_FAILURE = 1603;
2743
2744/// Installation suspended, incomplete.
2745pub const INSTALL_SUSPEND = 1604;
2746
2747/// This action is only valid for products that are currently installed.
2748pub const UNKNOWN_PRODUCT = 1605;
2749
2750/// Feature ID not registered.
2751pub const UNKNOWN_FEATURE = 1606;
2752
2753/// Component ID not registered.
2754pub const UNKNOWN_COMPONENT = 1607;
2755
2756/// Unknown property.
2757pub const UNKNOWN_PROPERTY = 1608;
2758
2759/// Handle is in an invalid state.
2760pub const INVALID_HANDLE_STATE = 1609;
2761
2762/// The configuration data for this product is corrupt. Contact your support personnel.
2763pub const BAD_CONFIGURATION = 1610;
2764
2765/// Component qualifier not present.
2766pub const INDEX_ABSENT = 1611;
2767
2768/// The installation source for this product is not available. Verify that the source exists and that you can access it.
2769pub const INSTALL_SOURCE_ABSENT = 1612;
2770
2771/// This installation package cannot be installed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
2772pub const INSTALL_PACKAGE_VERSION = 1613;
2773
2774/// Product is uninstalled.
2775pub const PRODUCT_UNINSTALLED = 1614;
2776
2777/// SQL query syntax invalid or unsupported.
2778pub const BAD_QUERY_SYNTAX = 1615;
2779
2780/// Record field does not exist.
2781pub const INVALID_FIELD = 1616;
2782
2783/// The device has been removed.
2784pub const DEVICE_REMOVED = 1617;
2785
2786/// Another installation is already in progress. Complete that installation before proceeding with this install.
2787pub const INSTALL_ALREADY_RUNNING = 1618;
2788
2789/// This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
2790pub const INSTALL_PACKAGE_OPEN_FAILED = 1619;
2791
2792/// This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.
2793pub const INSTALL_PACKAGE_INVALID = 1620;
2794
2795/// There was an error starting the Windows Installer service user interface. Contact your support personnel.
2796pub const INSTALL_UI_FAILURE = 1621;
2797
2798/// Error opening installation log file. Verify that the specified log file location exists and that you can write to it.
2799pub const INSTALL_LOG_FAILURE = 1622;
2800
2801/// The language of this installation package is not supported by your system.
2802pub const INSTALL_LANGUAGE_UNSUPPORTED = 1623;
2803
2804/// Error applying transforms. Verify that the specified transform paths are valid.
2805pub const INSTALL_TRANSFORM_FAILURE = 1624;
2806
2807/// This installation is forbidden by system policy. Contact your system administrator.
2808pub const INSTALL_PACKAGE_REJECTED = 1625;
2809
2810/// Function could not be executed.
2811pub const FUNCTION_NOT_CALLED = 1626;
2812
2813/// Function failed during execution.
2814pub const FUNCTION_FAILED = 1627;
2815
2816/// Invalid or unknown table specified.
2817pub const INVALID_TABLE = 1628;
2818
2819/// Data supplied is of wrong type.
2820pub const DATATYPE_MISMATCH = 1629;
2821
2822/// Data of this type is not supported.
2823pub const UNSUPPORTED_TYPE = 1630;
2824
2825/// The Windows Installer service failed to start. Contact your support personnel.
2826pub const CREATE_FAILED = 1631;
2827
2828/// The Temp folder is on a drive that is full or is inaccessible. Free up space on the drive or verify that you have write permission on the Temp folder.
2829pub const INSTALL_TEMP_UNWRITABLE = 1632;
2830
2831/// This installation package is not supported by this processor type. Contact your product vendor.
2832pub const INSTALL_PLATFORM_UNSUPPORTED = 1633;
2833
2834/// Component not used on this computer.
2835pub const INSTALL_NOTUSED = 1634;
2836
2837/// This update package could not be opened. Verify that the update package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer update package.
2838pub const PATCH_PACKAGE_OPEN_FAILED = 1635;
2839
2840/// This update package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer update package.
2841pub const PATCH_PACKAGE_INVALID = 1636;
2842
2843/// This update package cannot be processed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
2844pub const PATCH_PACKAGE_UNSUPPORTED = 1637;
2845
2846/// Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.
2847pub const PRODUCT_VERSION = 1638;
2848
2849/// Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
2850pub const INVALID_COMMAND_LINE = 1639;
2851
2852/// Only administrators have permission to add, remove, or configure server software during a Terminal services remote session. If you want to install or configure software on the server, contact your network administrator.
2853pub const INSTALL_REMOTE_DISALLOWED = 1640;
2854
2855/// The requested operation completed successfully. The system will be restarted so the changes can take effect.
2856pub const SUCCESS_REBOOT_INITIATED = 1641;
2857
2858/// The upgrade cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade.
2859pub const PATCH_TARGET_NOT_FOUND = 1642;
2860
2861/// The update package is not permitted by software restriction policy.
2862pub const PATCH_PACKAGE_REJECTED = 1643;
2863
2864/// One or more customizations are not permitted by software restriction policy.
2865pub const INSTALL_TRANSFORM_REJECTED = 1644;
2866
2867/// The Windows Installer does not permit installation from a Remote Desktop Connection.
2868pub const INSTALL_REMOTE_PROHIBITED = 1645;
2869
2870/// Uninstallation of the update package is not supported.
2871pub const PATCH_REMOVAL_UNSUPPORTED = 1646;
2872
2873/// The update is not applied to this product.
2874pub const UNKNOWN_PATCH = 1647;
2875
2876/// No valid sequence could be found for the set of updates.
2877pub const PATCH_NO_SEQUENCE = 1648;
2878
2879/// Update removal was disallowed by policy.
2880pub const PATCH_REMOVAL_DISALLOWED = 1649;
2881
2882/// The XML update data is invalid.
2883pub const INVALID_PATCH_XML = 1650;
2884
2885/// Windows Installer does not permit updating of managed advertised products. At least one feature of the product must be installed before applying the update.
2886pub const PATCH_MANAGED_ADVERTISED_PRODUCT = 1651;
2887
2888/// The Windows Installer service is not accessible in Safe Mode. Please try again when your computer is not in Safe Mode or you can use System Restore to return your machine to a previous good state.
2889pub const INSTALL_SERVICE_SAFEBOOT = 1652;
2890
2891/// A fail fast exception occurred. Exception handlers will not be invoked and the process will be terminated immediately.
2892pub const FAIL_FAST_EXCEPTION = 1653;
2893
2894/// The app that you are trying to run is not supported on this version of Windows.
2895pub const INSTALL_REJECTED = 1654;
2896
2897/// The string binding is invalid.
2898pub const RPC_S_INVALID_STRING_BINDING = 1700;
2899
2900/// The binding handle is not the correct type.
2901pub const RPC_S_WRONG_KIND_OF_BINDING = 1701;
2902
2903/// The binding handle is invalid.
2904pub const RPC_S_INVALID_BINDING = 1702;
2905
2906/// The RPC protocol sequence is not supported.
2907pub const RPC_S_PROTSEQ_NOT_SUPPORTED = 1703;
2908
2909/// The RPC protocol sequence is invalid.
2910pub const RPC_S_INVALID_RPC_PROTSEQ = 1704;
2911
2912/// The string universal unique identifier (UUID) is invalid.
2913pub const RPC_S_INVALID_STRING_UUID = 1705;
2914
2915/// The endpoint format is invalid.
2916pub const RPC_S_INVALID_ENDPOINT_FORMAT = 1706;
2917
2918/// The network address is invalid.
2919pub const RPC_S_INVALID_NET_ADDR = 1707;
2920
2921/// No endpoint was found.
2922pub const RPC_S_NO_ENDPOINT_FOUND = 1708;
2923
2924/// The timeout value is invalid.
2925pub const RPC_S_INVALID_TIMEOUT = 1709;
2926
2927/// The object universal unique identifier (UUID) was not found.
2928pub const RPC_S_OBJECT_NOT_FOUND = 1710;
2929
2930/// The object universal unique identifier (UUID) has already been registered.
2931pub const RPC_S_ALREADY_REGISTERED = 1711;
2932
2933/// The type universal unique identifier (UUID) has already been registered.
2934pub const RPC_S_TYPE_ALREADY_REGISTERED = 1712;
2935
2936/// The RPC server is already listening.
2937pub const RPC_S_ALREADY_LISTENING = 1713;
2938
2939/// No protocol sequences have been registered.
2940pub const RPC_S_NO_PROTSEQS_REGISTERED = 1714;
2941
2942/// The RPC server is not listening.
2943pub const RPC_S_NOT_LISTENING = 1715;
2944
2945/// The manager type is unknown.
2946pub const RPC_S_UNKNOWN_MGR_TYPE = 1716;
2947
2948/// The interface is unknown.
2949pub const RPC_S_UNKNOWN_IF = 1717;
2950
2951/// There are no bindings.
2952pub const RPC_S_NO_BINDINGS = 1718;
2953
2954/// There are no protocol sequences.
2955pub const RPC_S_NO_PROTSEQS = 1719;
2956
2957/// The endpoint cannot be created.
2958pub const RPC_S_CANT_CREATE_ENDPOINT = 1720;
2959
2960/// Not enough resources are available to complete this operation.
2961pub const RPC_S_OUT_OF_RESOURCES = 1721;
2962
2963/// The RPC server is unavailable.
2964pub const RPC_S_SERVER_UNAVAILABLE = 1722;
2965
2966/// The RPC server is too busy to complete this operation.
2967pub const RPC_S_SERVER_TOO_BUSY = 1723;
2968
2969/// The network options are invalid.
2970pub const RPC_S_INVALID_NETWORK_OPTIONS = 1724;
2971
2972/// There are no remote procedure calls active on this thread.
2973pub const RPC_S_NO_CALL_ACTIVE = 1725;
2974
2975/// The remote procedure call failed.
2976pub const RPC_S_CALL_FAILED = 1726;
2977
2978/// The remote procedure call failed and did not execute.
2979pub const RPC_S_CALL_FAILED_DNE = 1727;
2980
2981/// A remote procedure call (RPC) protocol error occurred.
2982pub const RPC_S_PROTOCOL_ERROR = 1728;
2983
2984/// Access to the HTTP proxy is denied.
2985pub const RPC_S_PROXY_ACCESS_DENIED = 1729;
2986
2987/// The transfer syntax is not supported by the RPC server.
2988pub const RPC_S_UNSUPPORTED_TRANS_SYN = 1730;
2989
2990/// The universal unique identifier (UUID) type is not supported.
2991pub const RPC_S_UNSUPPORTED_TYPE = 1732;
2992
2993/// The tag is invalid.
2994pub const RPC_S_INVALID_TAG = 1733;
2995
2996/// The array bounds are invalid.
2997pub const RPC_S_INVALID_BOUND = 1734;
2998
2999/// The binding does not contain an entry name.
3000pub const RPC_S_NO_ENTRY_NAME = 1735;
3001
3002/// The name syntax is invalid.
3003pub const RPC_S_INVALID_NAME_SYNTAX = 1736;
3004
3005/// The name syntax is not supported.
3006pub const RPC_S_UNSUPPORTED_NAME_SYNTAX = 1737;
3007
3008/// No network address is available to use to construct a universal unique identifier (UUID).
3009pub const RPC_S_UUID_NO_ADDRESS = 1739;
3010
3011/// The endpoint is a duplicate.
3012pub const RPC_S_DUPLICATE_ENDPOINT = 1740;
3013
3014/// The authentication type is unknown.
3015pub const RPC_S_UNKNOWN_AUTHN_TYPE = 1741;
3016
3017/// The maximum number of calls is too small.
3018pub const RPC_S_MAX_CALLS_TOO_SMALL = 1742;
3019
3020/// The string is too long.
3021pub const RPC_S_STRING_TOO_LONG = 1743;
3022
3023/// The RPC protocol sequence was not found.
3024pub const RPC_S_PROTSEQ_NOT_FOUND = 1744;
3025
3026/// The procedure number is out of range.
3027pub const RPC_S_PROCNUM_OUT_OF_RANGE = 1745;
3028
3029/// The binding does not contain any authentication information.
3030pub const RPC_S_BINDING_HAS_NO_AUTH = 1746;
3031
3032/// The authentication service is unknown.
3033pub const RPC_S_UNKNOWN_AUTHN_SERVICE = 1747;
3034
3035/// The authentication level is unknown.
3036pub const RPC_S_UNKNOWN_AUTHN_LEVEL = 1748;
3037
3038/// The security context is invalid.
3039pub const RPC_S_INVALID_AUTH_IDENTITY = 1749;
3040
3041/// The authorization service is unknown.
3042pub const RPC_S_UNKNOWN_AUTHZ_SERVICE = 1750;
3043
3044/// The entry is invalid.
3045pub const EPT_S_INVALID_ENTRY = 1751;
3046
3047/// The server endpoint cannot perform the operation.
3048pub const EPT_S_CANT_PERFORM_OP = 1752;
3049
3050/// There are no more endpoints available from the endpoint mapper.
3051pub const EPT_S_NOT_REGISTERED = 1753;
3052
3053/// No interfaces have been exported.
3054pub const RPC_S_NOTHING_TO_EXPORT = 1754;
3055
3056/// The entry name is incomplete.
3057pub const RPC_S_INCOMPLETE_NAME = 1755;
3058
3059/// The version option is invalid.
3060pub const RPC_S_INVALID_VERS_OPTION = 1756;
3061
3062/// There are no more members.
3063pub const RPC_S_NO_MORE_MEMBERS = 1757;
3064
3065/// There is nothing to unexport.
3066pub const RPC_S_NOT_ALL_OBJS_UNEXPORTED = 1758;
3067
3068/// The interface was not found.
3069pub const RPC_S_INTERFACE_NOT_FOUND = 1759;
3070
3071/// The entry already exists.
3072pub const RPC_S_ENTRY_ALREADY_EXISTS = 1760;
3073
3074/// The entry is not found.
3075pub const RPC_S_ENTRY_NOT_FOUND = 1761;
3076
3077/// The name service is unavailable.
3078pub const RPC_S_NAME_SERVICE_UNAVAILABLE = 1762;
3079
3080/// The network address family is invalid.
3081pub const RPC_S_INVALID_NAF_ID = 1763;
3082
3083/// The requested operation is not supported.
3084pub const RPC_S_CANNOT_SUPPORT = 1764;
3085
3086/// No security context is available to allow impersonation.
3087pub const RPC_S_NO_CONTEXT_AVAILABLE = 1765;
3088
3089/// An internal error occurred in a remote procedure call (RPC).
3090pub const RPC_S_INTERNAL_ERROR = 1766;
3091
3092/// The RPC server attempted an integer division by zero.
3093pub const RPC_S_ZERO_DIVIDE = 1767;
3094
3095/// An addressing error occurred in the RPC server.
3096pub const RPC_S_ADDRESS_ERROR = 1768;
3097
3098/// A floating-point operation at the RPC server caused a division by zero.
3099pub const RPC_S_FP_DIV_ZERO = 1769;
3100
3101/// A floating-point underflow occurred at the RPC server.
3102pub const RPC_S_FP_UNDERFLOW = 1770;
3103
3104/// A floating-point overflow occurred at the RPC server.
3105pub const RPC_S_FP_OVERFLOW = 1771;
3106
3107/// The list of RPC servers available for the binding of auto handles has been exhausted.
3108pub const RPC_X_NO_MORE_ENTRIES = 1772;
3109
3110/// Unable to open the character translation table file.
3111pub const RPC_X_SS_CHAR_TRANS_OPEN_FAIL = 1773;
3112
3113/// The file containing the character translation table has fewer than 512 bytes.
3114pub const RPC_X_SS_CHAR_TRANS_SHORT_FILE = 1774;
3115
3116/// A null context handle was passed from the client to the host during a remote procedure call.
3117pub const RPC_X_SS_IN_NULL_CONTEXT = 1775;
3118
3119/// The context handle changed during a remote procedure call.
3120pub const RPC_X_SS_CONTEXT_DAMAGED = 1777;
3121
3122/// The binding handles passed to a remote procedure call do not match.
3123pub const RPC_X_SS_HANDLES_MISMATCH = 1778;
3124
3125/// The stub is unable to get the remote procedure call handle.
3126pub const RPC_X_SS_CANNOT_GET_CALL_HANDLE = 1779;
3127
3128/// A null reference pointer was passed to the stub.
3129pub const RPC_X_NULL_REF_POINTER = 1780;
3130
3131/// The enumeration value is out of range.
3132pub const RPC_X_ENUM_VALUE_OUT_OF_RANGE = 1781;
3133
3134/// The byte count is too small.
3135pub const RPC_X_BYTE_COUNT_TOO_SMALL = 1782;
3136
3137/// The stub received bad data.
3138pub const RPC_X_BAD_STUB_DATA = 1783;
3139
3140/// The supplied user buffer is not valid for the requested operation.
3141pub const INVALID_USER_BUFFER = 1784;
3142
3143/// The disk media is not recognized. It may not be formatted.
3144pub const UNRECOGNIZED_MEDIA = 1785;
3145
3146/// The workstation does not have a trust secret.
3147pub const NO_TRUST_LSA_SECRET = 1786;
3148
3149/// The security database on the server does not have a computer account for this workstation trust relationship.
3150pub const NO_TRUST_SAM_ACCOUNT = 1787;
3151
3152/// The trust relationship between the primary domain and the trusted domain failed.
3153pub const TRUSTED_DOMAIN_FAILURE = 1788;
3154
3155/// The trust relationship between this workstation and the primary domain failed.
3156pub const TRUSTED_RELATIONSHIP_FAILURE = 1789;
3157
3158/// The network logon failed.
3159pub const TRUST_FAILURE = 1790;
3160
3161/// A remote procedure call is already in progress for this thread.
3162pub const RPC_S_CALL_IN_PROGRESS = 1791;
3163
3164/// An attempt was made to logon, but the network logon service was not started.
3165pub const NETLOGON_NOT_STARTED = 1792;
3166
3167/// The user's account has expired.
3168pub const ACCOUNT_EXPIRED = 1793;
3169
3170/// The redirector is in use and cannot be unloaded.
3171pub const REDIRECTOR_HAS_OPEN_HANDLES = 1794;
3172
3173/// The specified printer driver is already installed.
3174pub const PRINTER_DRIVER_ALREADY_INSTALLED = 1795;
3175
3176/// The specified port is unknown.
3177pub const UNKNOWN_PORT = 1796;
3178
3179/// The printer driver is unknown.
3180pub const UNKNOWN_PRINTER_DRIVER = 1797;
3181
3182/// The print processor is unknown.
3183pub const UNKNOWN_PRINTPROCESSOR = 1798;
3184
3185/// The specified separator file is invalid.
3186pub const INVALID_SEPARATOR_FILE = 1799;
3187
3188/// The specified priority is invalid.
3189pub const INVALID_PRIORITY = 1800;
3190
3191/// The printer name is invalid.
3192pub const INVALID_PRINTER_NAME = 1801;
3193
3194/// The printer already exists.
3195pub const PRINTER_ALREADY_EXISTS = 1802;
3196
3197/// The printer command is invalid.
3198pub const INVALID_PRINTER_COMMAND = 1803;
3199
3200/// The specified datatype is invalid.
3201pub const INVALID_DATATYPE = 1804;
3202
3203/// The environment specified is invalid.
3204pub const INVALID_ENVIRONMENT = 1805;
3205
3206/// There are no more bindings.
3207pub const RPC_S_NO_MORE_BINDINGS = 1806;
3208
3209/// The account used is an interdomain trust account. Use your global user account or local user account to access this server.
3210pub const NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = 1807;
3211
3212/// The account used is a computer account. Use your global user account or local user account to access this server.
3213pub const NOLOGON_WORKSTATION_TRUST_ACCOUNT = 1808;
3214
3215/// The account used is a server trust account. Use your global user account or local user account to access this server.
3216pub const NOLOGON_SERVER_TRUST_ACCOUNT = 1809;
3217
3218/// The name or security ID (SID) of the domain specified is inconsistent with the trust information for that domain.
3219pub const DOMAIN_TRUST_INCONSISTENT = 1810;
3220
3221/// The server is in use and cannot be unloaded.
3222pub const SERVER_HAS_OPEN_HANDLES = 1811;
3223
3224/// The specified image file did not contain a resource section.
3225pub const RESOURCE_DATA_NOT_FOUND = 1812;
3226
3227/// The specified resource type cannot be found in the image file.
3228pub const RESOURCE_TYPE_NOT_FOUND = 1813;
3229
3230/// The specified resource name cannot be found in the image file.
3231pub const RESOURCE_NAME_NOT_FOUND = 1814;
3232
3233/// The specified resource language ID cannot be found in the image file.
3234pub const RESOURCE_LANG_NOT_FOUND = 1815;
3235
3236/// Not enough quota is available to process this command.
3237pub const NOT_ENOUGH_QUOTA = 1816;
3238
3239/// No interfaces have been registered.
3240pub const RPC_S_NO_INTERFACES = 1817;
3241
3242/// The remote procedure call was cancelled.
3243pub const RPC_S_CALL_CANCELLED = 1818;
3244
3245/// The binding handle does not contain all required information.
3246pub const RPC_S_BINDING_INCOMPLETE = 1819;
3247
3248/// A communications failure occurred during a remote procedure call.
3249pub const RPC_S_COMM_FAILURE = 1820;
3250
3251/// The requested authentication level is not supported.
3252pub const RPC_S_UNSUPPORTED_AUTHN_LEVEL = 1821;
3253
3254/// No principal name registered.
3255pub const RPC_S_NO_PRINC_NAME = 1822;
3256
3257/// The error specified is not a valid Windows RPC error code.
3258pub const RPC_S_NOT_RPC_ERROR = 1823;
3259
3260/// A UUID that is valid only on this computer has been allocated.
3261pub const RPC_S_UUID_LOCAL_ONLY = 1824;
3262
3263/// A security package specific error occurred.
3264pub const RPC_S_SEC_PKG_ERROR = 1825;
3265
3266/// Thread is not canceled.
3267pub const RPC_S_NOT_CANCELLED = 1826;
3268
3269/// Invalid operation on the encoding/decoding handle.
3270pub const RPC_X_INVALID_ES_ACTION = 1827;
3271
3272/// Incompatible version of the serializing package.
3273pub const RPC_X_WRONG_ES_VERSION = 1828;
3274
3275/// Incompatible version of the RPC stub.
3276pub const RPC_X_WRONG_STUB_VERSION = 1829;
3277
3278/// The RPC pipe object is invalid or corrupted.
3279pub const RPC_X_INVALID_PIPE_OBJECT = 1830;
3280
3281/// An invalid operation was attempted on an RPC pipe object.
3282pub const RPC_X_WRONG_PIPE_ORDER = 1831;
3283
3284/// Unsupported RPC pipe version.
3285pub const RPC_X_WRONG_PIPE_VERSION = 1832;
3286
3287/// HTTP proxy server rejected the connection because the cookie authentication failed.
3288pub const RPC_S_COOKIE_AUTH_FAILED = 1833;
3289
3290/// The group member was not found.
3291pub const RPC_S_GROUP_MEMBER_NOT_FOUND = 1898;
3292
3293/// The endpoint mapper database entry could not be created.
3294pub const EPT_S_CANT_CREATE = 1899;
3295
3296/// The object universal unique identifier (UUID) is the nil UUID.
3297pub const RPC_S_INVALID_OBJECT = 1900;
3298
3299/// The specified time is invalid.
3300pub const INVALID_TIME = 1901;
3301
3302/// The specified form name is invalid.
3303pub const INVALID_FORM_NAME = 1902;
3304
3305/// The specified form size is invalid.
3306pub const INVALID_FORM_SIZE = 1903;
3307
3308/// The specified printer handle is already being waited on.
3309pub const ALREADY_WAITING = 1904;
3310
3311/// The specified printer has been deleted.
3312pub const PRINTER_DELETED = 1905;
3313
3314/// The state of the printer is invalid.
3315pub const INVALID_PRINTER_STATE = 1906;
3316
3317/// The user's password must be changed before signing in.
3318pub const PASSWORD_MUST_CHANGE = 1907;
3319
3320/// Could not find the domain controller for this domain.
3321pub const DOMAIN_CONTROLLER_NOT_FOUND = 1908;
3322
3323/// The referenced account is currently locked out and may not be logged on to.
3324pub const ACCOUNT_LOCKED_OUT = 1909;
3325
3326/// The object exporter specified was not found.
3327pub const OR_INVALID_OXID = 1910;
3328
3329/// The object specified was not found.
3330pub const OR_INVALID_OID = 1911;
3331
3332/// The object resolver set specified was not found.
3333pub const OR_INVALID_SET = 1912;
3334
3335/// Some data remains to be sent in the request buffer.
3336pub const RPC_S_SEND_INCOMPLETE = 1913;
3337
3338/// Invalid asynchronous remote procedure call handle.
3339pub const RPC_S_INVALID_ASYNC_HANDLE = 1914;
3340
3341/// Invalid asynchronous RPC call handle for this operation.
3342pub const RPC_S_INVALID_ASYNC_CALL = 1915;
3343
3344/// The RPC pipe object has already been closed.
3345pub const RPC_X_PIPE_CLOSED = 1916;
3346
3347/// The RPC call completed before all pipes were processed.
3348pub const RPC_X_PIPE_DISCIPLINE_ERROR = 1917;
3349
3350/// No more data is available from the RPC pipe.
3351pub const RPC_X_PIPE_EMPTY = 1918;
3352
3353/// No site name is available for this machine.
3354pub const NO_SITENAME = 1919;
3355
3356/// The file cannot be accessed by the system.
3357pub const CANT_ACCESS_FILE = 1920;
3358
3359/// The name of the file cannot be resolved by the system.
3360pub const CANT_RESOLVE_FILENAME = 1921;
3361
3362/// The entry is not of the expected type.
3363pub const RPC_S_ENTRY_TYPE_MISMATCH = 1922;
3364
3365/// Not all object UUIDs could be exported to the specified entry.
3366pub const RPC_S_NOT_ALL_OBJS_EXPORTED = 1923;
3367
3368/// Interface could not be exported to the specified entry.
3369pub const RPC_S_INTERFACE_NOT_EXPORTED = 1924;
3370
3371/// The specified profile entry could not be added.
3372pub const RPC_S_PROFILE_NOT_ADDED = 1925;
3373
3374/// The specified profile element could not be added.
3375pub const RPC_S_PRF_ELT_NOT_ADDED = 1926;
3376
3377/// The specified profile element could not be removed.
3378pub const RPC_S_PRF_ELT_NOT_REMOVED = 1927;
3379
3380/// The group element could not be added.
3381pub const RPC_S_GRP_ELT_NOT_ADDED = 1928;
3382
3383/// The group element could not be removed.
3384pub const RPC_S_GRP_ELT_NOT_REMOVED = 1929;
3385
3386/// The printer driver is not compatible with a policy enabled on your computer that blocks NT 4.0 drivers.
3387pub const KM_DRIVER_BLOCKED = 1930;
3388
3389/// The context has expired and can no longer be used.
3390pub const CONTEXT_EXPIRED = 1931;
3391
3392/// The current user's delegated trust creation quota has been exceeded.
3393pub const PER_USER_TRUST_QUOTA_EXCEEDED = 1932;
3394
3395/// The total delegated trust creation quota has been exceeded.
3396pub const ALL_USER_TRUST_QUOTA_EXCEEDED = 1933;
3397
3398/// The current user's delegated trust deletion quota has been exceeded.
3399pub const USER_DELETE_TRUST_QUOTA_EXCEEDED = 1934;
3400
3401/// The computer you are signing into is protected by an authentication firewall. The specified account is not allowed to authenticate to the computer.
3402pub const AUTHENTICATION_FIREWALL_FAILED = 1935;
3403
3404/// Remote connections to the Print Spooler are blocked by a policy set on your machine.
3405pub const REMOTE_PRINT_CONNECTIONS_BLOCKED = 1936;
3406
3407/// Authentication failed because NTLM authentication has been disabled.
3408pub const NTLM_BLOCKED = 1937;
3409
3410/// Logon Failure: EAS policy requires that the user change their password before this operation can be performed.
3411pub const PASSWORD_CHANGE_REQUIRED = 1938;
3412
3413/// The pixel format is invalid.
3414pub const INVALID_PIXEL_FORMAT = 2000;
3415
3416/// The specified driver is invalid.
3417pub const BAD_DRIVER = 2001;
3418
3419/// The window style or class attribute is invalid for this operation.
3420pub const INVALID_WINDOW_STYLE = 2002;
3421
3422/// The requested metafile operation is not supported.
3423pub const METAFILE_NOT_SUPPORTED = 2003;
3424
3425/// The requested transformation operation is not supported.
3426pub const TRANSFORM_NOT_SUPPORTED = 2004;
3427
3428/// The requested clipping operation is not supported.
3429pub const CLIPPING_NOT_SUPPORTED = 2005;
3430
3431/// The specified color management module is invalid.
3432pub const INVALID_CMM = 2010;
3433
3434/// The specified color profile is invalid.
3435pub const INVALID_PROFILE = 2011;
3436
3437/// The specified tag was not found.
3438pub const TAG_NOT_FOUND = 2012;
3439
3440/// A required tag is not present.
3441pub const TAG_NOT_PRESENT = 2013;
3442
3443/// The specified tag is already present.
3444pub const DUPLICATE_TAG = 2014;
3445
3446/// The specified color profile is not associated with the specified device.
3447pub const PROFILE_NOT_ASSOCIATED_WITH_DEVICE = 2015;
3448
3449/// The specified color profile was not found.
3450pub const PROFILE_NOT_FOUND = 2016;
3451
3452/// The specified color space is invalid.
3453pub const INVALID_COLORSPACE = 2017;
3454
3455/// Image Color Management is not enabled.
3456pub const ICM_NOT_ENABLED = 2018;
3457
3458/// There was an error while deleting the color transform.
3459pub const DELETING_ICM_XFORM = 2019;
3460
3461/// The specified color transform is invalid.
3462pub const INVALID_TRANSFORM = 2020;
3463
3464/// The specified transform does not match the bitmap's color space.
3465pub const COLORSPACE_MISMATCH = 2021;
3466
3467/// The specified named color index is not present in the profile.
3468pub const INVALID_COLORINDEX = 2022;
3469
3470/// The specified profile is intended for a device of a different type than the specified device.
3471pub const PROFILE_DOES_NOT_MATCH_DEVICE = 2023;
3472
3473/// The network connection was made successfully, but the user had to be prompted for a password other than the one originally specified.
3474pub const CONNECTED_OTHER_PASSWORD = 2108;
3475
3476/// The network connection was made successfully using default credentials.
3477pub const CONNECTED_OTHER_PASSWORD_DEFAULT = 2109;
3478
3479/// The specified username is invalid.
3480pub const BAD_USERNAME = 2202;
3481
3482/// This network connection does not exist.
3483pub const NOT_CONNECTED = 2250;
3484
3485/// This network connection has files open or requests pending.
3486pub const OPEN_FILES = 2401;
3487
3488/// Active connections still exist.
3489pub const ACTIVE_CONNECTIONS = 2402;
3490
3491/// The device is in use by an active process and cannot be disconnected.
3492pub const DEVICE_IN_USE = 2404;
3493
3494/// The specified print monitor is unknown.
3495pub const UNKNOWN_PRINT_MONITOR = 3000;
3496
3497/// The specified printer driver is currently in use.
3498pub const PRINTER_DRIVER_IN_USE = 3001;
3499
3500/// The spool file was not found.
3501pub const SPOOL_FILE_NOT_FOUND = 3002;
3502
3503/// A StartDocPrinter call was not issued.
3504pub const SPL_NO_STARTDOC = 3003;
3505
3506/// An AddJob call was not issued.
3507pub const SPL_NO_ADDJOB = 3004;
3508
3509/// The specified print processor has already been installed.
3510pub const PRINT_PROCESSOR_ALREADY_INSTALLED = 3005;
3511
3512/// The specified print monitor has already been installed.
3513pub const PRINT_MONITOR_ALREADY_INSTALLED = 3006;
3514
3515/// The specified print monitor does not have the required functions.
3516pub const INVALID_PRINT_MONITOR = 3007;
3517
3518/// The specified print monitor is currently in use.
3519pub const PRINT_MONITOR_IN_USE = 3008;
3520
3521/// The requested operation is not allowed when there are jobs queued to the printer.
3522pub const PRINTER_HAS_JOBS_QUEUED = 3009;
3523
3524/// The requested operation is successful. Changes will not be effective until the system is rebooted.
3525pub const SUCCESS_REBOOT_REQUIRED = 3010;
3526
3527/// The requested operation is successful. Changes will not be effective until the service is restarted.
3528pub const SUCCESS_RESTART_REQUIRED = 3011;
3529
3530/// No printers were found.
3531pub const PRINTER_NOT_FOUND = 3012;
3532
3533/// The printer driver is known to be unreliable.
3534pub const PRINTER_DRIVER_WARNED = 3013;
3535
3536/// The printer driver is known to harm the system.
3537pub const PRINTER_DRIVER_BLOCKED = 3014;
3538
3539/// The specified printer driver package is currently in use.
3540pub const PRINTER_DRIVER_PACKAGE_IN_USE = 3015;
3541
3542/// Unable to find a core driver package that is required by the printer driver package.
3543pub const CORE_DRIVER_PACKAGE_NOT_FOUND = 3016;
3544
3545/// The requested operation failed. A system reboot is required to roll back changes made.
3546pub const FAIL_REBOOT_REQUIRED = 3017;
3547
3548/// The requested operation failed. A system reboot has been initiated to roll back changes made.
3549pub const FAIL_REBOOT_INITIATED = 3018;
3550
3551/// The specified printer driver was not found on the system and needs to be downloaded.
3552pub const PRINTER_DRIVER_DOWNLOAD_NEEDED = 3019;
3553
3554/// The requested print job has failed to print. A print system update requires the job to be resubmitted.
3555pub const PRINT_JOB_RESTART_REQUIRED = 3020;
3556
3557/// The printer driver does not contain a valid manifest, or contains too many manifests.
3558pub const INVALID_PRINTER_DRIVER_MANIFEST = 3021;
3559
3560/// The specified printer cannot be shared.
3561pub const PRINTER_NOT_SHAREABLE = 3022;
3562
3563/// The operation was paused.
3564pub const REQUEST_PAUSED = 3050;
3565
3566/// Reissue the given operation as a cached IO operation.
3567pub const IO_REISSUE_AS_CACHED = 3950;
lib/std/os/windows/kernel32.zig+32-2
...@@ -73,7 +73,7 @@ pub extern "kernel32" fn FindFirstFileW(lpFileName: [*:0]const u16, lpFindFileDa...@@ -73,7 +73,7 @@ pub extern "kernel32" fn FindFirstFileW(lpFileName: [*:0]const u16, lpFindFileDa
73pub extern "kernel32" fn FindClose(hFindFile: HANDLE) callconv(.Stdcall) BOOL;73pub extern "kernel32" fn FindClose(hFindFile: HANDLE) callconv(.Stdcall) BOOL;
74pub extern "kernel32" fn FindNextFileW(hFindFile: HANDLE, lpFindFileData: *WIN32_FIND_DATAW) callconv(.Stdcall) BOOL;74pub extern "kernel32" fn FindNextFileW(hFindFile: HANDLE, lpFindFileData: *WIN32_FIND_DATAW) callconv(.Stdcall) BOOL;
7575
76pub extern "kernel32" fn FormatMessageW(dwFlags: DWORD, lpSource: ?LPVOID, dwMessageId: DWORD, dwLanguageId: DWORD, lpBuffer: [*]u16, nSize: DWORD, Arguments: ?*va_list) callconv(.Stdcall) DWORD;76pub extern "kernel32" fn FormatMessageW(dwFlags: DWORD, lpSource: ?LPVOID, dwMessageId: Win32Error, dwLanguageId: DWORD, lpBuffer: [*]u16, nSize: DWORD, Arguments: ?*va_list) callconv(.Stdcall) DWORD;
7777
78pub extern "kernel32" fn FreeEnvironmentStringsW(penv: [*:0]u16) callconv(.Stdcall) BOOL;78pub extern "kernel32" fn FreeEnvironmentStringsW(penv: [*:0]u16) callconv(.Stdcall) BOOL;
7979
...@@ -88,6 +88,8 @@ pub extern "kernel32" fn GetCurrentDirectoryW(nBufferLength: DWORD, lpBuffer: ?[...@@ -88,6 +88,8 @@ pub extern "kernel32" fn GetCurrentDirectoryW(nBufferLength: DWORD, lpBuffer: ?[
88pub extern "kernel32" fn GetCurrentThread() callconv(.Stdcall) HANDLE;88pub extern "kernel32" fn GetCurrentThread() callconv(.Stdcall) HANDLE;
89pub extern "kernel32" fn GetCurrentThreadId() callconv(.Stdcall) DWORD;89pub extern "kernel32" fn GetCurrentThreadId() callconv(.Stdcall) DWORD;
9090
91pub extern "kernel32" fn GetCurrentProcess() callconv(.Stdcall) HANDLE;
92
91pub extern "kernel32" fn GetEnvironmentStringsW() callconv(.Stdcall) ?[*:0]u16;93pub extern "kernel32" fn GetEnvironmentStringsW() callconv(.Stdcall) ?[*:0]u16;
9294
93pub extern "kernel32" fn GetEnvironmentVariableW(lpName: LPWSTR, lpBuffer: [*]u16, nSize: DWORD) callconv(.Stdcall) DWORD;95pub extern "kernel32" fn GetEnvironmentVariableW(lpName: LPWSTR, lpBuffer: [*]u16, nSize: DWORD) callconv(.Stdcall) DWORD;
...@@ -102,7 +104,7 @@ pub extern "kernel32" fn GetModuleFileNameW(hModule: ?HMODULE, lpFilename: [*]u1...@@ -102,7 +104,7 @@ pub extern "kernel32" fn GetModuleFileNameW(hModule: ?HMODULE, lpFilename: [*]u1
102104
103pub extern "kernel32" fn GetModuleHandleW(lpModuleName: ?[*]const WCHAR) callconv(.Stdcall) HMODULE;105pub extern "kernel32" fn GetModuleHandleW(lpModuleName: ?[*]const WCHAR) callconv(.Stdcall) HMODULE;
104106
105pub extern "kernel32" fn GetLastError() callconv(.Stdcall) DWORD;107pub extern "kernel32" fn GetLastError() callconv(.Stdcall) Win32Error;
106108
107pub extern "kernel32" fn GetFileInformationByHandle(109pub extern "kernel32" fn GetFileInformationByHandle(
108 hFile: HANDLE,110 hFile: HANDLE,
...@@ -246,3 +248,31 @@ pub extern "kernel32" fn LeaveCriticalSection(lpCriticalSection: *CRITICAL_SECTI...@@ -246,3 +248,31 @@ pub extern "kernel32" fn LeaveCriticalSection(lpCriticalSection: *CRITICAL_SECTI
246pub extern "kernel32" fn DeleteCriticalSection(lpCriticalSection: *CRITICAL_SECTION) callconv(.Stdcall) void;248pub extern "kernel32" fn DeleteCriticalSection(lpCriticalSection: *CRITICAL_SECTION) callconv(.Stdcall) void;
247249
248pub extern "kernel32" fn InitOnceExecuteOnce(InitOnce: *INIT_ONCE, InitFn: INIT_ONCE_FN, Parameter: ?*c_void, Context: ?*c_void) callconv(.Stdcall) BOOL;250pub extern "kernel32" fn InitOnceExecuteOnce(InitOnce: *INIT_ONCE, InitFn: INIT_ONCE_FN, Parameter: ?*c_void, Context: ?*c_void) callconv(.Stdcall) BOOL;
251
252pub extern "kernel32" fn K32EmptyWorkingSet(hProcess: HANDLE) callconv(.Stdcall) BOOL;
253pub extern "kernel32" fn K32EnumDeviceDrivers(lpImageBase: [*]LPVOID, cb: DWORD, lpcbNeeded: LPDWORD) callconv(.Stdcall) BOOL;
254pub extern "kernel32" fn K32EnumPageFilesA(pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKA, pContext: LPVOID) callconv(.Stdcall) BOOL;
255pub extern "kernel32" fn K32EnumPageFilesW(pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKW, pContext: LPVOID) callconv(.Stdcall) BOOL;
256pub extern "kernel32" fn K32EnumProcessModules(hProcess: HANDLE, lphModule: [*]HMODULE, cb: DWORD, lpcbNeeded: LPDWORD) callconv(.Stdcall) BOOL;
257pub extern "kernel32" fn K32EnumProcessModulesEx(hProcess: HANDLE, lphModule: [*]HMODULE, cb: DWORD, lpcbNeeded: LPDWORD, dwFilterFlag: DWORD) callconv(.Stdcall) BOOL;
258pub extern "kernel32" fn K32EnumProcesses(lpidProcess: [*]DWORD, cb: DWORD, cbNeeded: LPDWORD) callconv(.Stdcall) BOOL;
259pub extern "kernel32" fn K32GetDeviceDriverBaseNameA(ImageBase: LPVOID, lpBaseName: LPSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
260pub extern "kernel32" fn K32GetDeviceDriverBaseNameW(ImageBase: LPVOID, lpBaseName: LPWSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
261pub extern "kernel32" fn K32GetDeviceDriverFileNameA(ImageBase: LPVOID, lpFilename: LPSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
262pub extern "kernel32" fn K32GetDeviceDriverFileNameW(ImageBase: LPVOID, lpFilename: LPWSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
263pub extern "kernel32" fn K32GetMappedFileNameA(hProcess: HANDLE, lpv: ?LPVOID, lpFilename: LPSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
264pub extern "kernel32" fn K32GetMappedFileNameW(hProcess: HANDLE, lpv: ?LPVOID, lpFilename: LPWSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
265pub extern "kernel32" fn K32GetModuleBaseNameA(hProcess: HANDLE, hModule: ?HMODULE, lpBaseName: LPSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
266pub extern "kernel32" fn K32GetModuleBaseNameW(hProcess: HANDLE, hModule: ?HMODULE, lpBaseName: LPWSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
267pub extern "kernel32" fn K32GetModuleFileNameExA(hProcess: HANDLE, hModule: ?HMODULE, lpFilename: LPSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
268pub extern "kernel32" fn K32GetModuleFileNameExW(hProcess: HANDLE, hModule: ?HMODULE, lpFilename: LPWSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
269pub extern "kernel32" fn K32GetModuleInformation(hProcess: HANDLE, hModule: HMODULE, lpmodinfo: LPMODULEINFO, cb: DWORD) callconv(.Stdcall) BOOL;
270pub extern "kernel32" fn K32GetPerformanceInfo(pPerformanceInformation: PPERFORMACE_INFORMATION, cb: DWORD) callconv(.Stdcall) BOOL;
271pub extern "kernel32" fn K32GetProcessImageFileNameA(hProcess: HANDLE, lpImageFileName: LPSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
272pub extern "kernel32" fn K32GetProcessImageFileNameW(hProcess: HANDLE, lpImageFileName: LPWSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
273pub extern "kernel32" fn K32GetProcessMemoryInfo(Process: HANDLE, ppsmemCounters: PPROCESS_MEMORY_COUNTERS, cb: DWORD) callconv(.Stdcall) BOOL;
274pub extern "kernel32" fn K32GetWsChanges(hProcess: HANDLE, lpWatchInfo: PPSAPI_WS_WATCH_INFORMATION, cb: DWORD) callconv(.Stdcall) BOOL;
275pub extern "kernel32" fn K32GetWsChangesEx(hProcess: HANDLE, lpWatchInfoEx: PPSAPI_WS_WATCH_INFORMATION_EX, cb: DWORD) callconv(.Stdcall) BOOL;
276pub extern "kernel32" fn K32InitializeProcessForWsWatch(hProcess: HANDLE) callconv(.Stdcall) BOOL;
277pub extern "kernel32" fn K32QueryWorkingSet(hProcess: HANDLE, pv: PVOID, cb: DWORD) callconv(.Stdcall) BOOL;
278pub extern "kernel32" fn K32QueryWorkingSetEx(hProcess: HANDLE, pv: PVOID, cb: DWORD) callconv(.Stdcall) BOOL;
lib/std/os/windows/ntstatus.zig created+5600
...@@ -0,0 +1,5600 @@
1// NTSTATUS codes from https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55?
2pub const NTSTATUS = extern enum(u32) {
3 /// The operation completed successfully.
4 SUCCESS = 0x00000000,
5
6 /// The caller specified WaitAny for WaitType and one of the dispatcher objects in the Object array has been set to the signaled state.
7 WAIT_0 = 0x00000000,
8
9 /// The caller specified WaitAny for WaitType and one of the dispatcher objects in the Object array has been set to the signaled state.
10 WAIT_1 = 0x00000001,
11
12 /// The caller specified WaitAny for WaitType and one of the dispatcher objects in the Object array has been set to the signaled state.
13 WAIT_2 = 0x00000002,
14
15 /// The caller specified WaitAny for WaitType and one of the dispatcher objects in the Object array has been set to the signaled state.
16 WAIT_3 = 0x00000003,
17
18 /// The caller specified WaitAny for WaitType and one of the dispatcher objects in the Object array has been set to the signaled state.
19 WAIT_63 = 0x0000003F,
20
21 /// The caller attempted to wait for a mutex that has been abandoned.
22 ABANDONED = 0x00000080,
23
24 /// The caller attempted to wait for a mutex that has been abandoned.
25 ABANDONED_WAIT_0 = 0x00000080,
26
27 /// The caller attempted to wait for a mutex that has been abandoned.
28 ABANDONED_WAIT_63 = 0x000000BF,
29
30 /// A user-mode APC was delivered before the given Interval expired.
31 USER_APC = 0x000000C0,
32
33 /// The delay completed because the thread was alerted.
34 ALERTED = 0x00000101,
35
36 /// The given Timeout interval expired.
37 TIMEOUT = 0x00000102,
38
39 /// The operation that was requested is pending completion.
40 PENDING = 0x00000103,
41
42 /// A reparse should be performed by the Object Manager because the name of the file resulted in a symbolic link.
43 REPARSE = 0x00000104,
44
45 /// Returned by enumeration APIs to indicate more information is available to successive calls.
46 MORE_ENTRIES = 0x00000105,
47
48 /// Indicates not all privileges or groups that are referenced are assigned to the caller.
49 /// This allows, for example, all privileges to be disabled without having to know exactly which privileges are assigned.
50 NOT_ALL_ASSIGNED = 0x00000106,
51
52 /// Some of the information to be translated has not been translated.
53 SOME_NOT_MAPPED = 0x00000107,
54
55 /// An open/create operation completed while an opportunistic lock (oplock) break is underway.
56 OPLOCK_BREAK_IN_PROGRESS = 0x00000108,
57
58 /// A new volume has been mounted by a file system.
59 VOLUME_MOUNTED = 0x00000109,
60
61 /// This success level status indicates that the transaction state already exists for the registry subtree but that a transaction commit was previously aborted. The commit has now been completed.
62 RXACT_COMMITTED = 0x0000010A,
63
64 /// Indicates that a notify change request has been completed due to closing the handle that made the notify change request.
65 NOTIFY_CLEANUP = 0x0000010B,
66
67 /// Indicates that a notify change request is being completed and that the information is not being returned in the caller's buffer.
68 /// The caller now needs to enumerate the files to find the changes.
69 NOTIFY_ENUM_DIR = 0x0000010C,
70
71 /// {No Quotas} No system quota limits are specifically set for this account.
72 NO_QUOTAS_FOR_ACCOUNT = 0x0000010D,
73
74 /// {Connect Failure on Primary Transport} An attempt was made to connect to the remote server %hs on the primary transport, but the connection failed.
75 /// The computer WAS able to connect on a secondary transport.
76 PRIMARY_TRANSPORT_CONNECT_FAILED = 0x0000010E,
77
78 /// The page fault was a transition fault.
79 PAGE_FAULT_TRANSITION = 0x00000110,
80
81 /// The page fault was a demand zero fault.
82 PAGE_FAULT_DEMAND_ZERO = 0x00000111,
83
84 /// The page fault was a demand zero fault.
85 PAGE_FAULT_COPY_ON_WRITE = 0x00000112,
86
87 /// The page fault was a demand zero fault.
88 PAGE_FAULT_GUARD_PAGE = 0x00000113,
89
90 /// The page fault was satisfied by reading from a secondary storage device.
91 PAGE_FAULT_PAGING_FILE = 0x00000114,
92
93 /// The cached page was locked during operation.
94 CACHE_PAGE_LOCKED = 0x00000115,
95
96 /// The crash dump exists in a paging file.
97 CRASH_DUMP = 0x00000116,
98
99 /// The specified buffer contains all zeros.
100 BUFFER_ALL_ZEROS = 0x00000117,
101
102 /// A reparse should be performed by the Object Manager because the name of the file resulted in a symbolic link.
103 REPARSE_OBJECT = 0x00000118,
104
105 /// The device has succeeded a query-stop and its resource requirements have changed.
106 RESOURCE_REQUIREMENTS_CHANGED = 0x00000119,
107
108 /// The translator has translated these resources into the global space and no additional translations should be performed.
109 TRANSLATION_COMPLETE = 0x00000120,
110
111 /// The directory service evaluated group memberships locally, because it was unable to contact a global catalog server.
112 DS_MEMBERSHIP_EVALUATED_LOCALLY = 0x00000121,
113
114 /// A process being terminated has no threads to terminate.
115 NOTHING_TO_TERMINATE = 0x00000122,
116
117 /// The specified process is not part of a job.
118 PROCESS_NOT_IN_JOB = 0x00000123,
119
120 /// The specified process is part of a job.
121 PROCESS_IN_JOB = 0x00000124,
122
123 /// {Volume Shadow Copy Service} The system is now ready for hibernation.
124 VOLSNAP_HIBERNATE_READY = 0x00000125,
125
126 /// A file system or file system filter driver has successfully completed an FsFilter operation.
127 FSFILTER_OP_COMPLETED_SUCCESSFULLY = 0x00000126,
128
129 /// The specified interrupt vector was already connected.
130 INTERRUPT_VECTOR_ALREADY_CONNECTED = 0x00000127,
131
132 /// The specified interrupt vector is still connected.
133 INTERRUPT_STILL_CONNECTED = 0x00000128,
134
135 /// The current process is a cloned process.
136 PROCESS_CLONED = 0x00000129,
137
138 /// The file was locked and all users of the file can only read.
139 FILE_LOCKED_WITH_ONLY_READERS = 0x0000012A,
140
141 /// The file was locked and at least one user of the file can write.
142 FILE_LOCKED_WITH_WRITERS = 0x0000012B,
143
144 /// The specified ResourceManager made no changes or updates to the resource under this transaction.
145 RESOURCEMANAGER_READ_ONLY = 0x00000202,
146
147 /// An operation is blocked and waiting for an oplock.
148 WAIT_FOR_OPLOCK = 0x00000367,
149
150 /// Debugger handled the exception.
151 DBG_EXCEPTION_HANDLED = 0x00010001,
152
153 /// The debugger continued.
154 DBG_CONTINUE = 0x00010002,
155
156 /// The IO was completed by a filter.
157 FLT_IO_COMPLETE = 0x001C0001,
158
159 /// The file is temporarily unavailable.
160 FILE_NOT_AVAILABLE = 0xC0000467,
161
162 /// The share is temporarily unavailable.
163 SHARE_UNAVAILABLE = 0xC0000480,
164
165 /// A threadpool worker thread entered a callback at thread affinity %p and exited at affinity %p.
166 /// This is unexpected, indicating that the callback missed restoring the priority.
167 CALLBACK_RETURNED_THREAD_AFFINITY = 0xC0000721,
168
169 /// {Object Exists} An attempt was made to create an object but the object name already exists.
170 OBJECT_NAME_EXISTS = 0x40000000,
171
172 /// {Thread Suspended} A thread termination occurred while the thread was suspended. The thread resumed, and termination proceeded.
173 THREAD_WAS_SUSPENDED = 0x40000001,
174
175 /// {Working Set Range Error} An attempt was made to set the working set minimum or maximum to values that are outside the allowable range.
176 WORKING_SET_LIMIT_RANGE = 0x40000002,
177
178 /// {Image Relocated} An image file could not be mapped at the address that is specified in the image file. Local fixes must be performed on this image.
179 IMAGE_NOT_AT_BASE = 0x40000003,
180
181 /// This informational level status indicates that a specified registry subtree transaction state did not yet exist and had to be created.
182 RXACT_STATE_CREATED = 0x40000004,
183
184 /// {Segment Load} A virtual DOS machine (VDM) is loading, unloading, or moving an MS-DOS or Win16 program segment image.
185 /// An exception is raised so that a debugger can load, unload, or track symbols and breakpoints within these 16-bit segments.
186 SEGMENT_NOTIFICATION = 0x40000005,
187
188 /// {Local Session Key} A user session key was requested for a local remote procedure call (RPC) connection.
189 /// The session key that is returned is a constant value and not unique to this connection.
190 LOCAL_USER_SESSION_KEY = 0x40000006,
191
192 /// {Invalid Current Directory} The process cannot switch to the startup current directory %hs.
193 /// Select OK to set the current directory to %hs, or select CANCEL to exit.
194 BAD_CURRENT_DIRECTORY = 0x40000007,
195
196 /// {Serial IOCTL Complete} A serial I/O operation was completed by another write to a serial port. (The IOCTL_SERIAL_XOFF_COUNTER reached zero.)
197 SERIAL_MORE_WRITES = 0x40000008,
198
199 /// {Registry Recovery} One of the files that contains the system registry data had to be recovered by using a log or alternate copy. The recovery was successful.
200 REGISTRY_RECOVERED = 0x40000009,
201
202 /// {Redundant Read} To satisfy a read request, the Windows NT operating system fault-tolerant file system successfully read the requested data from a redundant copy.
203 /// This was done because the file system encountered a failure on a member of the fault-tolerant volume but was unable to reassign the failing area of the device.
204 FT_READ_RECOVERY_FROM_BACKUP = 0x4000000A,
205
206 /// {Redundant Write} To satisfy a write request, the Windows NT fault-tolerant file system successfully wrote a redundant copy of the information.
207 /// This was done because the file system encountered a failure on a member of the fault-tolerant volume but was unable to reassign the failing area of the device.
208 FT_WRITE_RECOVERY = 0x4000000B,
209
210 /// {Serial IOCTL Timeout} A serial I/O operation completed because the time-out period expired.
211 /// (The IOCTL_SERIAL_XOFF_COUNTER had not reached zero.)
212 SERIAL_COUNTER_TIMEOUT = 0x4000000C,
213
214 /// {Password Too Complex} The Windows password is too complex to be converted to a LAN Manager password.
215 /// The LAN Manager password that returned is a NULL string.
216 NULL_LM_PASSWORD = 0x4000000D,
217
218 /// {Machine Type Mismatch} The image file %hs is valid but is for a machine type other than the current machine.
219 /// Select OK to continue, or CANCEL to fail the DLL load.
220 IMAGE_MACHINE_TYPE_MISMATCH = 0x4000000E,
221
222 /// {Partial Data Received} The network transport returned partial data to its client. The remaining data will be sent later.
223 RECEIVE_PARTIAL = 0x4000000F,
224
225 /// {Expedited Data Received} The network transport returned data to its client that was marked as expedited by the remote system.
226 RECEIVE_EXPEDITED = 0x40000010,
227
228 /// {Partial Expedited Data Received} The network transport returned partial data to its client and this data was marked as expedited by the remote system. The remaining data will be sent later.
229 RECEIVE_PARTIAL_EXPEDITED = 0x40000011,
230
231 /// {TDI Event Done} The TDI indication has completed successfully.
232 EVENT_DONE = 0x40000012,
233
234 /// {TDI Event Pending} The TDI indication has entered the pending state.
235 EVENT_PENDING = 0x40000013,
236
237 /// Checking file system on %wZ.
238 CHECKING_FILE_SYSTEM = 0x40000014,
239
240 /// {Fatal Application Exit} %hs
241 FATAL_APP_EXIT = 0x40000015,
242
243 /// The specified registry key is referenced by a predefined handle.
244 PREDEFINED_HANDLE = 0x40000016,
245
246 /// {Page Unlocked} The page protection of a locked page was changed to 'No Access' and the page was unlocked from memory and from the process.
247 WAS_UNLOCKED = 0x40000017,
248
249 /// %hs
250 SERVICE_NOTIFICATION = 0x40000018,
251
252 /// {Page Locked} One of the pages to lock was already locked.
253 WAS_LOCKED = 0x40000019,
254
255 /// Application popup: %1 : %2
256 LOG_HARD_ERROR = 0x4000001A,
257
258 /// A Win32 process already exists.
259 ALREADY_WIN32 = 0x4000001B,
260
261 /// An exception status code that is used by the Win32 x86 emulation subsystem.
262 WX86_UNSIMULATE = 0x4000001C,
263
264 /// An exception status code that is used by the Win32 x86 emulation subsystem.
265 WX86_CONTINUE = 0x4000001D,
266
267 /// An exception status code that is used by the Win32 x86 emulation subsystem.
268 WX86_SINGLE_STEP = 0x4000001E,
269
270 /// An exception status code that is used by the Win32 x86 emulation subsystem.
271 WX86_BREAKPOINT = 0x4000001F,
272
273 /// An exception status code that is used by the Win32 x86 emulation subsystem.
274 WX86_EXCEPTION_CONTINUE = 0x40000020,
275
276 /// An exception status code that is used by the Win32 x86 emulation subsystem.
277 WX86_EXCEPTION_LASTCHANCE = 0x40000021,
278
279 /// An exception status code that is used by the Win32 x86 emulation subsystem.
280 WX86_EXCEPTION_CHAIN = 0x40000022,
281
282 /// {Machine Type Mismatch} The image file %hs is valid but is for a machine type other than the current machine.
283 IMAGE_MACHINE_TYPE_MISMATCH_EXE = 0x40000023,
284
285 /// A yield execution was performed and no thread was available to run.
286 NO_YIELD_PERFORMED = 0x40000024,
287
288 /// The resume flag to a timer API was ignored.
289 TIMER_RESUME_IGNORED = 0x40000025,
290
291 /// The arbiter has deferred arbitration of these resources to its parent.
292 ARBITRATION_UNHANDLED = 0x40000026,
293
294 /// The device has detected a CardBus card in its slot.
295 CARDBUS_NOT_SUPPORTED = 0x40000027,
296
297 /// An exception status code that is used by the Win32 x86 emulation subsystem.
298 WX86_CREATEWX86TIB = 0x40000028,
299
300 /// The CPUs in this multiprocessor system are not all the same revision level.
301 /// To use all processors, the operating system restricts itself to the features of the least capable processor in the system.
302 /// If problems occur with this system, contact the CPU manufacturer to see if this mix of processors is supported.
303 MP_PROCESSOR_MISMATCH = 0x40000029,
304
305 /// The system was put into hibernation.
306 HIBERNATED = 0x4000002A,
307
308 /// The system was resumed from hibernation.
309 RESUME_HIBERNATION = 0x4000002B,
310
311 /// Windows has detected that the system firmware (BIOS) was updated [previous firmware date = %2, current firmware date %3].
312 FIRMWARE_UPDATED = 0x4000002C,
313
314 /// A device driver is leaking locked I/O pages and is causing system degradation.
315 /// The system has automatically enabled the tracking code to try and catch the culprit.
316 DRIVERS_LEAKING_LOCKED_PAGES = 0x4000002D,
317
318 /// The ALPC message being canceled has already been retrieved from the queue on the other side.
319 MESSAGE_RETRIEVED = 0x4000002E,
320
321 /// The system power state is transitioning from %2 to %3.
322 SYSTEM_POWERSTATE_TRANSITION = 0x4000002F,
323
324 /// The receive operation was successful.
325 /// Check the ALPC completion list for the received message.
326 ALPC_CHECK_COMPLETION_LIST = 0x40000030,
327
328 /// The system power state is transitioning from %2 to %3 but could enter %4.
329 SYSTEM_POWERSTATE_COMPLEX_TRANSITION = 0x40000031,
330
331 /// Access to %1 is monitored by policy rule %2.
332 ACCESS_AUDIT_BY_POLICY = 0x40000032,
333
334 /// A valid hibernation file has been invalidated and should be abandoned.
335 ABANDON_HIBERFILE = 0x40000033,
336
337 /// Business rule scripts are disabled for the calling application.
338 BIZRULES_NOT_ENABLED = 0x40000034,
339
340 /// The system has awoken.
341 WAKE_SYSTEM = 0x40000294,
342
343 /// The directory service is shutting down.
344 DS_SHUTTING_DOWN = 0x40000370,
345
346 /// Debugger will reply later.
347 DBG_REPLY_LATER = 0x40010001,
348
349 /// Debugger cannot provide a handle.
350 DBG_UNABLE_TO_PROVIDE_HANDLE = 0x40010002,
351
352 /// Debugger terminated the thread.
353 DBG_TERMINATE_THREAD = 0x40010003,
354
355 /// Debugger terminated the process.
356 DBG_TERMINATE_PROCESS = 0x40010004,
357
358 /// Debugger obtained control of C.
359 DBG_CONTROL_C = 0x40010005,
360
361 /// Debugger printed an exception on control C.
362 DBG_PRINTEXCEPTION_C = 0x40010006,
363
364 /// Debugger received a RIP exception.
365 DBG_RIPEXCEPTION = 0x40010007,
366
367 /// Debugger received a control break.
368 DBG_CONTROL_BREAK = 0x40010008,
369
370 /// Debugger command communication exception.
371 DBG_COMMAND_EXCEPTION = 0x40010009,
372
373 /// A UUID that is valid only on this computer has been allocated.
374 RPC_NT_UUID_LOCAL_ONLY = 0x40020056,
375
376 /// Some data remains to be sent in the request buffer.
377 RPC_NT_SEND_INCOMPLETE = 0x400200AF,
378
379 /// The Client Drive Mapping Service has connected on Terminal Connection.
380 CTX_CDM_CONNECT = 0x400A0004,
381
382 /// The Client Drive Mapping Service has disconnected on Terminal Connection.
383 CTX_CDM_DISCONNECT = 0x400A0005,
384
385 /// A kernel mode component is releasing a reference on an activation context.
386 SXS_RELEASE_ACTIVATION_CONTEXT = 0x4015000D,
387
388 /// The transactional resource manager is already consistent. Recovery is not needed.
389 RECOVERY_NOT_NEEDED = 0x40190034,
390
391 /// The transactional resource manager has already been started.
392 RM_ALREADY_STARTED = 0x40190035,
393
394 /// The log service encountered a log stream with no restart area.
395 LOG_NO_RESTART = 0x401A000C,
396
397 /// {Display Driver Recovered From Failure} The %hs display driver has detected a failure and recovered from it. Some graphical operations might have failed.
398 /// The next time you restart the machine, a dialog box appears, giving you an opportunity to upload data about this failure to Microsoft.
399 VIDEO_DRIVER_DEBUG_REPORT_REQUEST = 0x401B00EC,
400
401 /// The specified buffer is not big enough to contain the entire requested dataset.
402 /// Partial data is populated up to the size of the buffer.
403 /// The caller needs to provide a buffer of the size as specified in the partially populated buffer's content (interface specific).
404 GRAPHICS_PARTIAL_DATA_POPULATED = 0x401E000A,
405
406 /// The kernel driver detected a version mismatch between it and the user mode driver.
407 GRAPHICS_DRIVER_MISMATCH = 0x401E0117,
408
409 /// No mode is pinned on the specified VidPN source/target.
410 GRAPHICS_MODE_NOT_PINNED = 0x401E0307,
411
412 /// The specified mode set does not specify a preference for one of its modes.
413 GRAPHICS_NO_PREFERRED_MODE = 0x401E031E,
414
415 /// The specified dataset (for example, mode set, frequency range set, descriptor set, or topology) is empty.
416 GRAPHICS_DATASET_IS_EMPTY = 0x401E034B,
417
418 /// The specified dataset (for example, mode set, frequency range set, descriptor set, or topology) does not contain any more elements.
419 GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET = 0x401E034C,
420
421 /// The specified content transformation is not pinned on the specified VidPN present path.
422 GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED = 0x401E0351,
423
424 /// The child device presence was not reliably detected.
425 GRAPHICS_UNKNOWN_CHILD_STATUS = 0x401E042F,
426
427 /// Starting the lead adapter in a linked configuration has been temporarily deferred.
428 GRAPHICS_LEADLINK_START_DEFERRED = 0x401E0437,
429
430 /// The display adapter is being polled for children too frequently at the same polling level.
431 GRAPHICS_POLLING_TOO_FREQUENTLY = 0x401E0439,
432
433 /// Starting the adapter has been temporarily deferred.
434 GRAPHICS_START_DEFERRED = 0x401E043A,
435
436 /// The request will be completed later by an NDIS status indication.
437 NDIS_INDICATION_REQUIRED = 0x40230001,
438
439 /// {EXCEPTION} Guard Page Exception A page of memory that marks the end of a data structure, such as a stack or an array, has been accessed.
440 GUARD_PAGE_VIOLATION = 0x80000001,
441
442 /// {EXCEPTION} Alignment Fault A data type misalignment was detected in a load or store instruction.
443 DATATYPE_MISALIGNMENT = 0x80000002,
444
445 /// {EXCEPTION} Breakpoint A breakpoint has been reached.
446 BREAKPOINT = 0x80000003,
447
448 /// {EXCEPTION} Single Step A single step or trace operation has just been completed.
449 SINGLE_STEP = 0x80000004,
450
451 /// {Buffer Overflow} The data was too large to fit into the specified buffer.
452 BUFFER_OVERFLOW = 0x80000005,
453
454 /// {No More Files} No more files were found which match the file specification.
455 NO_MORE_FILES = 0x80000006,
456
457 /// {Kernel Debugger Awakened} The system debugger was awakened by an interrupt.
458 WAKE_SYSTEM_DEBUGGER = 0x80000007,
459
460 /// {Handles Closed} Handles to objects have been automatically closed because of the requested operation.
461 HANDLES_CLOSED = 0x8000000A,
462
463 /// {Non-Inheritable ACL} An access control list (ACL) contains no components that can be inherited.
464 NO_INHERITANCE = 0x8000000B,
465
466 /// {GUID Substitution} During the translation of a globally unique identifier (GUID) to a Windows security ID (SID), no administratively defined GUID prefix was found.
467 /// A substitute prefix was used, which will not compromise system security.
468 /// However, this might provide a more restrictive access than intended.
469 GUID_SUBSTITUTION_MADE = 0x8000000C,
470
471 /// Because of protection conflicts, not all the requested bytes could be copied.
472 PARTIAL_COPY = 0x8000000D,
473
474 /// {Out of Paper} The printer is out of paper.
475 DEVICE_PAPER_EMPTY = 0x8000000E,
476
477 /// {Device Power Is Off} The printer power has been turned off.
478 DEVICE_POWERED_OFF = 0x8000000F,
479
480 /// {Device Offline} The printer has been taken offline.
481 DEVICE_OFF_LINE = 0x80000010,
482
483 /// {Device Busy} The device is currently busy.
484 DEVICE_BUSY = 0x80000011,
485
486 /// {No More EAs} No more extended attributes (EAs) were found for the file.
487 NO_MORE_EAS = 0x80000012,
488
489 /// {Illegal EA} The specified extended attribute (EA) name contains at least one illegal character.
490 INVALID_EA_NAME = 0x80000013,
491
492 /// {Inconsistent EA List} The extended attribute (EA) list is inconsistent.
493 EA_LIST_INCONSISTENT = 0x80000014,
494
495 /// {Invalid EA Flag} An invalid extended attribute (EA) flag was set.
496 INVALID_EA_FLAG = 0x80000015,
497
498 /// {Verifying Disk} The media has changed and a verify operation is in progress; therefore, no reads or writes can be performed to the device, except those that are used in the verify operation.
499 VERIFY_REQUIRED = 0x80000016,
500
501 /// {Too Much Information} The specified access control list (ACL) contained more information than was expected.
502 EXTRANEOUS_INFORMATION = 0x80000017,
503
504 /// This warning level status indicates that the transaction state already exists for the registry subtree, but that a transaction commit was previously aborted.
505 /// The commit has NOT been completed but has not been rolled back either; therefore, it can still be committed, if needed.
506 RXACT_COMMIT_NECESSARY = 0x80000018,
507
508 /// {No More Entries} No more entries are available from an enumeration operation.
509 NO_MORE_ENTRIES = 0x8000001A,
510
511 /// {Filemark Found} A filemark was detected.
512 FILEMARK_DETECTED = 0x8000001B,
513
514 /// {Media Changed} The media has changed.
515 MEDIA_CHANGED = 0x8000001C,
516
517 /// {I/O Bus Reset} An I/O bus reset was detected.
518 BUS_RESET = 0x8000001D,
519
520 /// {End of Media} The end of the media was encountered.
521 END_OF_MEDIA = 0x8000001E,
522
523 /// The beginning of a tape or partition has been detected.
524 BEGINNING_OF_MEDIA = 0x8000001F,
525
526 /// {Media Changed} The media might have changed.
527 MEDIA_CHECK = 0x80000020,
528
529 /// A tape access reached a set mark.
530 SETMARK_DETECTED = 0x80000021,
531
532 /// During a tape access, the end of the data written is reached.
533 NO_DATA_DETECTED = 0x80000022,
534
535 /// The redirector is in use and cannot be unloaded.
536 REDIRECTOR_HAS_OPEN_HANDLES = 0x80000023,
537
538 /// The server is in use and cannot be unloaded.
539 SERVER_HAS_OPEN_HANDLES = 0x80000024,
540
541 /// The specified connection has already been disconnected.
542 ALREADY_DISCONNECTED = 0x80000025,
543
544 /// A long jump has been executed.
545 LONGJUMP = 0x80000026,
546
547 /// A cleaner cartridge is present in the tape library.
548 CLEANER_CARTRIDGE_INSTALLED = 0x80000027,
549
550 /// The Plug and Play query operation was not successful.
551 PLUGPLAY_QUERY_VETOED = 0x80000028,
552
553 /// A frame consolidation has been executed.
554 UNWIND_CONSOLIDATE = 0x80000029,
555
556 /// {Registry Hive Recovered} The registry hive (file): %hs was corrupted and it has been recovered. Some data might have been lost.
557 REGISTRY_HIVE_RECOVERED = 0x8000002A,
558
559 /// The application is attempting to run executable code from the module %hs. This might be insecure.
560 /// An alternative, %hs, is available. Should the application use the secure module %hs?
561 DLL_MIGHT_BE_INSECURE = 0x8000002B,
562
563 /// The application is loading executable code from the module %hs.
564 /// This is secure but might be incompatible with previous releases of the operating system.
565 /// An alternative, %hs, is available. Should the application use the secure module %hs?
566 DLL_MIGHT_BE_INCOMPATIBLE = 0x8000002C,
567
568 /// The create operation stopped after reaching a symbolic link.
569 STOPPED_ON_SYMLINK = 0x8000002D,
570
571 /// The device has indicated that cleaning is necessary.
572 DEVICE_REQUIRES_CLEANING = 0x80000288,
573
574 /// The device has indicated that its door is open. Further operations require it closed and secured.
575 DEVICE_DOOR_OPEN = 0x80000289,
576
577 /// Windows discovered a corruption in the file %hs. This file has now been repaired.
578 /// Check if any data in the file was lost because of the corruption.
579 DATA_LOST_REPAIR = 0x80000803,
580
581 /// Debugger did not handle the exception.
582 DBG_EXCEPTION_NOT_HANDLED = 0x80010001,
583
584 /// The cluster node is already up.
585 CLUSTER_NODE_ALREADY_UP = 0x80130001,
586
587 /// The cluster node is already down.
588 CLUSTER_NODE_ALREADY_DOWN = 0x80130002,
589
590 /// The cluster network is already online.
591 CLUSTER_NETWORK_ALREADY_ONLINE = 0x80130003,
592
593 /// The cluster network is already offline.
594 CLUSTER_NETWORK_ALREADY_OFFLINE = 0x80130004,
595
596 /// The cluster node is already a member of the cluster.
597 CLUSTER_NODE_ALREADY_MEMBER = 0x80130005,
598
599 /// The log could not be set to the requested size.
600 COULD_NOT_RESIZE_LOG = 0x80190009,
601
602 /// There is no transaction metadata on the file.
603 NO_TXF_METADATA = 0x80190029,
604
605 /// The file cannot be recovered because there is a handle still open on it.
606 CANT_RECOVER_WITH_HANDLE_OPEN = 0x80190031,
607
608 /// Transaction metadata is already present on this file and cannot be superseded.
609 TXF_METADATA_ALREADY_PRESENT = 0x80190041,
610
611 /// A transaction scope could not be entered because the scope handler has not been initialized.
612 TRANSACTION_SCOPE_CALLBACKS_NOT_SET = 0x80190042,
613
614 /// {Display Driver Stopped Responding and recovered} The %hs display driver has stopped working normally. The recovery had been performed.
615 VIDEO_HUNG_DISPLAY_DRIVER_THREAD_RECOVERED = 0x801B00EB,
616
617 /// {Buffer too small} The buffer is too small to contain the entry. No information has been written to the buffer.
618 FLT_BUFFER_TOO_SMALL = 0x801C0001,
619
620 /// Volume metadata read or write is incomplete.
621 FVE_PARTIAL_METADATA = 0x80210001,
622
623 /// BitLocker encryption keys were ignored because the volume was in a transient state.
624 FVE_TRANSIENT_STATE = 0x80210002,
625
626 /// {Operation Failed} The requested operation was unsuccessful.
627 UNSUCCESSFUL = 0xC0000001,
628
629 /// {Not Implemented} The requested operation is not implemented.
630 NOT_IMPLEMENTED = 0xC0000002,
631
632 /// {Invalid Parameter} The specified information class is not a valid information class for the specified object.
633 INVALID_INFO_CLASS = 0xC0000003,
634
635 /// The specified information record length does not match the length that is required for the specified information class.
636 INFO_LENGTH_MISMATCH = 0xC0000004,
637
638 /// The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
639 ACCESS_VIOLATION = 0xC0000005,
640
641 /// The instruction at 0x%08lx referenced memory at 0x%08lx.
642 /// The required data was not placed into memory because of an I/O error status of 0x%08lx.
643 IN_PAGE_ERROR = 0xC0000006,
644
645 /// The page file quota for the process has been exhausted.
646 PAGEFILE_QUOTA = 0xC0000007,
647
648 /// An invalid HANDLE was specified.
649 INVALID_HANDLE = 0xC0000008,
650
651 /// An invalid initial stack was specified in a call to NtCreateThread.
652 BAD_INITIAL_STACK = 0xC0000009,
653
654 /// An invalid initial start address was specified in a call to NtCreateThread.
655 BAD_INITIAL_PC = 0xC000000A,
656
657 /// An invalid client ID was specified.
658 INVALID_CID = 0xC000000B,
659
660 /// An attempt was made to cancel or set a timer that has an associated APC and the specified thread is not the thread that originally set the timer with an associated APC routine.
661 TIMER_NOT_CANCELED = 0xC000000C,
662
663 /// An invalid parameter was passed to a service or function.
664 INVALID_PARAMETER = 0xC000000D,
665
666 /// A device that does not exist was specified.
667 NO_SUCH_DEVICE = 0xC000000E,
668
669 /// {File Not Found} The file %hs does not exist.
670 NO_SUCH_FILE = 0xC000000F,
671
672 /// The specified request is not a valid operation for the target device.
673 INVALID_DEVICE_REQUEST = 0xC0000010,
674
675 /// The end-of-file marker has been reached.
676 /// There is no valid data in the file beyond this marker.
677 END_OF_FILE = 0xC0000011,
678
679 /// {Wrong Volume} The wrong volume is in the drive. Insert volume %hs into drive %hs.
680 WRONG_VOLUME = 0xC0000012,
681
682 /// {No Disk} There is no disk in the drive. Insert a disk into drive %hs.
683 NO_MEDIA_IN_DEVICE = 0xC0000013,
684
685 /// {Unknown Disk Format} The disk in drive %hs is not formatted properly.
686 /// Check the disk, and reformat it, if needed.
687 UNRECOGNIZED_MEDIA = 0xC0000014,
688
689 /// {Sector Not Found} The specified sector does not exist.
690 NONEXISTENT_SECTOR = 0xC0000015,
691
692 /// {Still Busy} The specified I/O request packet (IRP) cannot be disposed of because the I/O operation is not complete.
693 MORE_PROCESSING_REQUIRED = 0xC0000016,
694
695 /// {Not Enough Quota} Not enough virtual memory or paging file quota is available to complete the specified operation.
696 NO_MEMORY = 0xC0000017,
697
698 /// {Conflicting Address Range} The specified address range conflicts with the address space.
699 CONFLICTING_ADDRESSES = 0xC0000018,
700
701 /// The address range to unmap is not a mapped view.
702 NOT_MAPPED_VIEW = 0xC0000019,
703
704 /// The virtual memory cannot be freed.
705 UNABLE_TO_FREE_VM = 0xC000001A,
706
707 /// The specified section cannot be deleted.
708 UNABLE_TO_DELETE_SECTION = 0xC000001B,
709
710 /// An invalid system service was specified in a system service call.
711 INVALID_SYSTEM_SERVICE = 0xC000001C,
712
713 /// {EXCEPTION} Illegal Instruction An attempt was made to execute an illegal instruction.
714 ILLEGAL_INSTRUCTION = 0xC000001D,
715
716 /// {Invalid Lock Sequence} An attempt was made to execute an invalid lock sequence.
717 INVALID_LOCK_SEQUENCE = 0xC000001E,
718
719 /// {Invalid Mapping} An attempt was made to create a view for a section that is bigger than the section.
720 INVALID_VIEW_SIZE = 0xC000001F,
721
722 /// {Bad File} The attributes of the specified mapping file for a section of memory cannot be read.
723 INVALID_FILE_FOR_SECTION = 0xC0000020,
724
725 /// {Already Committed} The specified address range is already committed.
726 ALREADY_COMMITTED = 0xC0000021,
727
728 /// {Access Denied} A process has requested access to an object but has not been granted those access rights.
729 ACCESS_DENIED = 0xC0000022,
730
731 /// {Buffer Too Small} The buffer is too small to contain the entry. No information has been written to the buffer.
732 BUFFER_TOO_SMALL = 0xC0000023,
733
734 /// {Wrong Type} There is a mismatch between the type of object that is required by the requested operation and the type of object that is specified in the request.
735 OBJECT_TYPE_MISMATCH = 0xC0000024,
736
737 /// {EXCEPTION} Cannot Continue Windows cannot continue from this exception.
738 NONCONTINUABLE_EXCEPTION = 0xC0000025,
739
740 /// An invalid exception disposition was returned by an exception handler.
741 INVALID_DISPOSITION = 0xC0000026,
742
743 /// Unwind exception code.
744 UNWIND = 0xC0000027,
745
746 /// An invalid or unaligned stack was encountered during an unwind operation.
747 BAD_STACK = 0xC0000028,
748
749 /// An invalid unwind target was encountered during an unwind operation.
750 INVALID_UNWIND_TARGET = 0xC0000029,
751
752 /// An attempt was made to unlock a page of memory that was not locked.
753 NOT_LOCKED = 0xC000002A,
754
755 /// A device parity error on an I/O operation.
756 PARITY_ERROR = 0xC000002B,
757
758 /// An attempt was made to decommit uncommitted virtual memory.
759 UNABLE_TO_DECOMMIT_VM = 0xC000002C,
760
761 /// An attempt was made to change the attributes on memory that has not been committed.
762 NOT_COMMITTED = 0xC000002D,
763
764 /// Invalid object attributes specified to NtCreatePort or invalid port attributes specified to NtConnectPort.
765 INVALID_PORT_ATTRIBUTES = 0xC000002E,
766
767 /// The length of the message that was passed to NtRequestPort or NtRequestWaitReplyPort is longer than the maximum message that is allowed by the port.
768 PORT_MESSAGE_TOO_LONG = 0xC000002F,
769
770 /// An invalid combination of parameters was specified.
771 INVALID_PARAMETER_MIX = 0xC0000030,
772
773 /// An attempt was made to lower a quota limit below the current usage.
774 INVALID_QUOTA_LOWER = 0xC0000031,
775
776 /// {Corrupt Disk} The file system structure on the disk is corrupt and unusable. Run the Chkdsk utility on the volume %hs.
777 DISK_CORRUPT_ERROR = 0xC0000032,
778
779 /// The object name is invalid.
780 OBJECT_NAME_INVALID = 0xC0000033,
781
782 /// The object name is not found.
783 OBJECT_NAME_NOT_FOUND = 0xC0000034,
784
785 /// The object name already exists.
786 OBJECT_NAME_COLLISION = 0xC0000035,
787
788 /// An attempt was made to send a message to a disconnected communication port.
789 PORT_DISCONNECTED = 0xC0000037,
790
791 /// An attempt was made to attach to a device that was already attached to another device.
792 DEVICE_ALREADY_ATTACHED = 0xC0000038,
793
794 /// The object path component was not a directory object.
795 OBJECT_PATH_INVALID = 0xC0000039,
796
797 /// {Path Not Found} The path %hs does not exist.
798 OBJECT_PATH_NOT_FOUND = 0xC000003A,
799
800 /// The object path component was not a directory object.
801 OBJECT_PATH_SYNTAX_BAD = 0xC000003B,
802
803 /// {Data Overrun} A data overrun error occurred.
804 DATA_OVERRUN = 0xC000003C,
805
806 /// {Data Late} A data late error occurred.
807 DATA_LATE_ERROR = 0xC000003D,
808
809 /// {Data Error} An error occurred in reading or writing data.
810 DATA_ERROR = 0xC000003E,
811
812 /// {Bad CRC} A cyclic redundancy check (CRC) checksum error occurred.
813 CRC_ERROR = 0xC000003F,
814
815 /// {Section Too Large} The specified section is too big to map the file.
816 SECTION_TOO_BIG = 0xC0000040,
817
818 /// The NtConnectPort request is refused.
819 PORT_CONNECTION_REFUSED = 0xC0000041,
820
821 /// The type of port handle is invalid for the operation that is requested.
822 INVALID_PORT_HANDLE = 0xC0000042,
823
824 /// A file cannot be opened because the share access flags are incompatible.
825 SHARING_VIOLATION = 0xC0000043,
826
827 /// Insufficient quota exists to complete the operation.
828 QUOTA_EXCEEDED = 0xC0000044,
829
830 /// The specified page protection was not valid.
831 INVALID_PAGE_PROTECTION = 0xC0000045,
832
833 /// An attempt to release a mutant object was made by a thread that was not the owner of the mutant object.
834 MUTANT_NOT_OWNED = 0xC0000046,
835
836 /// An attempt was made to release a semaphore such that its maximum count would have been exceeded.
837 SEMAPHORE_LIMIT_EXCEEDED = 0xC0000047,
838
839 /// An attempt was made to set the DebugPort or ExceptionPort of a process, but a port already exists in the process, or an attempt was made to set the CompletionPort of a file but a port was already set in the file, or an attempt was made to set the associated completion port of an ALPC port but it is already set.
840 PORT_ALREADY_SET = 0xC0000048,
841
842 /// An attempt was made to query image information on a section that does not map an image.
843 SECTION_NOT_IMAGE = 0xC0000049,
844
845 /// An attempt was made to suspend a thread whose suspend count was at its maximum.
846 SUSPEND_COUNT_EXCEEDED = 0xC000004A,
847
848 /// An attempt was made to suspend a thread that has begun termination.
849 THREAD_IS_TERMINATING = 0xC000004B,
850
851 /// An attempt was made to set the working set limit to an invalid value (for example, the minimum greater than maximum).
852 BAD_WORKING_SET_LIMIT = 0xC000004C,
853
854 /// A section was created to map a file that is not compatible with an already existing section that maps the same file.
855 INCOMPATIBLE_FILE_MAP = 0xC000004D,
856
857 /// A view to a section specifies a protection that is incompatible with the protection of the initial view.
858 SECTION_PROTECTION = 0xC000004E,
859
860 /// An operation involving EAs failed because the file system does not support EAs.
861 EAS_NOT_SUPPORTED = 0xC000004F,
862
863 /// An EA operation failed because the EA set is too large.
864 EA_TOO_LARGE = 0xC0000050,
865
866 /// An EA operation failed because the name or EA index is invalid.
867 NONEXISTENT_EA_ENTRY = 0xC0000051,
868
869 /// The file for which EAs were requested has no EAs.
870 NO_EAS_ON_FILE = 0xC0000052,
871
872 /// The EA is corrupt and cannot be read.
873 EA_CORRUPT_ERROR = 0xC0000053,
874
875 /// A requested read/write cannot be granted due to a conflicting file lock.
876 FILE_LOCK_CONFLICT = 0xC0000054,
877
878 /// A requested file lock cannot be granted due to other existing locks.
879 LOCK_NOT_GRANTED = 0xC0000055,
880
881 /// A non-close operation has been requested of a file object that has a delete pending.
882 DELETE_PENDING = 0xC0000056,
883
884 /// An attempt was made to set the control attribute on a file.
885 /// This attribute is not supported in the destination file system.
886 CTL_FILE_NOT_SUPPORTED = 0xC0000057,
887
888 /// Indicates a revision number that was encountered or specified is not one that is known by the service.
889 /// It might be a more recent revision than the service is aware of.
890 UNKNOWN_REVISION = 0xC0000058,
891
892 /// Indicates that two revision levels are incompatible.
893 REVISION_MISMATCH = 0xC0000059,
894
895 /// Indicates a particular security ID cannot be assigned as the owner of an object.
896 INVALID_OWNER = 0xC000005A,
897
898 /// Indicates a particular security ID cannot be assigned as the primary group of an object.
899 INVALID_PRIMARY_GROUP = 0xC000005B,
900
901 /// An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client.
902 NO_IMPERSONATION_TOKEN = 0xC000005C,
903
904 /// A mandatory group cannot be disabled.
905 CANT_DISABLE_MANDATORY = 0xC000005D,
906
907 /// No logon servers are currently available to service the logon request.
908 NO_LOGON_SERVERS = 0xC000005E,
909
910 /// A specified logon session does not exist. It might already have been terminated.
911 NO_SUCH_LOGON_SESSION = 0xC000005F,
912
913 /// A specified privilege does not exist.
914 NO_SUCH_PRIVILEGE = 0xC0000060,
915
916 /// A required privilege is not held by the client.
917 PRIVILEGE_NOT_HELD = 0xC0000061,
918
919 /// The name provided is not a properly formed account name.
920 INVALID_ACCOUNT_NAME = 0xC0000062,
921
922 /// The specified account already exists.
923 USER_EXISTS = 0xC0000063,
924
925 /// The specified account does not exist.
926 NO_SUCH_USER = 0xC0000064,
927
928 /// The specified group already exists.
929 GROUP_EXISTS = 0xC0000065,
930
931 /// The specified group does not exist.
932 NO_SUCH_GROUP = 0xC0000066,
933
934 /// The specified user account is already in the specified group account.
935 /// Also used to indicate a group cannot be deleted because it contains a member.
936 MEMBER_IN_GROUP = 0xC0000067,
937
938 /// The specified user account is not a member of the specified group account.
939 MEMBER_NOT_IN_GROUP = 0xC0000068,
940
941 /// Indicates the requested operation would disable or delete the last remaining administration account.
942 /// This is not allowed to prevent creating a situation in which the system cannot be administrated.
943 LAST_ADMIN = 0xC0000069,
944
945 /// When trying to update a password, this return status indicates that the value provided as the current password is not correct.
946 WRONG_PASSWORD = 0xC000006A,
947
948 /// When trying to update a password, this return status indicates that the value provided for the new password contains values that are not allowed in passwords.
949 ILL_FORMED_PASSWORD = 0xC000006B,
950
951 /// When trying to update a password, this status indicates that some password update rule has been violated.
952 /// For example, the password might not meet length criteria.
953 PASSWORD_RESTRICTION = 0xC000006C,
954
955 /// The attempted logon is invalid.
956 /// This is either due to a bad username or authentication information.
957 LOGON_FAILURE = 0xC000006D,
958
959 /// Indicates a referenced user name and authentication information are valid, but some user account restriction has prevented successful authentication (such as time-of-day restrictions).
960 ACCOUNT_RESTRICTION = 0xC000006E,
961
962 /// The user account has time restrictions and cannot be logged onto at this time.
963 INVALID_LOGON_HOURS = 0xC000006F,
964
965 /// The user account is restricted so that it cannot be used to log on from the source workstation.
966 INVALID_WORKSTATION = 0xC0000070,
967
968 /// The user account password has expired.
969 PASSWORD_EXPIRED = 0xC0000071,
970
971 /// The referenced account is currently disabled and cannot be logged on to.
972 ACCOUNT_DISABLED = 0xC0000072,
973
974 /// None of the information to be translated has been translated.
975 NONE_MAPPED = 0xC0000073,
976
977 /// The number of LUIDs requested cannot be allocated with a single allocation.
978 TOO_MANY_LUIDS_REQUESTED = 0xC0000074,
979
980 /// Indicates there are no more LUIDs to allocate.
981 LUIDS_EXHAUSTED = 0xC0000075,
982
983 /// Indicates the sub-authority value is invalid for the particular use.
984 INVALID_SUB_AUTHORITY = 0xC0000076,
985
986 /// Indicates the ACL structure is not valid.
987 INVALID_ACL = 0xC0000077,
988
989 /// Indicates the SID structure is not valid.
990 INVALID_SID = 0xC0000078,
991
992 /// Indicates the SECURITY_DESCRIPTOR structure is not valid.
993 INVALID_SECURITY_DESCR = 0xC0000079,
994
995 /// Indicates the specified procedure address cannot be found in the DLL.
996 PROCEDURE_NOT_FOUND = 0xC000007A,
997
998 /// {Bad Image} %hs is either not designed to run on Windows or it contains an error.
999 /// Try installing the program again using the original installation media or contact your system administrator or the software vendor for support.
1000 INVALID_IMAGE_FORMAT = 0xC000007B,
1001
1002 /// An attempt was made to reference a token that does not exist.
1003 /// This is typically done by referencing the token that is associated with a thread when the thread is not impersonating a client.
1004 NO_TOKEN = 0xC000007C,
1005
1006 /// Indicates that an attempt to build either an inherited ACL or ACE was not successful. This can be caused by a number of things.
1007 /// One of the more probable causes is the replacement of a CreatorId with a SID that did not fit into the ACE or ACL.
1008 BAD_INHERITANCE_ACL = 0xC000007D,
1009
1010 /// The range specified in NtUnlockFile was not locked.
1011 RANGE_NOT_LOCKED = 0xC000007E,
1012
1013 /// An operation failed because the disk was full.
1014 DISK_FULL = 0xC000007F,
1015
1016 /// The GUID allocation server is disabled at the moment.
1017 SERVER_DISABLED = 0xC0000080,
1018
1019 /// The GUID allocation server is enabled at the moment.
1020 SERVER_NOT_DISABLED = 0xC0000081,
1021
1022 /// Too many GUIDs were requested from the allocation server at once.
1023 TOO_MANY_GUIDS_REQUESTED = 0xC0000082,
1024
1025 /// The GUIDs could not be allocated because the Authority Agent was exhausted.
1026 GUIDS_EXHAUSTED = 0xC0000083,
1027
1028 /// The value provided was an invalid value for an identifier authority.
1029 INVALID_ID_AUTHORITY = 0xC0000084,
1030
1031 /// No more authority agent values are available for the particular identifier authority value.
1032 AGENTS_EXHAUSTED = 0xC0000085,
1033
1034 /// An invalid volume label has been specified.
1035 INVALID_VOLUME_LABEL = 0xC0000086,
1036
1037 /// A mapped section could not be extended.
1038 SECTION_NOT_EXTENDED = 0xC0000087,
1039
1040 /// Specified section to flush does not map a data file.
1041 NOT_MAPPED_DATA = 0xC0000088,
1042
1043 /// Indicates the specified image file did not contain a resource section.
1044 RESOURCE_DATA_NOT_FOUND = 0xC0000089,
1045
1046 /// Indicates the specified resource type cannot be found in the image file.
1047 RESOURCE_TYPE_NOT_FOUND = 0xC000008A,
1048
1049 /// Indicates the specified resource name cannot be found in the image file.
1050 RESOURCE_NAME_NOT_FOUND = 0xC000008B,
1051
1052 /// {EXCEPTION} Array bounds exceeded.
1053 ARRAY_BOUNDS_EXCEEDED = 0xC000008C,
1054
1055 /// {EXCEPTION} Floating-point denormal operand.
1056 FLOAT_DENORMAL_OPERAND = 0xC000008D,
1057
1058 /// {EXCEPTION} Floating-point division by zero.
1059 FLOAT_DIVIDE_BY_ZERO = 0xC000008E,
1060
1061 /// {EXCEPTION} Floating-point inexact result.
1062 FLOAT_INEXACT_RESULT = 0xC000008F,
1063
1064 /// {EXCEPTION} Floating-point invalid operation.
1065 FLOAT_INVALID_OPERATION = 0xC0000090,
1066
1067 /// {EXCEPTION} Floating-point overflow.
1068 FLOAT_OVERFLOW = 0xC0000091,
1069
1070 /// {EXCEPTION} Floating-point stack check.
1071 FLOAT_STACK_CHECK = 0xC0000092,
1072
1073 /// {EXCEPTION} Floating-point underflow.
1074 FLOAT_UNDERFLOW = 0xC0000093,
1075
1076 /// {EXCEPTION} Integer division by zero.
1077 INTEGER_DIVIDE_BY_ZERO = 0xC0000094,
1078
1079 /// {EXCEPTION} Integer overflow.
1080 INTEGER_OVERFLOW = 0xC0000095,
1081
1082 /// {EXCEPTION} Privileged instruction.
1083 PRIVILEGED_INSTRUCTION = 0xC0000096,
1084
1085 /// An attempt was made to install more paging files than the system supports.
1086 TOO_MANY_PAGING_FILES = 0xC0000097,
1087
1088 /// The volume for a file has been externally altered such that the opened file is no longer valid.
1089 FILE_INVALID = 0xC0000098,
1090
1091 /// When a block of memory is allotted for future updates, such as the memory allocated to hold discretionary access control and primary group information, successive updates might exceed the amount of memory originally allotted.
1092 /// Because a quota might already have been charged to several processes that have handles to the object, it is not reasonable to alter the size of the allocated memory.
1093 /// Instead, a request that requires more memory than has been allotted must fail and the STATUS_ALLOTTED_SPACE_EXCEEDED error returned.
1094 ALLOTTED_SPACE_EXCEEDED = 0xC0000099,
1095
1096 /// Insufficient system resources exist to complete the API.
1097 INSUFFICIENT_RESOURCES = 0xC000009A,
1098
1099 /// An attempt has been made to open a DFS exit path control file.
1100 DFS_EXIT_PATH_FOUND = 0xC000009B,
1101
1102 /// There are bad blocks (sectors) on the hard disk.
1103 DEVICE_DATA_ERROR = 0xC000009C,
1104
1105 /// There is bad cabling, non-termination, or the controller is not able to obtain access to the hard disk.
1106 DEVICE_NOT_CONNECTED = 0xC000009D,
1107
1108 /// Virtual memory cannot be freed because the base address is not the base of the region and a region size of zero was specified.
1109 FREE_VM_NOT_AT_BASE = 0xC000009F,
1110
1111 /// An attempt was made to free virtual memory that is not allocated.
1112 MEMORY_NOT_ALLOCATED = 0xC00000A0,
1113
1114 /// The working set is not big enough to allow the requested pages to be locked.
1115 WORKING_SET_QUOTA = 0xC00000A1,
1116
1117 /// {Write Protect Error} The disk cannot be written to because it is write-protected.
1118 /// Remove the write protection from the volume %hs in drive %hs.
1119 MEDIA_WRITE_PROTECTED = 0xC00000A2,
1120
1121 /// {Drive Not Ready} The drive is not ready for use; its door might be open.
1122 /// Check drive %hs and make sure that a disk is inserted and that the drive door is closed.
1123 DEVICE_NOT_READY = 0xC00000A3,
1124
1125 /// The specified attributes are invalid or are incompatible with the attributes for the group as a whole.
1126 INVALID_GROUP_ATTRIBUTES = 0xC00000A4,
1127
1128 /// A specified impersonation level is invalid.
1129 /// Also used to indicate that a required impersonation level was not provided.
1130 BAD_IMPERSONATION_LEVEL = 0xC00000A5,
1131
1132 /// An attempt was made to open an anonymous-level token. Anonymous tokens cannot be opened.
1133 CANT_OPEN_ANONYMOUS = 0xC00000A6,
1134
1135 /// The validation information class requested was invalid.
1136 BAD_VALIDATION_CLASS = 0xC00000A7,
1137
1138 /// The type of a token object is inappropriate for its attempted use.
1139 BAD_TOKEN_TYPE = 0xC00000A8,
1140
1141 /// The type of a token object is inappropriate for its attempted use.
1142 BAD_MASTER_BOOT_RECORD = 0xC00000A9,
1143
1144 /// An attempt was made to execute an instruction at an unaligned address and the host system does not support unaligned instruction references.
1145 INSTRUCTION_MISALIGNMENT = 0xC00000AA,
1146
1147 /// The maximum named pipe instance count has been reached.
1148 INSTANCE_NOT_AVAILABLE = 0xC00000AB,
1149
1150 /// An instance of a named pipe cannot be found in the listening state.
1151 PIPE_NOT_AVAILABLE = 0xC00000AC,
1152
1153 /// The named pipe is not in the connected or closing state.
1154 INVALID_PIPE_STATE = 0xC00000AD,
1155
1156 /// The specified pipe is set to complete operations and there are current I/O operations queued so that it cannot be changed to queue operations.
1157 PIPE_BUSY = 0xC00000AE,
1158
1159 /// The specified handle is not open to the server end of the named pipe.
1160 ILLEGAL_FUNCTION = 0xC00000AF,
1161
1162 /// The specified named pipe is in the disconnected state.
1163 PIPE_DISCONNECTED = 0xC00000B0,
1164
1165 /// The specified named pipe is in the closing state.
1166 PIPE_CLOSING = 0xC00000B1,
1167
1168 /// The specified named pipe is in the connected state.
1169 PIPE_CONNECTED = 0xC00000B2,
1170
1171 /// The specified named pipe is in the listening state.
1172 PIPE_LISTENING = 0xC00000B3,
1173
1174 /// The specified named pipe is not in message mode.
1175 INVALID_READ_MODE = 0xC00000B4,
1176
1177 /// {Device Timeout} The specified I/O operation on %hs was not completed before the time-out period expired.
1178 IO_TIMEOUT = 0xC00000B5,
1179
1180 /// The specified file has been closed by another process.
1181 FILE_FORCED_CLOSED = 0xC00000B6,
1182
1183 /// Profiling is not started.
1184 PROFILING_NOT_STARTED = 0xC00000B7,
1185
1186 /// Profiling is not stopped.
1187 PROFILING_NOT_STOPPED = 0xC00000B8,
1188
1189 /// The passed ACL did not contain the minimum required information.
1190 COULD_NOT_INTERPRET = 0xC00000B9,
1191
1192 /// The file that was specified as a target is a directory, and the caller specified that it could be anything but a directory.
1193 FILE_IS_A_DIRECTORY = 0xC00000BA,
1194
1195 /// The request is not supported.
1196 NOT_SUPPORTED = 0xC00000BB,
1197
1198 /// This remote computer is not listening.
1199 REMOTE_NOT_LISTENING = 0xC00000BC,
1200
1201 /// A duplicate name exists on the network.
1202 DUPLICATE_NAME = 0xC00000BD,
1203
1204 /// The network path cannot be located.
1205 BAD_NETWORK_PATH = 0xC00000BE,
1206
1207 /// The network is busy.
1208 NETWORK_BUSY = 0xC00000BF,
1209
1210 /// This device does not exist.
1211 DEVICE_DOES_NOT_EXIST = 0xC00000C0,
1212
1213 /// The network BIOS command limit has been reached.
1214 TOO_MANY_COMMANDS = 0xC00000C1,
1215
1216 /// An I/O adapter hardware error has occurred.
1217 ADAPTER_HARDWARE_ERROR = 0xC00000C2,
1218
1219 /// The network responded incorrectly.
1220 INVALID_NETWORK_RESPONSE = 0xC00000C3,
1221
1222 /// An unexpected network error occurred.
1223 UNEXPECTED_NETWORK_ERROR = 0xC00000C4,
1224
1225 /// The remote adapter is not compatible.
1226 BAD_REMOTE_ADAPTER = 0xC00000C5,
1227
1228 /// The print queue is full.
1229 PRINT_QUEUE_FULL = 0xC00000C6,
1230
1231 /// Space to store the file that is waiting to be printed is not available on the server.
1232 NO_SPOOL_SPACE = 0xC00000C7,
1233
1234 /// The requested print file has been canceled.
1235 PRINT_CANCELLED = 0xC00000C8,
1236
1237 /// The network name was deleted.
1238 NETWORK_NAME_DELETED = 0xC00000C9,
1239
1240 /// Network access is denied.
1241 NETWORK_ACCESS_DENIED = 0xC00000CA,
1242
1243 /// {Incorrect Network Resource Type} The specified device type (LPT, for example) conflicts with the actual device type on the remote resource.
1244 BAD_DEVICE_TYPE = 0xC00000CB,
1245
1246 /// {Network Name Not Found} The specified share name cannot be found on the remote server.
1247 BAD_NETWORK_NAME = 0xC00000CC,
1248
1249 /// The name limit for the network adapter card of the local computer was exceeded.
1250 TOO_MANY_NAMES = 0xC00000CD,
1251
1252 /// The network BIOS session limit was exceeded.
1253 TOO_MANY_SESSIONS = 0xC00000CE,
1254
1255 /// File sharing has been temporarily paused.
1256 SHARING_PAUSED = 0xC00000CF,
1257
1258 /// No more connections can be made to this remote computer at this time because the computer has already accepted the maximum number of connections.
1259 REQUEST_NOT_ACCEPTED = 0xC00000D0,
1260
1261 /// Print or disk redirection is temporarily paused.
1262 REDIRECTOR_PAUSED = 0xC00000D1,
1263
1264 /// A network data fault occurred.
1265 NET_WRITE_FAULT = 0xC00000D2,
1266
1267 /// The number of active profiling objects is at the maximum and no more can be started.
1268 PROFILING_AT_LIMIT = 0xC00000D3,
1269
1270 /// {Incorrect Volume} The destination file of a rename request is located on a different device than the source of the rename request.
1271 NOT_SAME_DEVICE = 0xC00000D4,
1272
1273 /// The specified file has been renamed and thus cannot be modified.
1274 FILE_RENAMED = 0xC00000D5,
1275
1276 /// {Network Request Timeout} The session with a remote server has been disconnected because the time-out interval for a request has expired.
1277 VIRTUAL_CIRCUIT_CLOSED = 0xC00000D6,
1278
1279 /// Indicates an attempt was made to operate on the security of an object that does not have security associated with it.
1280 NO_SECURITY_ON_OBJECT = 0xC00000D7,
1281
1282 /// Used to indicate that an operation cannot continue without blocking for I/O.
1283 CANT_WAIT = 0xC00000D8,
1284
1285 /// Used to indicate that a read operation was done on an empty pipe.
1286 PIPE_EMPTY = 0xC00000D9,
1287
1288 /// Configuration information could not be read from the domain controller, either because the machine is unavailable or access has been denied.
1289 CANT_ACCESS_DOMAIN_INFO = 0xC00000DA,
1290
1291 /// Indicates that a thread attempted to terminate itself by default (called NtTerminateThread with NULL) and it was the last thread in the current process.
1292 CANT_TERMINATE_SELF = 0xC00000DB,
1293
1294 /// Indicates the Sam Server was in the wrong state to perform the desired operation.
1295 INVALID_SERVER_STATE = 0xC00000DC,
1296
1297 /// Indicates the domain was in the wrong state to perform the desired operation.
1298 INVALID_DOMAIN_STATE = 0xC00000DD,
1299
1300 /// This operation is only allowed for the primary domain controller of the domain.
1301 INVALID_DOMAIN_ROLE = 0xC00000DE,
1302
1303 /// The specified domain did not exist.
1304 NO_SUCH_DOMAIN = 0xC00000DF,
1305
1306 /// The specified domain already exists.
1307 DOMAIN_EXISTS = 0xC00000E0,
1308
1309 /// An attempt was made to exceed the limit on the number of domains per server for this release.
1310 DOMAIN_LIMIT_EXCEEDED = 0xC00000E1,
1311
1312 /// An error status returned when the opportunistic lock (oplock) request is denied.
1313 OPLOCK_NOT_GRANTED = 0xC00000E2,
1314
1315 /// An error status returned when an invalid opportunistic lock (oplock) acknowledgment is received by a file system.
1316 INVALID_OPLOCK_PROTOCOL = 0xC00000E3,
1317
1318 /// This error indicates that the requested operation cannot be completed due to a catastrophic media failure or an on-disk data structure corruption.
1319 INTERNAL_DB_CORRUPTION = 0xC00000E4,
1320
1321 /// An internal error occurred.
1322 INTERNAL_ERROR = 0xC00000E5,
1323
1324 /// Indicates generic access types were contained in an access mask which should already be mapped to non-generic access types.
1325 GENERIC_NOT_MAPPED = 0xC00000E6,
1326
1327 /// Indicates a security descriptor is not in the necessary format (absolute or self-relative).
1328 BAD_DESCRIPTOR_FORMAT = 0xC00000E7,
1329
1330 /// An access to a user buffer failed at an expected point in time.
1331 /// This code is defined because the caller does not want to accept STATUS_ACCESS_VIOLATION in its filter.
1332 INVALID_USER_BUFFER = 0xC00000E8,
1333
1334 /// If an I/O error that is not defined in the standard FsRtl filter is returned, it is converted to the following error, which is guaranteed to be in the filter.
1335 /// In this case, information is lost; however, the filter correctly handles the exception.
1336 UNEXPECTED_IO_ERROR = 0xC00000E9,
1337
1338 /// If an MM error that is not defined in the standard FsRtl filter is returned, it is converted to one of the following errors, which are guaranteed to be in the filter.
1339 /// In this case, information is lost; however, the filter correctly handles the exception.
1340 UNEXPECTED_MM_CREATE_ERR = 0xC00000EA,
1341
1342 /// If an MM error that is not defined in the standard FsRtl filter is returned, it is converted to one of the following errors, which are guaranteed to be in the filter.
1343 /// In this case, information is lost; however, the filter correctly handles the exception.
1344 UNEXPECTED_MM_MAP_ERROR = 0xC00000EB,
1345
1346 /// If an MM error that is not defined in the standard FsRtl filter is returned, it is converted to one of the following errors, which are guaranteed to be in the filter.
1347 /// In this case, information is lost; however, the filter correctly handles the exception.
1348 UNEXPECTED_MM_EXTEND_ERR = 0xC00000EC,
1349
1350 /// The requested action is restricted for use by logon processes only.
1351 /// The calling process has not registered as a logon process.
1352 NOT_LOGON_PROCESS = 0xC00000ED,
1353
1354 /// An attempt has been made to start a new session manager or LSA logon session by using an ID that is already in use.
1355 LOGON_SESSION_EXISTS = 0xC00000EE,
1356
1357 /// An invalid parameter was passed to a service or function as the first argument.
1358 INVALID_PARAMETER_1 = 0xC00000EF,
1359
1360 /// An invalid parameter was passed to a service or function as the second argument.
1361 INVALID_PARAMETER_2 = 0xC00000F0,
1362
1363 /// An invalid parameter was passed to a service or function as the third argument.
1364 INVALID_PARAMETER_3 = 0xC00000F1,
1365
1366 /// An invalid parameter was passed to a service or function as the fourth argument.
1367 INVALID_PARAMETER_4 = 0xC00000F2,
1368
1369 /// An invalid parameter was passed to a service or function as the fifth argument.
1370 INVALID_PARAMETER_5 = 0xC00000F3,
1371
1372 /// An invalid parameter was passed to a service or function as the sixth argument.
1373 INVALID_PARAMETER_6 = 0xC00000F4,
1374
1375 /// An invalid parameter was passed to a service or function as the seventh argument.
1376 INVALID_PARAMETER_7 = 0xC00000F5,
1377
1378 /// An invalid parameter was passed to a service or function as the eighth argument.
1379 INVALID_PARAMETER_8 = 0xC00000F6,
1380
1381 /// An invalid parameter was passed to a service or function as the ninth argument.
1382 INVALID_PARAMETER_9 = 0xC00000F7,
1383
1384 /// An invalid parameter was passed to a service or function as the tenth argument.
1385 INVALID_PARAMETER_10 = 0xC00000F8,
1386
1387 /// An invalid parameter was passed to a service or function as the eleventh argument.
1388 INVALID_PARAMETER_11 = 0xC00000F9,
1389
1390 /// An invalid parameter was passed to a service or function as the twelfth argument.
1391 INVALID_PARAMETER_12 = 0xC00000FA,
1392
1393 /// An attempt was made to access a network file, but the network software was not yet started.
1394 REDIRECTOR_NOT_STARTED = 0xC00000FB,
1395
1396 /// An attempt was made to start the redirector, but the redirector has already been started.
1397 REDIRECTOR_STARTED = 0xC00000FC,
1398
1399 /// A new guard page for the stack cannot be created.
1400 STACK_OVERFLOW = 0xC00000FD,
1401
1402 /// A specified authentication package is unknown.
1403 NO_SUCH_PACKAGE = 0xC00000FE,
1404
1405 /// A malformed function table was encountered during an unwind operation.
1406 BAD_FUNCTION_TABLE = 0xC00000FF,
1407
1408 /// Indicates the specified environment variable name was not found in the specified environment block.
1409 VARIABLE_NOT_FOUND = 0xC0000100,
1410
1411 /// Indicates that the directory trying to be deleted is not empty.
1412 DIRECTORY_NOT_EMPTY = 0xC0000101,
1413
1414 /// {Corrupt File} The file or directory %hs is corrupt and unreadable. Run the Chkdsk utility.
1415 FILE_CORRUPT_ERROR = 0xC0000102,
1416
1417 /// A requested opened file is not a directory.
1418 NOT_A_DIRECTORY = 0xC0000103,
1419
1420 /// The logon session is not in a state that is consistent with the requested operation.
1421 BAD_LOGON_SESSION_STATE = 0xC0000104,
1422
1423 /// An internal LSA error has occurred.
1424 /// An authentication package has requested the creation of a logon session but the ID of an already existing logon session has been specified.
1425 LOGON_SESSION_COLLISION = 0xC0000105,
1426
1427 /// A specified name string is too long for its intended use.
1428 NAME_TOO_LONG = 0xC0000106,
1429
1430 /// The user attempted to force close the files on a redirected drive, but there were opened files on the drive, and the user did not specify a sufficient level of force.
1431 FILES_OPEN = 0xC0000107,
1432
1433 /// The user attempted to force close the files on a redirected drive, but there were opened directories on the drive, and the user did not specify a sufficient level of force.
1434 CONNECTION_IN_USE = 0xC0000108,
1435
1436 /// RtlFindMessage could not locate the requested message ID in the message table resource.
1437 MESSAGE_NOT_FOUND = 0xC0000109,
1438
1439 /// An attempt was made to duplicate an object handle into or out of an exiting process.
1440 PROCESS_IS_TERMINATING = 0xC000010A,
1441
1442 /// Indicates an invalid value has been provided for the LogonType requested.
1443 INVALID_LOGON_TYPE = 0xC000010B,
1444
1445 /// Indicates that an attempt was made to assign protection to a file system file or directory and one of the SIDs in the security descriptor could not be translated into a GUID that could be stored by the file system.
1446 /// This causes the protection attempt to fail, which might cause a file creation attempt to fail.
1447 NO_GUID_TRANSLATION = 0xC000010C,
1448
1449 /// Indicates that an attempt has been made to impersonate via a named pipe that has not yet been read from.
1450 CANNOT_IMPERSONATE = 0xC000010D,
1451
1452 /// Indicates that the specified image is already loaded.
1453 IMAGE_ALREADY_LOADED = 0xC000010E,
1454
1455 /// Indicates that an attempt was made to change the size of the LDT for a process that has no LDT.
1456 NO_LDT = 0xC0000117,
1457
1458 /// Indicates that an attempt was made to grow an LDT by setting its size, or that the size was not an even number of selectors.
1459 INVALID_LDT_SIZE = 0xC0000118,
1460
1461 /// Indicates that the starting value for the LDT information was not an integral multiple of the selector size.
1462 INVALID_LDT_OFFSET = 0xC0000119,
1463
1464 /// Indicates that the user supplied an invalid descriptor when trying to set up LDT descriptors.
1465 INVALID_LDT_DESCRIPTOR = 0xC000011A,
1466
1467 /// The specified image file did not have the correct format. It appears to be NE format.
1468 INVALID_IMAGE_NE_FORMAT = 0xC000011B,
1469
1470 /// Indicates that the transaction state of a registry subtree is incompatible with the requested operation.
1471 /// For example, a request has been made to start a new transaction with one already in progress, or a request has been made to apply a transaction when one is not currently in progress.
1472 RXACT_INVALID_STATE = 0xC000011C,
1473
1474 /// Indicates an error has occurred during a registry transaction commit.
1475 /// The database has been left in an unknown, but probably inconsistent, state.
1476 /// The state of the registry transaction is left as COMMITTING.
1477 RXACT_COMMIT_FAILURE = 0xC000011D,
1478
1479 /// An attempt was made to map a file of size zero with the maximum size specified as zero.
1480 MAPPED_FILE_SIZE_ZERO = 0xC000011E,
1481
1482 /// Too many files are opened on a remote server.
1483 /// This error should only be returned by the Windows redirector on a remote drive.
1484 TOO_MANY_OPENED_FILES = 0xC000011F,
1485
1486 /// The I/O request was canceled.
1487 CANCELLED = 0xC0000120,
1488
1489 /// An attempt has been made to remove a file or directory that cannot be deleted.
1490 CANNOT_DELETE = 0xC0000121,
1491
1492 /// Indicates a name that was specified as a remote computer name is syntactically invalid.
1493 INVALID_COMPUTER_NAME = 0xC0000122,
1494
1495 /// An I/O request other than close was performed on a file after it was deleted, which can only happen to a request that did not complete before the last handle was closed via NtClose.
1496 FILE_DELETED = 0xC0000123,
1497
1498 /// Indicates an operation that is incompatible with built-in accounts has been attempted on a built-in (special) SAM account. For example, built-in accounts cannot be deleted.
1499 SPECIAL_ACCOUNT = 0xC0000124,
1500
1501 /// The operation requested cannot be performed on the specified group because it is a built-in special group.
1502 SPECIAL_GROUP = 0xC0000125,
1503
1504 /// The operation requested cannot be performed on the specified user because it is a built-in special user.
1505 SPECIAL_USER = 0xC0000126,
1506
1507 /// Indicates a member cannot be removed from a group because the group is currently the member's primary group.
1508 MEMBERS_PRIMARY_GROUP = 0xC0000127,
1509
1510 /// An I/O request other than close and several other special case operations was attempted using a file object that had already been closed.
1511 FILE_CLOSED = 0xC0000128,
1512
1513 /// Indicates a process has too many threads to perform the requested action.
1514 /// For example, assignment of a primary token can be performed only when a process has zero or one threads.
1515 TOO_MANY_THREADS = 0xC0000129,
1516
1517 /// An attempt was made to operate on a thread within a specific process, but the specified thread is not in the specified process.
1518 THREAD_NOT_IN_PROCESS = 0xC000012A,
1519
1520 /// An attempt was made to establish a token for use as a primary token but the token is already in use.
1521 /// A token can only be the primary token of one process at a time.
1522 TOKEN_ALREADY_IN_USE = 0xC000012B,
1523
1524 /// The page file quota was exceeded.
1525 PAGEFILE_QUOTA_EXCEEDED = 0xC000012C,
1526
1527 /// {Out of Virtual Memory} Your system is low on virtual memory.
1528 /// To ensure that Windows runs correctly, increase the size of your virtual memory paging file. For more information, see Help.
1529 COMMITMENT_LIMIT = 0xC000012D,
1530
1531 /// The specified image file did not have the correct format: it appears to be LE format.
1532 INVALID_IMAGE_LE_FORMAT = 0xC000012E,
1533
1534 /// The specified image file did not have the correct format: it did not have an initial MZ.
1535 INVALID_IMAGE_NOT_MZ = 0xC000012F,
1536
1537 /// The specified image file did not have the correct format: it did not have a proper e_lfarlc in the MZ header.
1538 INVALID_IMAGE_PROTECT = 0xC0000130,
1539
1540 /// The specified image file did not have the correct format: it appears to be a 16-bit Windows image.
1541 INVALID_IMAGE_WIN_16 = 0xC0000131,
1542
1543 /// The Netlogon service cannot start because another Netlogon service running in the domain conflicts with the specified role.
1544 LOGON_SERVER_CONFLICT = 0xC0000132,
1545
1546 /// The time at the primary domain controller is different from the time at the backup domain controller or member server by too large an amount.
1547 TIME_DIFFERENCE_AT_DC = 0xC0000133,
1548
1549 /// On applicable Windows Server releases, the SAM database is significantly out of synchronization with the copy on the domain controller. A complete synchronization is required.
1550 SYNCHRONIZATION_REQUIRED = 0xC0000134,
1551
1552 /// {Unable To Locate Component} This application has failed to start because %hs was not found.
1553 /// Reinstalling the application might fix this problem.
1554 DLL_NOT_FOUND = 0xC0000135,
1555
1556 /// The NtCreateFile API failed. This error should never be returned to an application; it is a place holder for the Windows LAN Manager Redirector to use in its internal error-mapping routines.
1557 OPEN_FAILED = 0xC0000136,
1558
1559 /// {Privilege Failed} The I/O permissions for the process could not be changed.
1560 IO_PRIVILEGE_FAILED = 0xC0000137,
1561
1562 /// {Ordinal Not Found} The ordinal %ld could not be located in the dynamic link library %hs.
1563 ORDINAL_NOT_FOUND = 0xC0000138,
1564
1565 /// {Entry Point Not Found} The procedure entry point %hs could not be located in the dynamic link library %hs.
1566 ENTRYPOINT_NOT_FOUND = 0xC0000139,
1567
1568 /// {Application Exit by CTRL+C} The application terminated as a result of a CTRL+C.
1569 CONTROL_C_EXIT = 0xC000013A,
1570
1571 /// {Virtual Circuit Closed} The network transport on your computer has closed a network connection.
1572 /// There might or might not be I/O requests outstanding.
1573 LOCAL_DISCONNECT = 0xC000013B,
1574
1575 /// {Virtual Circuit Closed} The network transport on a remote computer has closed a network connection.
1576 /// There might or might not be I/O requests outstanding.
1577 REMOTE_DISCONNECT = 0xC000013C,
1578
1579 /// {Insufficient Resources on Remote Computer} The remote computer has insufficient resources to complete the network request.
1580 /// For example, the remote computer might not have enough available memory to carry out the request at this time.
1581 REMOTE_RESOURCES = 0xC000013D,
1582
1583 /// {Virtual Circuit Closed} An existing connection (virtual circuit) has been broken at the remote computer.
1584 /// There is probably something wrong with the network software protocol or the network hardware on the remote computer.
1585 LINK_FAILED = 0xC000013E,
1586
1587 /// {Virtual Circuit Closed} The network transport on your computer has closed a network connection because it had to wait too long for a response from the remote computer.
1588 LINK_TIMEOUT = 0xC000013F,
1589
1590 /// The connection handle that was given to the transport was invalid.
1591 INVALID_CONNECTION = 0xC0000140,
1592
1593 /// The address handle that was given to the transport was invalid.
1594 INVALID_ADDRESS = 0xC0000141,
1595
1596 /// {DLL Initialization Failed} Initialization of the dynamic link library %hs failed. The process is terminating abnormally.
1597 DLL_INIT_FAILED = 0xC0000142,
1598
1599 /// {Missing System File} The required system file %hs is bad or missing.
1600 MISSING_SYSTEMFILE = 0xC0000143,
1601
1602 /// {Application Error} The exception %s (0x%08lx) occurred in the application at location 0x%08lx.
1603 UNHANDLED_EXCEPTION = 0xC0000144,
1604
1605 /// {Application Error} The application failed to initialize properly (0x%lx). Click OK to terminate the application.
1606 APP_INIT_FAILURE = 0xC0000145,
1607
1608 /// {Unable to Create Paging File} The creation of the paging file %hs failed (%lx). The requested size was %ld.
1609 PAGEFILE_CREATE_FAILED = 0xC0000146,
1610
1611 /// {No Paging File Specified} No paging file was specified in the system configuration.
1612 NO_PAGEFILE = 0xC0000147,
1613
1614 /// {Incorrect System Call Level} An invalid level was passed into the specified system call.
1615 INVALID_LEVEL = 0xC0000148,
1616
1617 /// {Incorrect Password to LAN Manager Server} You specified an incorrect password to a LAN Manager 2.x or MS-NET server.
1618 WRONG_PASSWORD_CORE = 0xC0000149,
1619
1620 /// {EXCEPTION} A real-mode application issued a floating-point instruction and floating-point hardware is not present.
1621 ILLEGAL_FLOAT_CONTEXT = 0xC000014A,
1622
1623 /// The pipe operation has failed because the other end of the pipe has been closed.
1624 PIPE_BROKEN = 0xC000014B,
1625
1626 /// {The Registry Is Corrupt} The structure of one of the files that contains registry data is corrupt; the image of the file in memory is corrupt; or the file could not be recovered because the alternate copy or log was absent or corrupt.
1627 REGISTRY_CORRUPT = 0xC000014C,
1628
1629 /// An I/O operation initiated by the Registry failed and cannot be recovered.
1630 /// The registry could not read in, write out, or flush one of the files that contain the system's image of the registry.
1631 REGISTRY_IO_FAILED = 0xC000014D,
1632
1633 /// An event pair synchronization operation was performed using the thread-specific client/server event pair object, but no event pair object was associated with the thread.
1634 NO_EVENT_PAIR = 0xC000014E,
1635
1636 /// The volume does not contain a recognized file system.
1637 /// Be sure that all required file system drivers are loaded and that the volume is not corrupt.
1638 UNRECOGNIZED_VOLUME = 0xC000014F,
1639
1640 /// No serial device was successfully initialized. The serial driver will unload.
1641 SERIAL_NO_DEVICE_INITED = 0xC0000150,
1642
1643 /// The specified local group does not exist.
1644 NO_SUCH_ALIAS = 0xC0000151,
1645
1646 /// The specified account name is not a member of the group.
1647 MEMBER_NOT_IN_ALIAS = 0xC0000152,
1648
1649 /// The specified account name is already a member of the group.
1650 MEMBER_IN_ALIAS = 0xC0000153,
1651
1652 /// The specified local group already exists.
1653 ALIAS_EXISTS = 0xC0000154,
1654
1655 /// A requested type of logon (for example, interactive, network, and service) is not granted by the local security policy of the target system.
1656 /// Ask the system administrator to grant the necessary form of logon.
1657 LOGON_NOT_GRANTED = 0xC0000155,
1658
1659 /// The maximum number of secrets that can be stored in a single system was exceeded.
1660 /// The length and number of secrets is limited to satisfy U.S. State Department export restrictions.
1661 TOO_MANY_SECRETS = 0xC0000156,
1662
1663 /// The length of a secret exceeds the maximum allowable length.
1664 /// The length and number of secrets is limited to satisfy U.S. State Department export restrictions.
1665 SECRET_TOO_LONG = 0xC0000157,
1666
1667 /// The local security authority (LSA) database contains an internal inconsistency.
1668 INTERNAL_DB_ERROR = 0xC0000158,
1669
1670 /// The requested operation cannot be performed in full-screen mode.
1671 FULLSCREEN_MODE = 0xC0000159,
1672
1673 /// During a logon attempt, the user's security context accumulated too many security IDs. This is a very unusual situation.
1674 /// Remove the user from some global or local groups to reduce the number of security IDs to incorporate into the security context.
1675 TOO_MANY_CONTEXT_IDS = 0xC000015A,
1676
1677 /// A user has requested a type of logon (for example, interactive or network) that has not been granted.
1678 /// An administrator has control over who can logon interactively and through the network.
1679 LOGON_TYPE_NOT_GRANTED = 0xC000015B,
1680
1681 /// The system has attempted to load or restore a file into the registry, and the specified file is not in the format of a registry file.
1682 NOT_REGISTRY_FILE = 0xC000015C,
1683
1684 /// An attempt was made to change a user password in the security account manager without providing the necessary Windows cross-encrypted password.
1685 NT_CROSS_ENCRYPTION_REQUIRED = 0xC000015D,
1686
1687 /// A domain server has an incorrect configuration.
1688 DOMAIN_CTRLR_CONFIG_ERROR = 0xC000015E,
1689
1690 /// An attempt was made to explicitly access the secondary copy of information via a device control to the fault tolerance driver and the secondary copy is not present in the system.
1691 FT_MISSING_MEMBER = 0xC000015F,
1692
1693 /// A configuration registry node that represents a driver service entry was ill-formed and did not contain the required value entries.
1694 ILL_FORMED_SERVICE_ENTRY = 0xC0000160,
1695
1696 /// An illegal character was encountered.
1697 /// For a multibyte character set, this includes a lead byte without a succeeding trail byte.
1698 /// For the Unicode character set this includes the characters 0xFFFF and 0xFFFE.
1699 ILLEGAL_CHARACTER = 0xC0000161,
1700
1701 /// No mapping for the Unicode character exists in the target multibyte code page.
1702 UNMAPPABLE_CHARACTER = 0xC0000162,
1703
1704 /// The Unicode character is not defined in the Unicode character set that is installed on the system.
1705 UNDEFINED_CHARACTER = 0xC0000163,
1706
1707 /// The paging file cannot be created on a floppy disk.
1708 FLOPPY_VOLUME = 0xC0000164,
1709
1710 /// {Floppy Disk Error} While accessing a floppy disk, an ID address mark was not found.
1711 FLOPPY_ID_MARK_NOT_FOUND = 0xC0000165,
1712
1713 /// {Floppy Disk Error} While accessing a floppy disk, the track address from the sector ID field was found to be different from the track address that is maintained by the controller.
1714 FLOPPY_WRONG_CYLINDER = 0xC0000166,
1715
1716 /// {Floppy Disk Error} The floppy disk controller reported an error that is not recognized by the floppy disk driver.
1717 FLOPPY_UNKNOWN_ERROR = 0xC0000167,
1718
1719 /// {Floppy Disk Error} While accessing a floppy-disk, the controller returned inconsistent results via its registers.
1720 FLOPPY_BAD_REGISTERS = 0xC0000168,
1721
1722 /// {Hard Disk Error} While accessing the hard disk, a recalibrate operation failed, even after retries.
1723 DISK_RECALIBRATE_FAILED = 0xC0000169,
1724
1725 /// {Hard Disk Error} While accessing the hard disk, a disk operation failed even after retries.
1726 DISK_OPERATION_FAILED = 0xC000016A,
1727
1728 /// {Hard Disk Error} While accessing the hard disk, a disk controller reset was needed, but even that failed.
1729 DISK_RESET_FAILED = 0xC000016B,
1730
1731 /// An attempt was made to open a device that was sharing an interrupt request (IRQ) with other devices.
1732 /// At least one other device that uses that IRQ was already opened.
1733 /// Two concurrent opens of devices that share an IRQ and only work via interrupts is not supported for the particular bus type that the devices use.
1734 SHARED_IRQ_BUSY = 0xC000016C,
1735
1736 /// {FT Orphaning} A disk that is part of a fault-tolerant volume can no longer be accessed.
1737 FT_ORPHANING = 0xC000016D,
1738
1739 /// The basic input/output system (BIOS) failed to connect a system interrupt to the device or bus for which the device is connected.
1740 BIOS_FAILED_TO_CONNECT_INTERRUPT = 0xC000016E,
1741
1742 /// The tape could not be partitioned.
1743 PARTITION_FAILURE = 0xC0000172,
1744
1745 /// When accessing a new tape of a multi-volume partition, the current blocksize is incorrect.
1746 INVALID_BLOCK_LENGTH = 0xC0000173,
1747
1748 /// The tape partition information could not be found when loading a tape.
1749 DEVICE_NOT_PARTITIONED = 0xC0000174,
1750
1751 /// An attempt to lock the eject media mechanism failed.
1752 UNABLE_TO_LOCK_MEDIA = 0xC0000175,
1753
1754 /// An attempt to unload media failed.
1755 UNABLE_TO_UNLOAD_MEDIA = 0xC0000176,
1756
1757 /// The physical end of tape was detected.
1758 EOM_OVERFLOW = 0xC0000177,
1759
1760 /// {No Media} There is no media in the drive. Insert media into drive %hs.
1761 NO_MEDIA = 0xC0000178,
1762
1763 /// A member could not be added to or removed from the local group because the member does not exist.
1764 NO_SUCH_MEMBER = 0xC000017A,
1765
1766 /// A new member could not be added to a local group because the member has the wrong account type.
1767 INVALID_MEMBER = 0xC000017B,
1768
1769 /// An illegal operation was attempted on a registry key that has been marked for deletion.
1770 KEY_DELETED = 0xC000017C,
1771
1772 /// The system could not allocate the required space in a registry log.
1773 NO_LOG_SPACE = 0xC000017D,
1774
1775 /// Too many SIDs have been specified.
1776 TOO_MANY_SIDS = 0xC000017E,
1777
1778 /// An attempt was made to change a user password in the security account manager without providing the necessary LM cross-encrypted password.
1779 LM_CROSS_ENCRYPTION_REQUIRED = 0xC000017F,
1780
1781 /// An attempt was made to create a symbolic link in a registry key that already has subkeys or values.
1782 KEY_HAS_CHILDREN = 0xC0000180,
1783
1784 /// An attempt was made to create a stable subkey under a volatile parent key.
1785 CHILD_MUST_BE_VOLATILE = 0xC0000181,
1786
1787 /// The I/O device is configured incorrectly or the configuration parameters to the driver are incorrect.
1788 DEVICE_CONFIGURATION_ERROR = 0xC0000182,
1789
1790 /// An error was detected between two drivers or within an I/O driver.
1791 DRIVER_INTERNAL_ERROR = 0xC0000183,
1792
1793 /// The device is not in a valid state to perform this request.
1794 INVALID_DEVICE_STATE = 0xC0000184,
1795
1796 /// The I/O device reported an I/O error.
1797 IO_DEVICE_ERROR = 0xC0000185,
1798
1799 /// A protocol error was detected between the driver and the device.
1800 DEVICE_PROTOCOL_ERROR = 0xC0000186,
1801
1802 /// This operation is only allowed for the primary domain controller of the domain.
1803 BACKUP_CONTROLLER = 0xC0000187,
1804
1805 /// The log file space is insufficient to support this operation.
1806 LOG_FILE_FULL = 0xC0000188,
1807
1808 /// A write operation was attempted to a volume after it was dismounted.
1809 TOO_LATE = 0xC0000189,
1810
1811 /// The workstation does not have a trust secret for the primary domain in the local LSA database.
1812 NO_TRUST_LSA_SECRET = 0xC000018A,
1813
1814 /// On applicable Windows Server releases, the SAM database does not have a computer account for this workstation trust relationship.
1815 NO_TRUST_SAM_ACCOUNT = 0xC000018B,
1816
1817 /// The logon request failed because the trust relationship between the primary domain and the trusted domain failed.
1818 TRUSTED_DOMAIN_FAILURE = 0xC000018C,
1819
1820 /// The logon request failed because the trust relationship between this workstation and the primary domain failed.
1821 TRUSTED_RELATIONSHIP_FAILURE = 0xC000018D,
1822
1823 /// The Eventlog log file is corrupt.
1824 EVENTLOG_FILE_CORRUPT = 0xC000018E,
1825
1826 /// No Eventlog log file could be opened. The Eventlog service did not start.
1827 EVENTLOG_CANT_START = 0xC000018F,
1828
1829 /// The network logon failed. This might be because the validation authority cannot be reached.
1830 TRUST_FAILURE = 0xC0000190,
1831
1832 /// An attempt was made to acquire a mutant such that its maximum count would have been exceeded.
1833 MUTANT_LIMIT_EXCEEDED = 0xC0000191,
1834
1835 /// An attempt was made to logon, but the NetLogon service was not started.
1836 NETLOGON_NOT_STARTED = 0xC0000192,
1837
1838 /// The user account has expired.
1839 ACCOUNT_EXPIRED = 0xC0000193,
1840
1841 /// {EXCEPTION} Possible deadlock condition.
1842 POSSIBLE_DEADLOCK = 0xC0000194,
1843
1844 /// Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed.
1845 /// Disconnect all previous connections to the server or shared resource and try again.
1846 NETWORK_CREDENTIAL_CONFLICT = 0xC0000195,
1847
1848 /// An attempt was made to establish a session to a network server, but there are already too many sessions established to that server.
1849 REMOTE_SESSION_LIMIT = 0xC0000196,
1850
1851 /// The log file has changed between reads.
1852 EVENTLOG_FILE_CHANGED = 0xC0000197,
1853
1854 /// The account used is an interdomain trust account.
1855 /// Use your global user account or local user account to access this server.
1856 NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = 0xC0000198,
1857
1858 /// The account used is a computer account.
1859 /// Use your global user account or local user account to access this server.
1860 NOLOGON_WORKSTATION_TRUST_ACCOUNT = 0xC0000199,
1861
1862 /// The account used is a server trust account.
1863 /// Use your global user account or local user account to access this server.
1864 NOLOGON_SERVER_TRUST_ACCOUNT = 0xC000019A,
1865
1866 /// The name or SID of the specified domain is inconsistent with the trust information for that domain.
1867 DOMAIN_TRUST_INCONSISTENT = 0xC000019B,
1868
1869 /// A volume has been accessed for which a file system driver is required that has not yet been loaded.
1870 FS_DRIVER_REQUIRED = 0xC000019C,
1871
1872 /// Indicates that the specified image is already loaded as a DLL.
1873 IMAGE_ALREADY_LOADED_AS_DLL = 0xC000019D,
1874
1875 /// Short name settings cannot be changed on this volume due to the global registry setting.
1876 INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING = 0xC000019E,
1877
1878 /// Short names are not enabled on this volume.
1879 SHORT_NAMES_NOT_ENABLED_ON_VOLUME = 0xC000019F,
1880
1881 /// The security stream for the given volume is in an inconsistent state. Please run CHKDSK on the volume.
1882 SECURITY_STREAM_IS_INCONSISTENT = 0xC00001A0,
1883
1884 /// A requested file lock operation cannot be processed due to an invalid byte range.
1885 INVALID_LOCK_RANGE = 0xC00001A1,
1886
1887 /// The specified access control entry (ACE) contains an invalid condition.
1888 INVALID_ACE_CONDITION = 0xC00001A2,
1889
1890 /// The subsystem needed to support the image type is not present.
1891 IMAGE_SUBSYSTEM_NOT_PRESENT = 0xC00001A3,
1892
1893 /// The specified file already has a notification GUID associated with it.
1894 NOTIFICATION_GUID_ALREADY_DEFINED = 0xC00001A4,
1895
1896 /// A remote open failed because the network open restrictions were not satisfied.
1897 NETWORK_OPEN_RESTRICTION = 0xC0000201,
1898
1899 /// There is no user session key for the specified logon session.
1900 NO_USER_SESSION_KEY = 0xC0000202,
1901
1902 /// The remote user session has been deleted.
1903 USER_SESSION_DELETED = 0xC0000203,
1904
1905 /// Indicates the specified resource language ID cannot be found in the image file.
1906 RESOURCE_LANG_NOT_FOUND = 0xC0000204,
1907
1908 /// Insufficient server resources exist to complete the request.
1909 INSUFF_SERVER_RESOURCES = 0xC0000205,
1910
1911 /// The size of the buffer is invalid for the specified operation.
1912 INVALID_BUFFER_SIZE = 0xC0000206,
1913
1914 /// The transport rejected the specified network address as invalid.
1915 INVALID_ADDRESS_COMPONENT = 0xC0000207,
1916
1917 /// The transport rejected the specified network address due to invalid use of a wildcard.
1918 INVALID_ADDRESS_WILDCARD = 0xC0000208,
1919
1920 /// The transport address could not be opened because all the available addresses are in use.
1921 TOO_MANY_ADDRESSES = 0xC0000209,
1922
1923 /// The transport address could not be opened because it already exists.
1924 ADDRESS_ALREADY_EXISTS = 0xC000020A,
1925
1926 /// The transport address is now closed.
1927 ADDRESS_CLOSED = 0xC000020B,
1928
1929 /// The transport connection is now disconnected.
1930 CONNECTION_DISCONNECTED = 0xC000020C,
1931
1932 /// The transport connection has been reset.
1933 CONNECTION_RESET = 0xC000020D,
1934
1935 /// The transport cannot dynamically acquire any more nodes.
1936 TOO_MANY_NODES = 0xC000020E,
1937
1938 /// The transport aborted a pending transaction.
1939 TRANSACTION_ABORTED = 0xC000020F,
1940
1941 /// The transport timed out a request that is waiting for a response.
1942 TRANSACTION_TIMED_OUT = 0xC0000210,
1943
1944 /// The transport did not receive a release for a pending response.
1945 TRANSACTION_NO_RELEASE = 0xC0000211,
1946
1947 /// The transport did not find a transaction that matches the specific token.
1948 TRANSACTION_NO_MATCH = 0xC0000212,
1949
1950 /// The transport had previously responded to a transaction request.
1951 TRANSACTION_RESPONDED = 0xC0000213,
1952
1953 /// The transport does not recognize the specified transaction request ID.
1954 TRANSACTION_INVALID_ID = 0xC0000214,
1955
1956 /// The transport does not recognize the specified transaction request type.
1957 TRANSACTION_INVALID_TYPE = 0xC0000215,
1958
1959 /// The transport can only process the specified request on the server side of a session.
1960 NOT_SERVER_SESSION = 0xC0000216,
1961
1962 /// The transport can only process the specified request on the client side of a session.
1963 NOT_CLIENT_SESSION = 0xC0000217,
1964
1965 /// {Registry File Failure} The registry cannot load the hive (file): %hs or its log or alternate. It is corrupt, absent, or not writable.
1966 CANNOT_LOAD_REGISTRY_FILE = 0xC0000218,
1967
1968 /// {Unexpected Failure in DebugActiveProcess} An unexpected failure occurred while processing a DebugActiveProcess API request.
1969 /// Choosing OK will terminate the process, and choosing Cancel will ignore the error.
1970 DEBUG_ATTACH_FAILED = 0xC0000219,
1971
1972 /// {Fatal System Error} The %hs system process terminated unexpectedly with a status of 0x%08x (0x%08x 0x%08x). The system has been shut down.
1973 SYSTEM_PROCESS_TERMINATED = 0xC000021A,
1974
1975 /// {Data Not Accepted} The TDI client could not handle the data received during an indication.
1976 DATA_NOT_ACCEPTED = 0xC000021B,
1977
1978 /// {Unable to Retrieve Browser Server List} The list of servers for this workgroup is not currently available.
1979 NO_BROWSER_SERVERS_FOUND = 0xC000021C,
1980
1981 /// NTVDM encountered a hard error.
1982 VDM_HARD_ERROR = 0xC000021D,
1983
1984 /// {Cancel Timeout} The driver %hs failed to complete a canceled I/O request in the allotted time.
1985 DRIVER_CANCEL_TIMEOUT = 0xC000021E,
1986
1987 /// {Reply Message Mismatch} An attempt was made to reply to an LPC message, but the thread specified by the client ID in the message was not waiting on that message.
1988 REPLY_MESSAGE_MISMATCH = 0xC000021F,
1989
1990 /// {Mapped View Alignment Incorrect} An attempt was made to map a view of a file, but either the specified base address or the offset into the file were not aligned on the proper allocation granularity.
1991 MAPPED_ALIGNMENT = 0xC0000220,
1992
1993 /// {Bad Image Checksum} The image %hs is possibly corrupt.
1994 /// The header checksum does not match the computed checksum.
1995 IMAGE_CHECKSUM_MISMATCH = 0xC0000221,
1996
1997 /// {Delayed Write Failed} Windows was unable to save all the data for the file %hs. The data has been lost.
1998 /// This error might be caused by a failure of your computer hardware or network connection. Try to save this file elsewhere.
1999 LOST_WRITEBEHIND_DATA = 0xC0000222,
2000
2001 /// The parameters passed to the server in the client/server shared memory window were invalid.
2002 /// Too much data might have been put in the shared memory window.
2003 CLIENT_SERVER_PARAMETERS_INVALID = 0xC0000223,
2004
2005 /// The user password must be changed before logging on the first time.
2006 PASSWORD_MUST_CHANGE = 0xC0000224,
2007
2008 /// The object was not found.
2009 NOT_FOUND = 0xC0000225,
2010
2011 /// The stream is not a tiny stream.
2012 NOT_TINY_STREAM = 0xC0000226,
2013
2014 /// A transaction recovery failed.
2015 RECOVERY_FAILURE = 0xC0000227,
2016
2017 /// The request must be handled by the stack overflow code.
2018 STACK_OVERFLOW_READ = 0xC0000228,
2019
2020 /// A consistency check failed.
2021 FAIL_CHECK = 0xC0000229,
2022
2023 /// The attempt to insert the ID in the index failed because the ID is already in the index.
2024 DUPLICATE_OBJECTID = 0xC000022A,
2025
2026 /// The attempt to set the object ID failed because the object already has an ID.
2027 OBJECTID_EXISTS = 0xC000022B,
2028
2029 /// Internal OFS status codes indicating how an allocation operation is handled.
2030 /// Either it is retried after the containing oNode is moved or the extent stream is converted to a large stream.
2031 CONVERT_TO_LARGE = 0xC000022C,
2032
2033 /// The request needs to be retried.
2034 RETRY = 0xC000022D,
2035
2036 /// The attempt to find the object found an object on the volume that matches by ID; however, it is out of the scope of the handle that is used for the operation.
2037 FOUND_OUT_OF_SCOPE = 0xC000022E,
2038
2039 /// The bucket array must be grown. Retry the transaction after doing so.
2040 ALLOCATE_BUCKET = 0xC000022F,
2041
2042 /// The specified property set does not exist on the object.
2043 PROPSET_NOT_FOUND = 0xC0000230,
2044
2045 /// The user/kernel marshaling buffer has overflowed.
2046 MARSHALL_OVERFLOW = 0xC0000231,
2047
2048 /// The supplied variant structure contains invalid data.
2049 INVALID_VARIANT = 0xC0000232,
2050
2051 /// A domain controller for this domain was not found.
2052 DOMAIN_CONTROLLER_NOT_FOUND = 0xC0000233,
2053
2054 /// The user account has been automatically locked because too many invalid logon attempts or password change attempts have been requested.
2055 ACCOUNT_LOCKED_OUT = 0xC0000234,
2056
2057 /// NtClose was called on a handle that was protected from close via NtSetInformationObject.
2058 HANDLE_NOT_CLOSABLE = 0xC0000235,
2059
2060 /// The transport-connection attempt was refused by the remote system.
2061 CONNECTION_REFUSED = 0xC0000236,
2062
2063 /// The transport connection was gracefully closed.
2064 GRACEFUL_DISCONNECT = 0xC0000237,
2065
2066 /// The transport endpoint already has an address associated with it.
2067 ADDRESS_ALREADY_ASSOCIATED = 0xC0000238,
2068
2069 /// An address has not yet been associated with the transport endpoint.
2070 ADDRESS_NOT_ASSOCIATED = 0xC0000239,
2071
2072 /// An operation was attempted on a nonexistent transport connection.
2073 CONNECTION_INVALID = 0xC000023A,
2074
2075 /// An invalid operation was attempted on an active transport connection.
2076 CONNECTION_ACTIVE = 0xC000023B,
2077
2078 /// The remote network is not reachable by the transport.
2079 NETWORK_UNREACHABLE = 0xC000023C,
2080
2081 /// The remote system is not reachable by the transport.
2082 HOST_UNREACHABLE = 0xC000023D,
2083
2084 /// The remote system does not support the transport protocol.
2085 PROTOCOL_UNREACHABLE = 0xC000023E,
2086
2087 /// No service is operating at the destination port of the transport on the remote system.
2088 PORT_UNREACHABLE = 0xC000023F,
2089
2090 /// The request was aborted.
2091 REQUEST_ABORTED = 0xC0000240,
2092
2093 /// The transport connection was aborted by the local system.
2094 CONNECTION_ABORTED = 0xC0000241,
2095
2096 /// The specified buffer contains ill-formed data.
2097 BAD_COMPRESSION_BUFFER = 0xC0000242,
2098
2099 /// The requested operation cannot be performed on a file with a user mapped section open.
2100 USER_MAPPED_FILE = 0xC0000243,
2101
2102 /// {Audit Failed} An attempt to generate a security audit failed.
2103 AUDIT_FAILED = 0xC0000244,
2104
2105 /// The timer resolution was not previously set by the current process.
2106 TIMER_RESOLUTION_NOT_SET = 0xC0000245,
2107
2108 /// A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached.
2109 CONNECTION_COUNT_LIMIT = 0xC0000246,
2110
2111 /// Attempting to log on during an unauthorized time of day for this account.
2112 LOGIN_TIME_RESTRICTION = 0xC0000247,
2113
2114 /// The account is not authorized to log on from this station.
2115 LOGIN_WKSTA_RESTRICTION = 0xC0000248,
2116
2117 /// {UP/MP Image Mismatch} The image %hs has been modified for use on a uniprocessor system, but you are running it on a multiprocessor machine. Reinstall the image file.
2118 IMAGE_MP_UP_MISMATCH = 0xC0000249,
2119
2120 /// There is insufficient account information to log you on.
2121 INSUFFICIENT_LOGON_INFO = 0xC0000250,
2122
2123 /// {Invalid DLL Entrypoint} The dynamic link library %hs is not written correctly.
2124 /// The stack pointer has been left in an inconsistent state.
2125 /// The entry point should be declared as WINAPI or STDCALL.
2126 /// Select YES to fail the DLL load. Select NO to continue execution.
2127 /// Selecting NO might cause the application to operate incorrectly.
2128 BAD_DLL_ENTRYPOINT = 0xC0000251,
2129
2130 /// {Invalid Service Callback Entrypoint} The %hs service is not written correctly.
2131 /// The stack pointer has been left in an inconsistent state.
2132 /// The callback entry point should be declared as WINAPI or STDCALL.
2133 /// Selecting OK will cause the service to continue operation.
2134 /// However, the service process might operate incorrectly.
2135 BAD_SERVICE_ENTRYPOINT = 0xC0000252,
2136
2137 /// The server received the messages but did not send a reply.
2138 LPC_REPLY_LOST = 0xC0000253,
2139
2140 /// There is an IP address conflict with another system on the network.
2141 IP_ADDRESS_CONFLICT1 = 0xC0000254,
2142
2143 /// There is an IP address conflict with another system on the network.
2144 IP_ADDRESS_CONFLICT2 = 0xC0000255,
2145
2146 /// {Low On Registry Space} The system has reached the maximum size that is allowed for the system part of the registry. Additional storage requests will be ignored.
2147 REGISTRY_QUOTA_LIMIT = 0xC0000256,
2148
2149 /// The contacted server does not support the indicated part of the DFS namespace.
2150 PATH_NOT_COVERED = 0xC0000257,
2151
2152 /// A callback return system service cannot be executed when no callback is active.
2153 NO_CALLBACK_ACTIVE = 0xC0000258,
2154
2155 /// The service being accessed is licensed for a particular number of connections.
2156 /// No more connections can be made to the service at this time because the service has already accepted the maximum number of connections.
2157 LICENSE_QUOTA_EXCEEDED = 0xC0000259,
2158
2159 /// The password provided is too short to meet the policy of your user account. Choose a longer password.
2160 PWD_TOO_SHORT = 0xC000025A,
2161
2162 /// The policy of your user account does not allow you to change passwords too frequently.
2163 /// This is done to prevent users from changing back to a familiar, but potentially discovered, password.
2164 /// If you feel your password has been compromised, contact your administrator immediately to have a new one assigned.
2165 PWD_TOO_RECENT = 0xC000025B,
2166
2167 /// You have attempted to change your password to one that you have used in the past.
2168 /// The policy of your user account does not allow this.
2169 /// Select a password that you have not previously used.
2170 PWD_HISTORY_CONFLICT = 0xC000025C,
2171
2172 /// You have attempted to load a legacy device driver while its device instance had been disabled.
2173 PLUGPLAY_NO_DEVICE = 0xC000025E,
2174
2175 /// The specified compression format is unsupported.
2176 UNSUPPORTED_COMPRESSION = 0xC000025F,
2177
2178 /// The specified hardware profile configuration is invalid.
2179 INVALID_HW_PROFILE = 0xC0000260,
2180
2181 /// The specified Plug and Play registry device path is invalid.
2182 INVALID_PLUGPLAY_DEVICE_PATH = 0xC0000261,
2183
2184 /// {Driver Entry Point Not Found} The %hs device driver could not locate the ordinal %ld in driver %hs.
2185 DRIVER_ORDINAL_NOT_FOUND = 0xC0000262,
2186
2187 /// {Driver Entry Point Not Found} The %hs device driver could not locate the entry point %hs in driver %hs.
2188 DRIVER_ENTRYPOINT_NOT_FOUND = 0xC0000263,
2189
2190 /// {Application Error} The application attempted to release a resource it did not own. Click OK to terminate the application.
2191 RESOURCE_NOT_OWNED = 0xC0000264,
2192
2193 /// An attempt was made to create more links on a file than the file system supports.
2194 TOO_MANY_LINKS = 0xC0000265,
2195
2196 /// The specified quota list is internally inconsistent with its descriptor.
2197 QUOTA_LIST_INCONSISTENT = 0xC0000266,
2198
2199 /// The specified file has been relocated to offline storage.
2200 FILE_IS_OFFLINE = 0xC0000267,
2201
2202 /// {Windows Evaluation Notification} The evaluation period for this installation of Windows has expired. This system will shutdown in 1 hour.
2203 /// To restore access to this installation of Windows, upgrade this installation by using a licensed distribution of this product.
2204 EVALUATION_EXPIRATION = 0xC0000268,
2205
2206 /// {Illegal System DLL Relocation} The system DLL %hs was relocated in memory. The application will not run properly.
2207 /// The relocation occurred because the DLL %hs occupied an address range that is reserved for Windows system DLLs.
2208 /// The vendor supplying the DLL should be contacted for a new DLL.
2209 ILLEGAL_DLL_RELOCATION = 0xC0000269,
2210
2211 /// {License Violation} The system has detected tampering with your registered product type.
2212 /// This is a violation of your software license. Tampering with the product type is not permitted.
2213 LICENSE_VIOLATION = 0xC000026A,
2214
2215 /// {DLL Initialization Failed} The application failed to initialize because the window station is shutting down.
2216 DLL_INIT_FAILED_LOGOFF = 0xC000026B,
2217
2218 /// {Unable to Load Device Driver} %hs device driver could not be loaded. Error Status was 0x%x.
2219 DRIVER_UNABLE_TO_LOAD = 0xC000026C,
2220
2221 /// DFS is unavailable on the contacted server.
2222 DFS_UNAVAILABLE = 0xC000026D,
2223
2224 /// An operation was attempted to a volume after it was dismounted.
2225 VOLUME_DISMOUNTED = 0xC000026E,
2226
2227 /// An internal error occurred in the Win32 x86 emulation subsystem.
2228 WX86_INTERNAL_ERROR = 0xC000026F,
2229
2230 /// Win32 x86 emulation subsystem floating-point stack check.
2231 WX86_FLOAT_STACK_CHECK = 0xC0000270,
2232
2233 /// The validation process needs to continue on to the next step.
2234 VALIDATE_CONTINUE = 0xC0000271,
2235
2236 /// There was no match for the specified key in the index.
2237 NO_MATCH = 0xC0000272,
2238
2239 /// There are no more matches for the current index enumeration.
2240 NO_MORE_MATCHES = 0xC0000273,
2241
2242 /// The NTFS file or directory is not a reparse point.
2243 NOT_A_REPARSE_POINT = 0xC0000275,
2244
2245 /// The Windows I/O reparse tag passed for the NTFS reparse point is invalid.
2246 IO_REPARSE_TAG_INVALID = 0xC0000276,
2247
2248 /// The Windows I/O reparse tag does not match the one that is in the NTFS reparse point.
2249 IO_REPARSE_TAG_MISMATCH = 0xC0000277,
2250
2251 /// The user data passed for the NTFS reparse point is invalid.
2252 IO_REPARSE_DATA_INVALID = 0xC0000278,
2253
2254 /// The layered file system driver for this I/O tag did not handle it when needed.
2255 IO_REPARSE_TAG_NOT_HANDLED = 0xC0000279,
2256
2257 /// The NTFS symbolic link could not be resolved even though the initial file name is valid.
2258 REPARSE_POINT_NOT_RESOLVED = 0xC0000280,
2259
2260 /// The NTFS directory is a reparse point.
2261 DIRECTORY_IS_A_REPARSE_POINT = 0xC0000281,
2262
2263 /// The range could not be added to the range list because of a conflict.
2264 RANGE_LIST_CONFLICT = 0xC0000282,
2265
2266 /// The specified medium changer source element contains no media.
2267 SOURCE_ELEMENT_EMPTY = 0xC0000283,
2268
2269 /// The specified medium changer destination element already contains media.
2270 DESTINATION_ELEMENT_FULL = 0xC0000284,
2271
2272 /// The specified medium changer element does not exist.
2273 ILLEGAL_ELEMENT_ADDRESS = 0xC0000285,
2274
2275 /// The specified element is contained in a magazine that is no longer present.
2276 MAGAZINE_NOT_PRESENT = 0xC0000286,
2277
2278 /// The device requires re-initialization due to hardware errors.
2279 REINITIALIZATION_NEEDED = 0xC0000287,
2280
2281 /// The file encryption attempt failed.
2282 ENCRYPTION_FAILED = 0xC000028A,
2283
2284 /// The file decryption attempt failed.
2285 DECRYPTION_FAILED = 0xC000028B,
2286
2287 /// The specified range could not be found in the range list.
2288 RANGE_NOT_FOUND = 0xC000028C,
2289
2290 /// There is no encryption recovery policy configured for this system.
2291 NO_RECOVERY_POLICY = 0xC000028D,
2292
2293 /// The required encryption driver is not loaded for this system.
2294 NO_EFS = 0xC000028E,
2295
2296 /// The file was encrypted with a different encryption driver than is currently loaded.
2297 WRONG_EFS = 0xC000028F,
2298
2299 /// There are no EFS keys defined for the user.
2300 NO_USER_KEYS = 0xC0000290,
2301
2302 /// The specified file is not encrypted.
2303 FILE_NOT_ENCRYPTED = 0xC0000291,
2304
2305 /// The specified file is not in the defined EFS export format.
2306 NOT_EXPORT_FORMAT = 0xC0000292,
2307
2308 /// The specified file is encrypted and the user does not have the ability to decrypt it.
2309 FILE_ENCRYPTED = 0xC0000293,
2310
2311 /// The GUID passed was not recognized as valid by a WMI data provider.
2312 WMI_GUID_NOT_FOUND = 0xC0000295,
2313
2314 /// The instance name passed was not recognized as valid by a WMI data provider.
2315 WMI_INSTANCE_NOT_FOUND = 0xC0000296,
2316
2317 /// The data item ID passed was not recognized as valid by a WMI data provider.
2318 WMI_ITEMID_NOT_FOUND = 0xC0000297,
2319
2320 /// The WMI request could not be completed and should be retried.
2321 WMI_TRY_AGAIN = 0xC0000298,
2322
2323 /// The policy object is shared and can only be modified at the root.
2324 SHARED_POLICY = 0xC0000299,
2325
2326 /// The policy object does not exist when it should.
2327 POLICY_OBJECT_NOT_FOUND = 0xC000029A,
2328
2329 /// The requested policy information only lives in the Ds.
2330 POLICY_ONLY_IN_DS = 0xC000029B,
2331
2332 /// The volume must be upgraded to enable this feature.
2333 VOLUME_NOT_UPGRADED = 0xC000029C,
2334
2335 /// The remote storage service is not operational at this time.
2336 REMOTE_STORAGE_NOT_ACTIVE = 0xC000029D,
2337
2338 /// The remote storage service encountered a media error.
2339 REMOTE_STORAGE_MEDIA_ERROR = 0xC000029E,
2340
2341 /// The tracking (workstation) service is not running.
2342 NO_TRACKING_SERVICE = 0xC000029F,
2343
2344 /// The server process is running under a SID that is different from the SID that is required by client.
2345 SERVER_SID_MISMATCH = 0xC00002A0,
2346
2347 /// The specified directory service attribute or value does not exist.
2348 DS_NO_ATTRIBUTE_OR_VALUE = 0xC00002A1,
2349
2350 /// The attribute syntax specified to the directory service is invalid.
2351 DS_INVALID_ATTRIBUTE_SYNTAX = 0xC00002A2,
2352
2353 /// The attribute type specified to the directory service is not defined.
2354 DS_ATTRIBUTE_TYPE_UNDEFINED = 0xC00002A3,
2355
2356 /// The specified directory service attribute or value already exists.
2357 DS_ATTRIBUTE_OR_VALUE_EXISTS = 0xC00002A4,
2358
2359 /// The directory service is busy.
2360 DS_BUSY = 0xC00002A5,
2361
2362 /// The directory service is unavailable.
2363 DS_UNAVAILABLE = 0xC00002A6,
2364
2365 /// The directory service was unable to allocate a relative identifier.
2366 DS_NO_RIDS_ALLOCATED = 0xC00002A7,
2367
2368 /// The directory service has exhausted the pool of relative identifiers.
2369 DS_NO_MORE_RIDS = 0xC00002A8,
2370
2371 /// The requested operation could not be performed because the directory service is not the master for that type of operation.
2372 DS_INCORRECT_ROLE_OWNER = 0xC00002A9,
2373
2374 /// The directory service was unable to initialize the subsystem that allocates relative identifiers.
2375 DS_RIDMGR_INIT_ERROR = 0xC00002AA,
2376
2377 /// The requested operation did not satisfy one or more constraints that are associated with the class of the object.
2378 DS_OBJ_CLASS_VIOLATION = 0xC00002AB,
2379
2380 /// The directory service can perform the requested operation only on a leaf object.
2381 DS_CANT_ON_NON_LEAF = 0xC00002AC,
2382
2383 /// The directory service cannot perform the requested operation on the Relatively Defined Name (RDN) attribute of an object.
2384 DS_CANT_ON_RDN = 0xC00002AD,
2385
2386 /// The directory service detected an attempt to modify the object class of an object.
2387 DS_CANT_MOD_OBJ_CLASS = 0xC00002AE,
2388
2389 /// An error occurred while performing a cross domain move operation.
2390 DS_CROSS_DOM_MOVE_FAILED = 0xC00002AF,
2391
2392 /// Unable to contact the global catalog server.
2393 DS_GC_NOT_AVAILABLE = 0xC00002B0,
2394
2395 /// The requested operation requires a directory service, and none was available.
2396 DIRECTORY_SERVICE_REQUIRED = 0xC00002B1,
2397
2398 /// The reparse attribute cannot be set because it is incompatible with an existing attribute.
2399 REPARSE_ATTRIBUTE_CONFLICT = 0xC00002B2,
2400
2401 /// A group marked "use for deny only" cannot be enabled.
2402 CANT_ENABLE_DENY_ONLY = 0xC00002B3,
2403
2404 /// {EXCEPTION} Multiple floating-point faults.
2405 FLOAT_MULTIPLE_FAULTS = 0xC00002B4,
2406
2407 /// {EXCEPTION} Multiple floating-point traps.
2408 FLOAT_MULTIPLE_TRAPS = 0xC00002B5,
2409
2410 /// The device has been removed.
2411 DEVICE_REMOVED = 0xC00002B6,
2412
2413 /// The volume change journal is being deleted.
2414 JOURNAL_DELETE_IN_PROGRESS = 0xC00002B7,
2415
2416 /// The volume change journal is not active.
2417 JOURNAL_NOT_ACTIVE = 0xC00002B8,
2418
2419 /// The requested interface is not supported.
2420 NOINTERFACE = 0xC00002B9,
2421
2422 /// A directory service resource limit has been exceeded.
2423 DS_ADMIN_LIMIT_EXCEEDED = 0xC00002C1,
2424
2425 /// {System Standby Failed} The driver %hs does not support standby mode.
2426 /// Updating this driver allows the system to go to standby mode.
2427 DRIVER_FAILED_SLEEP = 0xC00002C2,
2428
2429 /// Mutual Authentication failed. The server password is out of date at the domain controller.
2430 MUTUAL_AUTHENTICATION_FAILED = 0xC00002C3,
2431
2432 /// The system file %1 has become corrupt and has been replaced.
2433 CORRUPT_SYSTEM_FILE = 0xC00002C4,
2434
2435 /// {EXCEPTION} Alignment Error A data type misalignment error was detected in a load or store instruction.
2436 DATATYPE_MISALIGNMENT_ERROR = 0xC00002C5,
2437
2438 /// The WMI data item or data block is read-only.
2439 WMI_READ_ONLY = 0xC00002C6,
2440
2441 /// The WMI data item or data block could not be changed.
2442 WMI_SET_FAILURE = 0xC00002C7,
2443
2444 /// {Virtual Memory Minimum Too Low} Your system is low on virtual memory.
2445 /// Windows is increasing the size of your virtual memory paging file.
2446 /// During this process, memory requests for some applications might be denied. For more information, see Help.
2447 COMMITMENT_MINIMUM = 0xC00002C8,
2448
2449 /// {EXCEPTION} Register NaT consumption faults.
2450 /// A NaT value is consumed on a non-speculative instruction.
2451 REG_NAT_CONSUMPTION = 0xC00002C9,
2452
2453 /// The transport element of the medium changer contains media, which is causing the operation to fail.
2454 TRANSPORT_FULL = 0xC00002CA,
2455
2456 /// Security Accounts Manager initialization failed because of the following error: %hs Error Status: 0x%x.
2457 /// Click OK to shut down this system and restart in Directory Services Restore Mode.
2458 /// Check the event log for more detailed information.
2459 DS_SAM_INIT_FAILURE = 0xC00002CB,
2460
2461 /// This operation is supported only when you are connected to the server.
2462 ONLY_IF_CONNECTED = 0xC00002CC,
2463
2464 /// Only an administrator can modify the membership list of an administrative group.
2465 DS_SENSITIVE_GROUP_VIOLATION = 0xC00002CD,
2466
2467 /// A device was removed so enumeration must be restarted.
2468 PNP_RESTART_ENUMERATION = 0xC00002CE,
2469
2470 /// The journal entry has been deleted from the journal.
2471 JOURNAL_ENTRY_DELETED = 0xC00002CF,
2472
2473 /// Cannot change the primary group ID of a domain controller account.
2474 DS_CANT_MOD_PRIMARYGROUPID = 0xC00002D0,
2475
2476 /// {Fatal System Error} The system image %s is not properly signed.
2477 /// The file has been replaced with the signed file. The system has been shut down.
2478 SYSTEM_IMAGE_BAD_SIGNATURE = 0xC00002D1,
2479
2480 /// The device will not start without a reboot.
2481 PNP_REBOOT_REQUIRED = 0xC00002D2,
2482
2483 /// The power state of the current device cannot support this request.
2484 POWER_STATE_INVALID = 0xC00002D3,
2485
2486 /// The specified group type is invalid.
2487 DS_INVALID_GROUP_TYPE = 0xC00002D4,
2488
2489 /// In a mixed domain, no nesting of a global group if the group is security enabled.
2490 DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN = 0xC00002D5,
2491
2492 /// In a mixed domain, cannot nest local groups with other local groups, if the group is security enabled.
2493 DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN = 0xC00002D6,
2494
2495 /// A global group cannot have a local group as a member.
2496 DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER = 0xC00002D7,
2497
2498 /// A global group cannot have a universal group as a member.
2499 DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER = 0xC00002D8,
2500
2501 /// A universal group cannot have a local group as a member.
2502 DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER = 0xC00002D9,
2503
2504 /// A global group cannot have a cross-domain member.
2505 DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER = 0xC00002DA,
2506
2507 /// A local group cannot have another cross-domain local group as a member.
2508 DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER = 0xC00002DB,
2509
2510 /// Cannot change to a security-disabled group because primary members are in this group.
2511 DS_HAVE_PRIMARY_MEMBERS = 0xC00002DC,
2512
2513 /// The WMI operation is not supported by the data block or method.
2514 WMI_NOT_SUPPORTED = 0xC00002DD,
2515
2516 /// There is not enough power to complete the requested operation.
2517 INSUFFICIENT_POWER = 0xC00002DE,
2518
2519 /// The Security Accounts Manager needs to get the boot password.
2520 SAM_NEED_BOOTKEY_PASSWORD = 0xC00002DF,
2521
2522 /// The Security Accounts Manager needs to get the boot key from the floppy disk.
2523 SAM_NEED_BOOTKEY_FLOPPY = 0xC00002E0,
2524
2525 /// The directory service cannot start.
2526 DS_CANT_START = 0xC00002E1,
2527
2528 /// The directory service could not start because of the following error: %hs Error Status: 0x%x.
2529 /// Click OK to shut down this system and restart in Directory Services Restore Mode.
2530 /// Check the event log for more detailed information.
2531 DS_INIT_FAILURE = 0xC00002E2,
2532
2533 /// The Security Accounts Manager initialization failed because of the following error: %hs Error Status: 0x%x.
2534 /// Click OK to shut down this system and restart in Safe Mode.
2535 /// Check the event log for more detailed information.
2536 SAM_INIT_FAILURE = 0xC00002E3,
2537
2538 /// The requested operation can be performed only on a global catalog server.
2539 DS_GC_REQUIRED = 0xC00002E4,
2540
2541 /// A local group can only be a member of other local groups in the same domain.
2542 DS_LOCAL_MEMBER_OF_LOCAL_ONLY = 0xC00002E5,
2543
2544 /// Foreign security principals cannot be members of universal groups.
2545 DS_NO_FPO_IN_UNIVERSAL_GROUPS = 0xC00002E6,
2546
2547 /// Your computer could not be joined to the domain.
2548 /// You have exceeded the maximum number of computer accounts you are allowed to create in this domain.
2549 /// Contact your system administrator to have this limit reset or increased.
2550 DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED = 0xC00002E7,
2551
2552 /// This operation cannot be performed on the current domain.
2553 CURRENT_DOMAIN_NOT_ALLOWED = 0xC00002E9,
2554
2555 /// The directory or file cannot be created.
2556 CANNOT_MAKE = 0xC00002EA,
2557
2558 /// The system is in the process of shutting down.
2559 SYSTEM_SHUTDOWN = 0xC00002EB,
2560
2561 /// Directory Services could not start because of the following error: %hs Error Status: 0x%x. Click OK to shut down the system.
2562 /// You can use the recovery console to diagnose the system further.
2563 DS_INIT_FAILURE_CONSOLE = 0xC00002EC,
2564
2565 /// Security Accounts Manager initialization failed because of the following error: %hs Error Status: 0x%x. Click OK to shut down the system.
2566 /// You can use the recovery console to diagnose the system further.
2567 DS_SAM_INIT_FAILURE_CONSOLE = 0xC00002ED,
2568
2569 /// A security context was deleted before the context was completed. This is considered a logon failure.
2570 UNFINISHED_CONTEXT_DELETED = 0xC00002EE,
2571
2572 /// The client is trying to negotiate a context and the server requires user-to-user but did not send a TGT reply.
2573 NO_TGT_REPLY = 0xC00002EF,
2574
2575 /// An object ID was not found in the file.
2576 OBJECTID_NOT_FOUND = 0xC00002F0,
2577
2578 /// Unable to accomplish the requested task because the local machine does not have any IP addresses.
2579 NO_IP_ADDRESSES = 0xC00002F1,
2580
2581 /// The supplied credential handle does not match the credential that is associated with the security context.
2582 WRONG_CREDENTIAL_HANDLE = 0xC00002F2,
2583
2584 /// The crypto system or checksum function is invalid because a required function is unavailable.
2585 CRYPTO_SYSTEM_INVALID = 0xC00002F3,
2586
2587 /// The number of maximum ticket referrals has been exceeded.
2588 MAX_REFERRALS_EXCEEDED = 0xC00002F4,
2589
2590 /// The local machine must be a Kerberos KDC (domain controller) and it is not.
2591 MUST_BE_KDC = 0xC00002F5,
2592
2593 /// The other end of the security negotiation requires strong crypto but it is not supported on the local machine.
2594 STRONG_CRYPTO_NOT_SUPPORTED = 0xC00002F6,
2595
2596 /// The KDC reply contained more than one principal name.
2597 TOO_MANY_PRINCIPALS = 0xC00002F7,
2598
2599 /// Expected to find PA data for a hint of what etype to use, but it was not found.
2600 NO_PA_DATA = 0xC00002F8,
2601
2602 /// The client certificate does not contain a valid UPN, or does not match the client name in the logon request. Contact your administrator.
2603 PKINIT_NAME_MISMATCH = 0xC00002F9,
2604
2605 /// Smart card logon is required and was not used.
2606 SMARTCARD_LOGON_REQUIRED = 0xC00002FA,
2607
2608 /// An invalid request was sent to the KDC.
2609 KDC_INVALID_REQUEST = 0xC00002FB,
2610
2611 /// The KDC was unable to generate a referral for the service requested.
2612 KDC_UNABLE_TO_REFER = 0xC00002FC,
2613
2614 /// The encryption type requested is not supported by the KDC.
2615 KDC_UNKNOWN_ETYPE = 0xC00002FD,
2616
2617 /// A system shutdown is in progress.
2618 SHUTDOWN_IN_PROGRESS = 0xC00002FE,
2619
2620 /// The server machine is shutting down.
2621 SERVER_SHUTDOWN_IN_PROGRESS = 0xC00002FF,
2622
2623 /// This operation is not supported on a computer running Windows Server 2003 operating system for Small Business Server.
2624 NOT_SUPPORTED_ON_SBS = 0xC0000300,
2625
2626 /// The WMI GUID is no longer available.
2627 WMI_GUID_DISCONNECTED = 0xC0000301,
2628
2629 /// Collection or events for the WMI GUID is already disabled.
2630 WMI_ALREADY_DISABLED = 0xC0000302,
2631
2632 /// Collection or events for the WMI GUID is already enabled.
2633 WMI_ALREADY_ENABLED = 0xC0000303,
2634
2635 /// The master file table on the volume is too fragmented to complete this operation.
2636 MFT_TOO_FRAGMENTED = 0xC0000304,
2637
2638 /// Copy protection failure.
2639 COPY_PROTECTION_FAILURE = 0xC0000305,
2640
2641 /// Copy protection error—DVD CSS Authentication failed.
2642 CSS_AUTHENTICATION_FAILURE = 0xC0000306,
2643
2644 /// Copy protection error—The specified sector does not contain a valid key.
2645 CSS_KEY_NOT_PRESENT = 0xC0000307,
2646
2647 /// Copy protection error—DVD session key not established.
2648 CSS_KEY_NOT_ESTABLISHED = 0xC0000308,
2649
2650 /// Copy protection error—The read failed because the sector is encrypted.
2651 CSS_SCRAMBLED_SECTOR = 0xC0000309,
2652
2653 /// Copy protection error—The region of the specified DVD does not correspond to the region setting of the drive.
2654 CSS_REGION_MISMATCH = 0xC000030A,
2655
2656 /// Copy protection error—The region setting of the drive might be permanent.
2657 CSS_RESETS_EXHAUSTED = 0xC000030B,
2658
2659 /// The Kerberos protocol encountered an error while validating the KDC certificate during smart card logon.
2660 /// There is more information in the system event log.
2661 PKINIT_FAILURE = 0xC0000320,
2662
2663 /// The Kerberos protocol encountered an error while attempting to use the smart card subsystem.
2664 SMARTCARD_SUBSYSTEM_FAILURE = 0xC0000321,
2665
2666 /// The target server does not have acceptable Kerberos credentials.
2667 NO_KERB_KEY = 0xC0000322,
2668
2669 /// The transport determined that the remote system is down.
2670 HOST_DOWN = 0xC0000350,
2671
2672 /// An unsupported pre-authentication mechanism was presented to the Kerberos package.
2673 UNSUPPORTED_PREAUTH = 0xC0000351,
2674
2675 /// The encryption algorithm that is used on the source file needs a bigger key buffer than the one that is used on the destination file.
2676 EFS_ALG_BLOB_TOO_BIG = 0xC0000352,
2677
2678 /// An attempt to remove a processes DebugPort was made, but a port was not already associated with the process.
2679 PORT_NOT_SET = 0xC0000353,
2680
2681 /// An attempt to do an operation on a debug port failed because the port is in the process of being deleted.
2682 DEBUGGER_INACTIVE = 0xC0000354,
2683
2684 /// This version of Windows is not compatible with the behavior version of the directory forest, domain, or domain controller.
2685 DS_VERSION_CHECK_FAILURE = 0xC0000355,
2686
2687 /// The specified event is currently not being audited.
2688 AUDITING_DISABLED = 0xC0000356,
2689
2690 /// The machine account was created prior to Windows NT 4.0 operating system. The account needs to be recreated.
2691 PRENT4_MACHINE_ACCOUNT = 0xC0000357,
2692
2693 /// An account group cannot have a universal group as a member.
2694 DS_AG_CANT_HAVE_UNIVERSAL_MEMBER = 0xC0000358,
2695
2696 /// The specified image file did not have the correct format; it appears to be a 32-bit Windows image.
2697 INVALID_IMAGE_WIN_32 = 0xC0000359,
2698
2699 /// The specified image file did not have the correct format; it appears to be a 64-bit Windows image.
2700 INVALID_IMAGE_WIN_64 = 0xC000035A,
2701
2702 /// The client's supplied SSPI channel bindings were incorrect.
2703 BAD_BINDINGS = 0xC000035B,
2704
2705 /// The client session has expired; so the client must re-authenticate to continue accessing the remote resources.
2706 NETWORK_SESSION_EXPIRED = 0xC000035C,
2707
2708 /// The AppHelp dialog box canceled; thus preventing the application from starting.
2709 APPHELP_BLOCK = 0xC000035D,
2710
2711 /// The SID filtering operation removed all SIDs.
2712 ALL_SIDS_FILTERED = 0xC000035E,
2713
2714 /// The driver was not loaded because the system is starting in safe mode.
2715 NOT_SAFE_MODE_DRIVER = 0xC000035F,
2716
2717 /// Access to %1 has been restricted by your Administrator by the default software restriction policy level.
2718 ACCESS_DISABLED_BY_POLICY_DEFAULT = 0xC0000361,
2719
2720 /// Access to %1 has been restricted by your Administrator by location with policy rule %2 placed on path %3.
2721 ACCESS_DISABLED_BY_POLICY_PATH = 0xC0000362,
2722
2723 /// Access to %1 has been restricted by your Administrator by software publisher policy.
2724 ACCESS_DISABLED_BY_POLICY_PUBLISHER = 0xC0000363,
2725
2726 /// Access to %1 has been restricted by your Administrator by policy rule %2.
2727 ACCESS_DISABLED_BY_POLICY_OTHER = 0xC0000364,
2728
2729 /// The driver was not loaded because it failed its initialization call.
2730 FAILED_DRIVER_ENTRY = 0xC0000365,
2731
2732 /// The device encountered an error while applying power or reading the device configuration.
2733 /// This might be caused by a failure of your hardware or by a poor connection.
2734 DEVICE_ENUMERATION_ERROR = 0xC0000366,
2735
2736 /// The create operation failed because the name contained at least one mount point that resolves to a volume to which the specified device object is not attached.
2737 MOUNT_POINT_NOT_RESOLVED = 0xC0000368,
2738
2739 /// The device object parameter is either not a valid device object or is not attached to the volume that is specified by the file name.
2740 INVALID_DEVICE_OBJECT_PARAMETER = 0xC0000369,
2741
2742 /// A machine check error has occurred.
2743 /// Check the system event log for additional information.
2744 MCA_OCCURED = 0xC000036A,
2745
2746 /// Driver %2 has been blocked from loading.
2747 DRIVER_BLOCKED_CRITICAL = 0xC000036B,
2748
2749 /// Driver %2 has been blocked from loading.
2750 DRIVER_BLOCKED = 0xC000036C,
2751
2752 /// There was error [%2] processing the driver database.
2753 DRIVER_DATABASE_ERROR = 0xC000036D,
2754
2755 /// System hive size has exceeded its limit.
2756 SYSTEM_HIVE_TOO_LARGE = 0xC000036E,
2757
2758 /// A dynamic link library (DLL) referenced a module that was neither a DLL nor the process's executable image.
2759 INVALID_IMPORT_OF_NON_DLL = 0xC000036F,
2760
2761 /// The local account store does not contain secret material for the specified account.
2762 NO_SECRETS = 0xC0000371,
2763
2764 /// Access to %1 has been restricted by your Administrator by policy rule %2.
2765 ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY = 0xC0000372,
2766
2767 /// The system was not able to allocate enough memory to perform a stack switch.
2768 FAILED_STACK_SWITCH = 0xC0000373,
2769
2770 /// A heap has been corrupted.
2771 HEAP_CORRUPTION = 0xC0000374,
2772
2773 /// An incorrect PIN was presented to the smart card.
2774 SMARTCARD_WRONG_PIN = 0xC0000380,
2775
2776 /// The smart card is blocked.
2777 SMARTCARD_CARD_BLOCKED = 0xC0000381,
2778
2779 /// No PIN was presented to the smart card.
2780 SMARTCARD_CARD_NOT_AUTHENTICATED = 0xC0000382,
2781
2782 /// No smart card is available.
2783 SMARTCARD_NO_CARD = 0xC0000383,
2784
2785 /// The requested key container does not exist on the smart card.
2786 SMARTCARD_NO_KEY_CONTAINER = 0xC0000384,
2787
2788 /// The requested certificate does not exist on the smart card.
2789 SMARTCARD_NO_CERTIFICATE = 0xC0000385,
2790
2791 /// The requested keyset does not exist.
2792 SMARTCARD_NO_KEYSET = 0xC0000386,
2793
2794 /// A communication error with the smart card has been detected.
2795 SMARTCARD_IO_ERROR = 0xC0000387,
2796
2797 /// The system detected a possible attempt to compromise security.
2798 /// Ensure that you can contact the server that authenticated you.
2799 DOWNGRADE_DETECTED = 0xC0000388,
2800
2801 /// The smart card certificate used for authentication has been revoked. Contact your system administrator.
2802 /// There might be additional information in the event log.
2803 SMARTCARD_CERT_REVOKED = 0xC0000389,
2804
2805 /// An untrusted certificate authority was detected while processing the smart card certificate that is used for authentication. Contact your system administrator.
2806 ISSUING_CA_UNTRUSTED = 0xC000038A,
2807
2808 /// The revocation status of the smart card certificate that is used for authentication could not be determined. Contact your system administrator.
2809 REVOCATION_OFFLINE_C = 0xC000038B,
2810
2811 /// The smart card certificate used for authentication was not trusted. Contact your system administrator.
2812 PKINIT_CLIENT_FAILURE = 0xC000038C,
2813
2814 /// The smart card certificate used for authentication has expired. Contact your system administrator.
2815 SMARTCARD_CERT_EXPIRED = 0xC000038D,
2816
2817 /// The driver could not be loaded because a previous version of the driver is still in memory.
2818 DRIVER_FAILED_PRIOR_UNLOAD = 0xC000038E,
2819
2820 /// The smart card provider could not perform the action because the context was acquired as silent.
2821 SMARTCARD_SILENT_CONTEXT = 0xC000038F,
2822
2823 /// The delegated trust creation quota of the current user has been exceeded.
2824 PER_USER_TRUST_QUOTA_EXCEEDED = 0xC0000401,
2825
2826 /// The total delegated trust creation quota has been exceeded.
2827 ALL_USER_TRUST_QUOTA_EXCEEDED = 0xC0000402,
2828
2829 /// The delegated trust deletion quota of the current user has been exceeded.
2830 USER_DELETE_TRUST_QUOTA_EXCEEDED = 0xC0000403,
2831
2832 /// The requested name already exists as a unique identifier.
2833 DS_NAME_NOT_UNIQUE = 0xC0000404,
2834
2835 /// The requested object has a non-unique identifier and cannot be retrieved.
2836 DS_DUPLICATE_ID_FOUND = 0xC0000405,
2837
2838 /// The group cannot be converted due to attribute restrictions on the requested group type.
2839 DS_GROUP_CONVERSION_ERROR = 0xC0000406,
2840
2841 /// {Volume Shadow Copy Service} Wait while the Volume Shadow Copy Service prepares volume %hs for hibernation.
2842 VOLSNAP_PREPARE_HIBERNATE = 0xC0000407,
2843
2844 /// Kerberos sub-protocol User2User is required.
2845 USER2USER_REQUIRED = 0xC0000408,
2846
2847 /// The system detected an overrun of a stack-based buffer in this application.
2848 /// This overrun could potentially allow a malicious user to gain control of this application.
2849 STACK_BUFFER_OVERRUN = 0xC0000409,
2850
2851 /// The Kerberos subsystem encountered an error.
2852 /// A service for user protocol request was made against a domain controller which does not support service for user.
2853 NO_S4U_PROT_SUPPORT = 0xC000040A,
2854
2855 /// An attempt was made by this server to make a Kerberos constrained delegation request for a target that is outside the server realm.
2856 /// This action is not supported and the resulting error indicates a misconfiguration on the allowed-to-delegate-to list for this server. Contact your administrator.
2857 CROSSREALM_DELEGATION_FAILURE = 0xC000040B,
2858
2859 /// The revocation status of the domain controller certificate used for smart card authentication could not be determined.
2860 /// There is additional information in the system event log. Contact your system administrator.
2861 REVOCATION_OFFLINE_KDC = 0xC000040C,
2862
2863 /// An untrusted certificate authority was detected while processing the domain controller certificate used for authentication.
2864 /// There is additional information in the system event log. Contact your system administrator.
2865 ISSUING_CA_UNTRUSTED_KDC = 0xC000040D,
2866
2867 /// The domain controller certificate used for smart card logon has expired.
2868 /// Contact your system administrator with the contents of your system event log.
2869 KDC_CERT_EXPIRED = 0xC000040E,
2870
2871 /// The domain controller certificate used for smart card logon has been revoked.
2872 /// Contact your system administrator with the contents of your system event log.
2873 KDC_CERT_REVOKED = 0xC000040F,
2874
2875 /// Data present in one of the parameters is more than the function can operate on.
2876 PARAMETER_QUOTA_EXCEEDED = 0xC0000410,
2877
2878 /// The system has failed to hibernate (The error code is %hs).
2879 /// Hibernation will be disabled until the system is restarted.
2880 HIBERNATION_FAILURE = 0xC0000411,
2881
2882 /// An attempt to delay-load a .dll or get a function address in a delay-loaded .dll failed.
2883 DELAY_LOAD_FAILED = 0xC0000412,
2884
2885 /// Logon Failure: The machine you are logging onto is protected by an authentication firewall.
2886 /// The specified account is not allowed to authenticate to the machine.
2887 AUTHENTICATION_FIREWALL_FAILED = 0xC0000413,
2888
2889 /// %hs is a 16-bit application. You do not have permissions to execute 16-bit applications.
2890 /// Check your permissions with your system administrator.
2891 VDM_DISALLOWED = 0xC0000414,
2892
2893 /// {Display Driver Stopped Responding} The %hs display driver has stopped working normally.
2894 /// Save your work and reboot the system to restore full display functionality.
2895 /// The next time you reboot the machine a dialog will be displayed giving you a chance to report this failure to Microsoft.
2896 HUNG_DISPLAY_DRIVER_THREAD = 0xC0000415,
2897
2898 /// The Desktop heap encountered an error while allocating session memory.
2899 /// There is more information in the system event log.
2900 INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE = 0xC0000416,
2901
2902 /// An invalid parameter was passed to a C runtime function.
2903 INVALID_CRUNTIME_PARAMETER = 0xC0000417,
2904
2905 /// The authentication failed because NTLM was blocked.
2906 NTLM_BLOCKED = 0xC0000418,
2907
2908 /// The source object's SID already exists in destination forest.
2909 DS_SRC_SID_EXISTS_IN_FOREST = 0xC0000419,
2910
2911 /// The domain name of the trusted domain already exists in the forest.
2912 DS_DOMAIN_NAME_EXISTS_IN_FOREST = 0xC000041A,
2913
2914 /// The flat name of the trusted domain already exists in the forest.
2915 DS_FLAT_NAME_EXISTS_IN_FOREST = 0xC000041B,
2916
2917 /// The User Principal Name (UPN) is invalid.
2918 INVALID_USER_PRINCIPAL_NAME = 0xC000041C,
2919
2920 /// There has been an assertion failure.
2921 ASSERTION_FAILURE = 0xC0000420,
2922
2923 /// Application verifier has found an error in the current process.
2924 VERIFIER_STOP = 0xC0000421,
2925
2926 /// A user mode unwind is in progress.
2927 CALLBACK_POP_STACK = 0xC0000423,
2928
2929 /// %2 has been blocked from loading due to incompatibility with this system.
2930 /// Contact your software vendor for a compatible version of the driver.
2931 INCOMPATIBLE_DRIVER_BLOCKED = 0xC0000424,
2932
2933 /// Illegal operation attempted on a registry key which has already been unloaded.
2934 HIVE_UNLOADED = 0xC0000425,
2935
2936 /// Compression is disabled for this volume.
2937 COMPRESSION_DISABLED = 0xC0000426,
2938
2939 /// The requested operation could not be completed due to a file system limitation.
2940 FILE_SYSTEM_LIMITATION = 0xC0000427,
2941
2942 /// The hash for image %hs cannot be found in the system catalogs.
2943 /// The image is likely corrupt or the victim of tampering.
2944 INVALID_IMAGE_HASH = 0xC0000428,
2945
2946 /// The implementation is not capable of performing the request.
2947 NOT_CAPABLE = 0xC0000429,
2948
2949 /// The requested operation is out of order with respect to other operations.
2950 REQUEST_OUT_OF_SEQUENCE = 0xC000042A,
2951
2952 /// An operation attempted to exceed an implementation-defined limit.
2953 IMPLEMENTATION_LIMIT = 0xC000042B,
2954
2955 /// The requested operation requires elevation.
2956 ELEVATION_REQUIRED = 0xC000042C,
2957
2958 /// The required security context does not exist.
2959 NO_SECURITY_CONTEXT = 0xC000042D,
2960
2961 /// The PKU2U protocol encountered an error while attempting to utilize the associated certificates.
2962 PKU2U_CERT_FAILURE = 0xC000042E,
2963
2964 /// The operation was attempted beyond the valid data length of the file.
2965 BEYOND_VDL = 0xC0000432,
2966
2967 /// The attempted write operation encountered a write already in progress for some portion of the range.
2968 ENCOUNTERED_WRITE_IN_PROGRESS = 0xC0000433,
2969
2970 /// The page fault mappings changed in the middle of processing a fault so the operation must be retried.
2971 PTE_CHANGED = 0xC0000434,
2972
2973 /// The attempt to purge this file from memory failed to purge some or all the data from memory.
2974 PURGE_FAILED = 0xC0000435,
2975
2976 /// The requested credential requires confirmation.
2977 CRED_REQUIRES_CONFIRMATION = 0xC0000440,
2978
2979 /// The remote server sent an invalid response for a file being opened with Client Side Encryption.
2980 CS_ENCRYPTION_INVALID_SERVER_RESPONSE = 0xC0000441,
2981
2982 /// Client Side Encryption is not supported by the remote server even though it claims to support it.
2983 CS_ENCRYPTION_UNSUPPORTED_SERVER = 0xC0000442,
2984
2985 /// File is encrypted and should be opened in Client Side Encryption mode.
2986 CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE = 0xC0000443,
2987
2988 /// A new encrypted file is being created and a $EFS needs to be provided.
2989 CS_ENCRYPTION_NEW_ENCRYPTED_FILE = 0xC0000444,
2990
2991 /// The SMB client requested a CSE FSCTL on a non-CSE file.
2992 CS_ENCRYPTION_FILE_NOT_CSE = 0xC0000445,
2993
2994 /// Indicates a particular Security ID cannot be assigned as the label of an object.
2995 INVALID_LABEL = 0xC0000446,
2996
2997 /// The process hosting the driver for this device has terminated.
2998 DRIVER_PROCESS_TERMINATED = 0xC0000450,
2999
3000 /// The requested system device cannot be identified due to multiple indistinguishable devices potentially matching the identification criteria.
3001 AMBIGUOUS_SYSTEM_DEVICE = 0xC0000451,
3002
3003 /// The requested system device cannot be found.
3004 SYSTEM_DEVICE_NOT_FOUND = 0xC0000452,
3005
3006 /// This boot application must be restarted.
3007 RESTART_BOOT_APPLICATION = 0xC0000453,
3008
3009 /// Insufficient NVRAM resources exist to complete the API. A reboot might be required.
3010 INSUFFICIENT_NVRAM_RESOURCES = 0xC0000454,
3011
3012 /// No ranges for the specified operation were able to be processed.
3013 NO_RANGES_PROCESSED = 0xC0000460,
3014
3015 /// The storage device does not support Offload Write.
3016 DEVICE_FEATURE_NOT_SUPPORTED = 0xC0000463,
3017
3018 /// Data cannot be moved because the source device cannot communicate with the destination device.
3019 DEVICE_UNREACHABLE = 0xC0000464,
3020
3021 /// The token representing the data is invalid or expired.
3022 INVALID_TOKEN = 0xC0000465,
3023
3024 /// The file server is temporarily unavailable.
3025 SERVER_UNAVAILABLE = 0xC0000466,
3026
3027 /// The specified task name is invalid.
3028 INVALID_TASK_NAME = 0xC0000500,
3029
3030 /// The specified task index is invalid.
3031 INVALID_TASK_INDEX = 0xC0000501,
3032
3033 /// The specified thread is already joining a task.
3034 THREAD_ALREADY_IN_TASK = 0xC0000502,
3035
3036 /// A callback has requested to bypass native code.
3037 CALLBACK_BYPASS = 0xC0000503,
3038
3039 /// A fail fast exception occurred.
3040 /// Exception handlers will not be invoked and the process will be terminated immediately.
3041 FAIL_FAST_EXCEPTION = 0xC0000602,
3042
3043 /// Windows cannot verify the digital signature for this file.
3044 /// The signing certificate for this file has been revoked.
3045 IMAGE_CERT_REVOKED = 0xC0000603,
3046
3047 /// The ALPC port is closed.
3048 PORT_CLOSED = 0xC0000700,
3049
3050 /// The ALPC message requested is no longer available.
3051 MESSAGE_LOST = 0xC0000701,
3052
3053 /// The ALPC message supplied is invalid.
3054 INVALID_MESSAGE = 0xC0000702,
3055
3056 /// The ALPC message has been canceled.
3057 REQUEST_CANCELED = 0xC0000703,
3058
3059 /// Invalid recursive dispatch attempt.
3060 RECURSIVE_DISPATCH = 0xC0000704,
3061
3062 /// No receive buffer has been supplied in a synchronous request.
3063 LPC_RECEIVE_BUFFER_EXPECTED = 0xC0000705,
3064
3065 /// The connection port is used in an invalid context.
3066 LPC_INVALID_CONNECTION_USAGE = 0xC0000706,
3067
3068 /// The ALPC port does not accept new request messages.
3069 LPC_REQUESTS_NOT_ALLOWED = 0xC0000707,
3070
3071 /// The resource requested is already in use.
3072 RESOURCE_IN_USE = 0xC0000708,
3073
3074 /// The hardware has reported an uncorrectable memory error.
3075 HARDWARE_MEMORY_ERROR = 0xC0000709,
3076
3077 /// Status 0x%08x was returned, waiting on handle 0x%x for wait 0x%p, in waiter 0x%p.
3078 THREADPOOL_HANDLE_EXCEPTION = 0xC000070A,
3079
3080 /// After a callback to 0x%p(0x%p), a completion call to Set event(0x%p) failed with status 0x%08x.
3081 THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED = 0xC000070B,
3082
3083 /// After a callback to 0x%p(0x%p), a completion call to ReleaseSemaphore(0x%p, %d) failed with status 0x%08x.
3084 THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED = 0xC000070C,
3085
3086 /// After a callback to 0x%p(0x%p), a completion call to ReleaseMutex(%p) failed with status 0x%08x.
3087 THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED = 0xC000070D,
3088
3089 /// After a callback to 0x%p(0x%p), a completion call to FreeLibrary(%p) failed with status 0x%08x.
3090 THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED = 0xC000070E,
3091
3092 /// The thread pool 0x%p was released while a thread was posting a callback to 0x%p(0x%p) to it.
3093 THREADPOOL_RELEASED_DURING_OPERATION = 0xC000070F,
3094
3095 /// A thread pool worker thread is impersonating a client, after a callback to 0x%p(0x%p).
3096 /// This is unexpected, indicating that the callback is missing a call to revert the impersonation.
3097 CALLBACK_RETURNED_WHILE_IMPERSONATING = 0xC0000710,
3098
3099 /// A thread pool worker thread is impersonating a client, after executing an APC.
3100 /// This is unexpected, indicating that the APC is missing a call to revert the impersonation.
3101 APC_RETURNED_WHILE_IMPERSONATING = 0xC0000711,
3102
3103 /// Either the target process, or the target thread's containing process, is a protected process.
3104 PROCESS_IS_PROTECTED = 0xC0000712,
3105
3106 /// A thread is getting dispatched with MCA EXCEPTION because of MCA.
3107 MCA_EXCEPTION = 0xC0000713,
3108
3109 /// The client certificate account mapping is not unique.
3110 CERTIFICATE_MAPPING_NOT_UNIQUE = 0xC0000714,
3111
3112 /// The symbolic link cannot be followed because its type is disabled.
3113 SYMLINK_CLASS_DISABLED = 0xC0000715,
3114
3115 /// Indicates that the specified string is not valid for IDN normalization.
3116 INVALID_IDN_NORMALIZATION = 0xC0000716,
3117
3118 /// No mapping for the Unicode character exists in the target multi-byte code page.
3119 NO_UNICODE_TRANSLATION = 0xC0000717,
3120
3121 /// The provided callback is already registered.
3122 ALREADY_REGISTERED = 0xC0000718,
3123
3124 /// The provided context did not match the target.
3125 CONTEXT_MISMATCH = 0xC0000719,
3126
3127 /// The specified port already has a completion list.
3128 PORT_ALREADY_HAS_COMPLETION_LIST = 0xC000071A,
3129
3130 /// A threadpool worker thread entered a callback at thread base priority 0x%x and exited at priority 0x%x.
3131 /// This is unexpected, indicating that the callback missed restoring the priority.
3132 CALLBACK_RETURNED_THREAD_PRIORITY = 0xC000071B,
3133
3134 /// An invalid thread, handle %p, is specified for this operation.
3135 /// Possibly, a threadpool worker thread was specified.
3136 INVALID_THREAD = 0xC000071C,
3137
3138 /// A threadpool worker thread entered a callback, which left transaction state.
3139 /// This is unexpected, indicating that the callback missed clearing the transaction.
3140 CALLBACK_RETURNED_TRANSACTION = 0xC000071D,
3141
3142 /// A threadpool worker thread entered a callback, which left the loader lock held.
3143 /// This is unexpected, indicating that the callback missed releasing the lock.
3144 CALLBACK_RETURNED_LDR_LOCK = 0xC000071E,
3145
3146 /// A threadpool worker thread entered a callback, which left with preferred languages set.
3147 /// This is unexpected, indicating that the callback missed clearing them.
3148 CALLBACK_RETURNED_LANG = 0xC000071F,
3149
3150 /// A threadpool worker thread entered a callback, which left with background priorities set.
3151 /// This is unexpected, indicating that the callback missed restoring the original priorities.
3152 CALLBACK_RETURNED_PRI_BACK = 0xC0000720,
3153
3154 /// The attempted operation required self healing to be enabled.
3155 DISK_REPAIR_DISABLED = 0xC0000800,
3156
3157 /// The directory service cannot perform the requested operation because a domain rename operation is in progress.
3158 DS_DOMAIN_RENAME_IN_PROGRESS = 0xC0000801,
3159
3160 /// An operation failed because the storage quota was exceeded.
3161 DISK_QUOTA_EXCEEDED = 0xC0000802,
3162
3163 /// An operation failed because the content was blocked.
3164 CONTENT_BLOCKED = 0xC0000804,
3165
3166 /// The operation could not be completed due to bad clusters on disk.
3167 BAD_CLUSTERS = 0xC0000805,
3168
3169 /// The operation could not be completed because the volume is dirty. Please run the Chkdsk utility and try again.
3170 VOLUME_DIRTY = 0xC0000806,
3171
3172 /// This file is checked out or locked for editing by another user.
3173 FILE_CHECKED_OUT = 0xC0000901,
3174
3175 /// The file must be checked out before saving changes.
3176 CHECKOUT_REQUIRED = 0xC0000902,
3177
3178 /// The file type being saved or retrieved has been blocked.
3179 BAD_FILE_TYPE = 0xC0000903,
3180
3181 /// The file size exceeds the limit allowed and cannot be saved.
3182 FILE_TOO_LARGE = 0xC0000904,
3183
3184 /// Access Denied. Before opening files in this location, you must first browse to the e.g.
3185 /// site and select the option to log on automatically.
3186 FORMS_AUTH_REQUIRED = 0xC0000905,
3187
3188 /// The operation did not complete successfully because the file contains a virus.
3189 VIRUS_INFECTED = 0xC0000906,
3190
3191 /// This file contains a virus and cannot be opened.
3192 /// Due to the nature of this virus, the file has been removed from this location.
3193 VIRUS_DELETED = 0xC0000907,
3194
3195 /// The resources required for this device conflict with the MCFG table.
3196 BAD_MCFG_TABLE = 0xC0000908,
3197
3198 /// The operation did not complete successfully because it would cause an oplock to be broken.
3199 /// The caller has requested that existing oplocks not be broken.
3200 CANNOT_BREAK_OPLOCK = 0xC0000909,
3201
3202 /// WOW Assertion Error.
3203 WOW_ASSERTION = 0xC0009898,
3204
3205 /// The cryptographic signature is invalid.
3206 INVALID_SIGNATURE = 0xC000A000,
3207
3208 /// The cryptographic provider does not support HMAC.
3209 HMAC_NOT_SUPPORTED = 0xC000A001,
3210
3211 /// The IPsec queue overflowed.
3212 IPSEC_QUEUE_OVERFLOW = 0xC000A010,
3213
3214 /// The neighbor discovery queue overflowed.
3215 ND_QUEUE_OVERFLOW = 0xC000A011,
3216
3217 /// An Internet Control Message Protocol (ICMP) hop limit exceeded error was received.
3218 HOPLIMIT_EXCEEDED = 0xC000A012,
3219
3220 /// The protocol is not installed on the local machine.
3221 PROTOCOL_NOT_SUPPORTED = 0xC000A013,
3222
3223 /// {Delayed Write Failed} Windows was unable to save all the data for the file %hs; the data has been lost.
3224 /// This error might be caused by network connectivity issues. Try to save this file elsewhere.
3225 LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED = 0xC000A080,
3226
3227 /// {Delayed Write Failed} Windows was unable to save all the data for the file %hs; the data has been lost.
3228 /// This error was returned by the server on which the file exists. Try to save this file elsewhere.
3229 LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR = 0xC000A081,
3230
3231 /// {Delayed Write Failed} Windows was unable to save all the data for the file %hs; the data has been lost.
3232 /// This error might be caused if the device has been removed or the media is write-protected.
3233 LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR = 0xC000A082,
3234
3235 /// Windows was unable to parse the requested XML data.
3236 XML_PARSE_ERROR = 0xC000A083,
3237
3238 /// An error was encountered while processing an XML digital signature.
3239 XMLDSIG_ERROR = 0xC000A084,
3240
3241 /// This indicates that the caller made the connection request in the wrong routing compartment.
3242 WRONG_COMPARTMENT = 0xC000A085,
3243
3244 /// This indicates that there was an AuthIP failure when attempting to connect to the remote host.
3245 AUTHIP_FAILURE = 0xC000A086,
3246
3247 /// OID mapped groups cannot have members.
3248 DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS = 0xC000A087,
3249
3250 /// The specified OID cannot be found.
3251 DS_OID_NOT_FOUND = 0xC000A088,
3252
3253 /// Hash generation for the specified version and hash type is not enabled on server.
3254 HASH_NOT_SUPPORTED = 0xC000A100,
3255
3256 /// The hash requests is not present or not up to date with the current file contents.
3257 HASH_NOT_PRESENT = 0xC000A101,
3258
3259 /// A file system filter on the server has not opted in for Offload Read support.
3260 OFFLOAD_READ_FLT_NOT_SUPPORTED = 0xC000A2A1,
3261
3262 /// A file system filter on the server has not opted in for Offload Write support.
3263 OFFLOAD_WRITE_FLT_NOT_SUPPORTED = 0xC000A2A2,
3264
3265 /// Offload read operations cannot be performed on:
3266 /// - Compressed files
3267 /// - Sparse files
3268 /// - Encrypted files
3269 /// - File system metadata files
3270 OFFLOAD_READ_FILE_NOT_SUPPORTED = 0xC000A2A3,
3271
3272 /// Offload write operations cannot be performed on:
3273 /// - Compressed files
3274 /// - Sparse files
3275 /// - Encrypted files
3276 /// - File system metadata files
3277 OFFLOAD_WRITE_FILE_NOT_SUPPORTED = 0xC000A2A4,
3278
3279 /// The debugger did not perform a state change.
3280 DBG_NO_STATE_CHANGE = 0xC0010001,
3281
3282 /// The debugger found that the application is not idle.
3283 DBG_APP_NOT_IDLE = 0xC0010002,
3284
3285 /// The string binding is invalid.
3286 RPC_NT_INVALID_STRING_BINDING = 0xC0020001,
3287
3288 /// The binding handle is not the correct type.
3289 RPC_NT_WRONG_KIND_OF_BINDING = 0xC0020002,
3290
3291 /// The binding handle is invalid.
3292 RPC_NT_INVALID_BINDING = 0xC0020003,
3293
3294 /// The RPC protocol sequence is not supported.
3295 RPC_NT_PROTSEQ_NOT_SUPPORTED = 0xC0020004,
3296
3297 /// The RPC protocol sequence is invalid.
3298 RPC_NT_INVALID_RPC_PROTSEQ = 0xC0020005,
3299
3300 /// The string UUID is invalid.
3301 RPC_NT_INVALID_STRING_UUID = 0xC0020006,
3302
3303 /// The endpoint format is invalid.
3304 RPC_NT_INVALID_ENDPOINT_FORMAT = 0xC0020007,
3305
3306 /// The network address is invalid.
3307 RPC_NT_INVALID_NET_ADDR = 0xC0020008,
3308
3309 /// No endpoint was found.
3310 RPC_NT_NO_ENDPOINT_FOUND = 0xC0020009,
3311
3312 /// The time-out value is invalid.
3313 RPC_NT_INVALID_TIMEOUT = 0xC002000A,
3314
3315 /// The object UUID was not found.
3316 RPC_NT_OBJECT_NOT_FOUND = 0xC002000B,
3317
3318 /// The object UUID has already been registered.
3319 RPC_NT_ALREADY_REGISTERED = 0xC002000C,
3320
3321 /// The type UUID has already been registered.
3322 RPC_NT_TYPE_ALREADY_REGISTERED = 0xC002000D,
3323
3324 /// The RPC server is already listening.
3325 RPC_NT_ALREADY_LISTENING = 0xC002000E,
3326
3327 /// No protocol sequences have been registered.
3328 RPC_NT_NO_PROTSEQS_REGISTERED = 0xC002000F,
3329
3330 /// The RPC server is not listening.
3331 RPC_NT_NOT_LISTENING = 0xC0020010,
3332
3333 /// The manager type is unknown.
3334 RPC_NT_UNKNOWN_MGR_TYPE = 0xC0020011,
3335
3336 /// The interface is unknown.
3337 RPC_NT_UNKNOWN_IF = 0xC0020012,
3338
3339 /// There are no bindings.
3340 RPC_NT_NO_BINDINGS = 0xC0020013,
3341
3342 /// There are no protocol sequences.
3343 RPC_NT_NO_PROTSEQS = 0xC0020014,
3344
3345 /// The endpoint cannot be created.
3346 RPC_NT_CANT_CREATE_ENDPOINT = 0xC0020015,
3347
3348 /// Insufficient resources are available to complete this operation.
3349 RPC_NT_OUT_OF_RESOURCES = 0xC0020016,
3350
3351 /// The RPC server is unavailable.
3352 RPC_NT_SERVER_UNAVAILABLE = 0xC0020017,
3353
3354 /// The RPC server is too busy to complete this operation.
3355 RPC_NT_SERVER_TOO_BUSY = 0xC0020018,
3356
3357 /// The network options are invalid.
3358 RPC_NT_INVALID_NETWORK_OPTIONS = 0xC0020019,
3359
3360 /// No RPCs are active on this thread.
3361 RPC_NT_NO_CALL_ACTIVE = 0xC002001A,
3362
3363 /// The RPC failed.
3364 RPC_NT_CALL_FAILED = 0xC002001B,
3365
3366 /// The RPC failed and did not execute.
3367 RPC_NT_CALL_FAILED_DNE = 0xC002001C,
3368
3369 /// An RPC protocol error occurred.
3370 RPC_NT_PROTOCOL_ERROR = 0xC002001D,
3371
3372 /// The RPC server does not support the transfer syntax.
3373 RPC_NT_UNSUPPORTED_TRANS_SYN = 0xC002001F,
3374
3375 /// The type UUID is not supported.
3376 RPC_NT_UNSUPPORTED_TYPE = 0xC0020021,
3377
3378 /// The tag is invalid.
3379 RPC_NT_INVALID_TAG = 0xC0020022,
3380
3381 /// The array bounds are invalid.
3382 RPC_NT_INVALID_BOUND = 0xC0020023,
3383
3384 /// The binding does not contain an entry name.
3385 RPC_NT_NO_ENTRY_NAME = 0xC0020024,
3386
3387 /// The name syntax is invalid.
3388 RPC_NT_INVALID_NAME_SYNTAX = 0xC0020025,
3389
3390 /// The name syntax is not supported.
3391 RPC_NT_UNSUPPORTED_NAME_SYNTAX = 0xC0020026,
3392
3393 /// No network address is available to construct a UUID.
3394 RPC_NT_UUID_NO_ADDRESS = 0xC0020028,
3395
3396 /// The endpoint is a duplicate.
3397 RPC_NT_DUPLICATE_ENDPOINT = 0xC0020029,
3398
3399 /// The authentication type is unknown.
3400 RPC_NT_UNKNOWN_AUTHN_TYPE = 0xC002002A,
3401
3402 /// The maximum number of calls is too small.
3403 RPC_NT_MAX_CALLS_TOO_SMALL = 0xC002002B,
3404
3405 /// The string is too long.
3406 RPC_NT_STRING_TOO_LONG = 0xC002002C,
3407
3408 /// The RPC protocol sequence was not found.
3409 RPC_NT_PROTSEQ_NOT_FOUND = 0xC002002D,
3410
3411 /// The procedure number is out of range.
3412 RPC_NT_PROCNUM_OUT_OF_RANGE = 0xC002002E,
3413
3414 /// The binding does not contain any authentication information.
3415 RPC_NT_BINDING_HAS_NO_AUTH = 0xC002002F,
3416
3417 /// The authentication service is unknown.
3418 RPC_NT_UNKNOWN_AUTHN_SERVICE = 0xC0020030,
3419
3420 /// The authentication level is unknown.
3421 RPC_NT_UNKNOWN_AUTHN_LEVEL = 0xC0020031,
3422
3423 /// The security context is invalid.
3424 RPC_NT_INVALID_AUTH_IDENTITY = 0xC0020032,
3425
3426 /// The authorization service is unknown.
3427 RPC_NT_UNKNOWN_AUTHZ_SERVICE = 0xC0020033,
3428
3429 /// The entry is invalid.
3430 EPT_NT_INVALID_ENTRY = 0xC0020034,
3431
3432 /// The operation cannot be performed.
3433 EPT_NT_CANT_PERFORM_OP = 0xC0020035,
3434
3435 /// No more endpoints are available from the endpoint mapper.
3436 EPT_NT_NOT_REGISTERED = 0xC0020036,
3437
3438 /// No interfaces have been exported.
3439 RPC_NT_NOTHING_TO_EXPORT = 0xC0020037,
3440
3441 /// The entry name is incomplete.
3442 RPC_NT_INCOMPLETE_NAME = 0xC0020038,
3443
3444 /// The version option is invalid.
3445 RPC_NT_INVALID_VERS_OPTION = 0xC0020039,
3446
3447 /// There are no more members.
3448 RPC_NT_NO_MORE_MEMBERS = 0xC002003A,
3449
3450 /// There is nothing to unexport.
3451 RPC_NT_NOT_ALL_OBJS_UNEXPORTED = 0xC002003B,
3452
3453 /// The interface was not found.
3454 RPC_NT_INTERFACE_NOT_FOUND = 0xC002003C,
3455
3456 /// The entry already exists.
3457 RPC_NT_ENTRY_ALREADY_EXISTS = 0xC002003D,
3458
3459 /// The entry was not found.
3460 RPC_NT_ENTRY_NOT_FOUND = 0xC002003E,
3461
3462 /// The name service is unavailable.
3463 RPC_NT_NAME_SERVICE_UNAVAILABLE = 0xC002003F,
3464
3465 /// The network address family is invalid.
3466 RPC_NT_INVALID_NAF_ID = 0xC0020040,
3467
3468 /// The requested operation is not supported.
3469 RPC_NT_CANNOT_SUPPORT = 0xC0020041,
3470
3471 /// No security context is available to allow impersonation.
3472 RPC_NT_NO_CONTEXT_AVAILABLE = 0xC0020042,
3473
3474 /// An internal error occurred in the RPC.
3475 RPC_NT_INTERNAL_ERROR = 0xC0020043,
3476
3477 /// The RPC server attempted to divide an integer by zero.
3478 RPC_NT_ZERO_DIVIDE = 0xC0020044,
3479
3480 /// An addressing error occurred in the RPC server.
3481 RPC_NT_ADDRESS_ERROR = 0xC0020045,
3482
3483 /// A floating point operation at the RPC server caused a divide by zero.
3484 RPC_NT_FP_DIV_ZERO = 0xC0020046,
3485
3486 /// A floating point underflow occurred at the RPC server.
3487 RPC_NT_FP_UNDERFLOW = 0xC0020047,
3488
3489 /// A floating point overflow occurred at the RPC server.
3490 RPC_NT_FP_OVERFLOW = 0xC0020048,
3491
3492 /// An RPC is already in progress for this thread.
3493 RPC_NT_CALL_IN_PROGRESS = 0xC0020049,
3494
3495 /// There are no more bindings.
3496 RPC_NT_NO_MORE_BINDINGS = 0xC002004A,
3497
3498 /// The group member was not found.
3499 RPC_NT_GROUP_MEMBER_NOT_FOUND = 0xC002004B,
3500
3501 /// The endpoint mapper database entry could not be created.
3502 EPT_NT_CANT_CREATE = 0xC002004C,
3503
3504 /// The object UUID is the nil UUID.
3505 RPC_NT_INVALID_OBJECT = 0xC002004D,
3506
3507 /// No interfaces have been registered.
3508 RPC_NT_NO_INTERFACES = 0xC002004F,
3509
3510 /// The RPC was canceled.
3511 RPC_NT_CALL_CANCELLED = 0xC0020050,
3512
3513 /// The binding handle does not contain all the required information.
3514 RPC_NT_BINDING_INCOMPLETE = 0xC0020051,
3515
3516 /// A communications failure occurred during an RPC.
3517 RPC_NT_COMM_FAILURE = 0xC0020052,
3518
3519 /// The requested authentication level is not supported.
3520 RPC_NT_UNSUPPORTED_AUTHN_LEVEL = 0xC0020053,
3521
3522 /// No principal name was registered.
3523 RPC_NT_NO_PRINC_NAME = 0xC0020054,
3524
3525 /// The error specified is not a valid Windows RPC error code.
3526 RPC_NT_NOT_RPC_ERROR = 0xC0020055,
3527
3528 /// A security package-specific error occurred.
3529 RPC_NT_SEC_PKG_ERROR = 0xC0020057,
3530
3531 /// The thread was not canceled.
3532 RPC_NT_NOT_CANCELLED = 0xC0020058,
3533
3534 /// Invalid asynchronous RPC handle.
3535 RPC_NT_INVALID_ASYNC_HANDLE = 0xC0020062,
3536
3537 /// Invalid asynchronous RPC call handle for this operation.
3538 RPC_NT_INVALID_ASYNC_CALL = 0xC0020063,
3539
3540 /// Access to the HTTP proxy is denied.
3541 RPC_NT_PROXY_ACCESS_DENIED = 0xC0020064,
3542
3543 /// The list of RPC servers available for auto-handle binding has been exhausted.
3544 RPC_NT_NO_MORE_ENTRIES = 0xC0030001,
3545
3546 /// The file designated by DCERPCCHARTRANS cannot be opened.
3547 RPC_NT_SS_CHAR_TRANS_OPEN_FAIL = 0xC0030002,
3548
3549 /// The file containing the character translation table has fewer than 512 bytes.
3550 RPC_NT_SS_CHAR_TRANS_SHORT_FILE = 0xC0030003,
3551
3552 /// A null context handle is passed as an [in] parameter.
3553 RPC_NT_SS_IN_NULL_CONTEXT = 0xC0030004,
3554
3555 /// The context handle does not match any known context handles.
3556 RPC_NT_SS_CONTEXT_MISMATCH = 0xC0030005,
3557
3558 /// The context handle changed during a call.
3559 RPC_NT_SS_CONTEXT_DAMAGED = 0xC0030006,
3560
3561 /// The binding handles passed to an RPC do not match.
3562 RPC_NT_SS_HANDLES_MISMATCH = 0xC0030007,
3563
3564 /// The stub is unable to get the call handle.
3565 RPC_NT_SS_CANNOT_GET_CALL_HANDLE = 0xC0030008,
3566
3567 /// A null reference pointer was passed to the stub.
3568 RPC_NT_NULL_REF_POINTER = 0xC0030009,
3569
3570 /// The enumeration value is out of range.
3571 RPC_NT_ENUM_VALUE_OUT_OF_RANGE = 0xC003000A,
3572
3573 /// The byte count is too small.
3574 RPC_NT_BYTE_COUNT_TOO_SMALL = 0xC003000B,
3575
3576 /// The stub received bad data.
3577 RPC_NT_BAD_STUB_DATA = 0xC003000C,
3578
3579 /// Invalid operation on the encoding/decoding handle.
3580 RPC_NT_INVALID_ES_ACTION = 0xC0030059,
3581
3582 /// Incompatible version of the serializing package.
3583 RPC_NT_WRONG_ES_VERSION = 0xC003005A,
3584
3585 /// Incompatible version of the RPC stub.
3586 RPC_NT_WRONG_STUB_VERSION = 0xC003005B,
3587
3588 /// The RPC pipe object is invalid or corrupt.
3589 RPC_NT_INVALID_PIPE_OBJECT = 0xC003005C,
3590
3591 /// An invalid operation was attempted on an RPC pipe object.
3592 RPC_NT_INVALID_PIPE_OPERATION = 0xC003005D,
3593
3594 /// Unsupported RPC pipe version.
3595 RPC_NT_WRONG_PIPE_VERSION = 0xC003005E,
3596
3597 /// The RPC pipe object has already been closed.
3598 RPC_NT_PIPE_CLOSED = 0xC003005F,
3599
3600 /// The RPC call completed before all pipes were processed.
3601 RPC_NT_PIPE_DISCIPLINE_ERROR = 0xC0030060,
3602
3603 /// No more data is available from the RPC pipe.
3604 RPC_NT_PIPE_EMPTY = 0xC0030061,
3605
3606 /// A device is missing in the system BIOS MPS table. This device will not be used.
3607 /// Contact your system vendor for a system BIOS update.
3608 PNP_BAD_MPS_TABLE = 0xC0040035,
3609
3610 /// A translator failed to translate resources.
3611 PNP_TRANSLATION_FAILED = 0xC0040036,
3612
3613 /// An IRQ translator failed to translate resources.
3614 PNP_IRQ_TRANSLATION_FAILED = 0xC0040037,
3615
3616 /// Driver %2 returned an invalid ID for a child device (%3).
3617 PNP_INVALID_ID = 0xC0040038,
3618
3619 /// Reissue the given operation as a cached I/O operation
3620 IO_REISSUE_AS_CACHED = 0xC0040039,
3621
3622 /// Session name %1 is invalid.
3623 CTX_WINSTATION_NAME_INVALID = 0xC00A0001,
3624
3625 /// The protocol driver %1 is invalid.
3626 CTX_INVALID_PD = 0xC00A0002,
3627
3628 /// The protocol driver %1 was not found in the system path.
3629 CTX_PD_NOT_FOUND = 0xC00A0003,
3630
3631 /// A close operation is pending on the terminal connection.
3632 CTX_CLOSE_PENDING = 0xC00A0006,
3633
3634 /// No free output buffers are available.
3635 CTX_NO_OUTBUF = 0xC00A0007,
3636
3637 /// The MODEM.INF file was not found.
3638 CTX_MODEM_INF_NOT_FOUND = 0xC00A0008,
3639
3640 /// The modem (%1) was not found in the MODEM.INF file.
3641 CTX_INVALID_MODEMNAME = 0xC00A0009,
3642
3643 /// The modem did not accept the command sent to it.
3644 /// Verify that the configured modem name matches the attached modem.
3645 CTX_RESPONSE_ERROR = 0xC00A000A,
3646
3647 /// The modem did not respond to the command sent to it.
3648 /// Verify that the modem cable is properly attached and the modem is turned on.
3649 CTX_MODEM_RESPONSE_TIMEOUT = 0xC00A000B,
3650
3651 /// Carrier detection has failed or the carrier has been dropped due to disconnection.
3652 CTX_MODEM_RESPONSE_NO_CARRIER = 0xC00A000C,
3653
3654 /// A dial tone was not detected within the required time.
3655 /// Verify that the phone cable is properly attached and functional.
3656 CTX_MODEM_RESPONSE_NO_DIALTONE = 0xC00A000D,
3657
3658 /// A busy signal was detected at a remote site on callback.
3659 CTX_MODEM_RESPONSE_BUSY = 0xC00A000E,
3660
3661 /// A voice was detected at a remote site on callback.
3662 CTX_MODEM_RESPONSE_VOICE = 0xC00A000F,
3663
3664 /// Transport driver error.
3665 CTX_TD_ERROR = 0xC00A0010,
3666
3667 /// The client you are using is not licensed to use this system. Your logon request is denied.
3668 CTX_LICENSE_CLIENT_INVALID = 0xC00A0012,
3669
3670 /// The system has reached its licensed logon limit. Try again later.
3671 CTX_LICENSE_NOT_AVAILABLE = 0xC00A0013,
3672
3673 /// The system license has expired. Your logon request is denied.
3674 CTX_LICENSE_EXPIRED = 0xC00A0014,
3675
3676 /// The specified session cannot be found.
3677 CTX_WINSTATION_NOT_FOUND = 0xC00A0015,
3678
3679 /// The specified session name is already in use.
3680 CTX_WINSTATION_NAME_COLLISION = 0xC00A0016,
3681
3682 /// The requested operation cannot be completed because the terminal connection is currently processing a connect, disconnect, reset, or delete operation.
3683 CTX_WINSTATION_BUSY = 0xC00A0017,
3684
3685 /// An attempt has been made to connect to a session whose video mode is not supported by the current client.
3686 CTX_BAD_VIDEO_MODE = 0xC00A0018,
3687
3688 /// The application attempted to enable DOS graphics mode. DOS graphics mode is not supported.
3689 CTX_GRAPHICS_INVALID = 0xC00A0022,
3690
3691 /// The requested operation can be performed only on the system console.
3692 /// This is most often the result of a driver or system DLL requiring direct console access.
3693 CTX_NOT_CONSOLE = 0xC00A0024,
3694
3695 /// The client failed to respond to the server connect message.
3696 CTX_CLIENT_QUERY_TIMEOUT = 0xC00A0026,
3697
3698 /// Disconnecting the console session is not supported.
3699 CTX_CONSOLE_DISCONNECT = 0xC00A0027,
3700
3701 /// Reconnecting a disconnected session to the console is not supported.
3702 CTX_CONSOLE_CONNECT = 0xC00A0028,
3703
3704 /// The request to control another session remotely was denied.
3705 CTX_SHADOW_DENIED = 0xC00A002A,
3706
3707 /// A process has requested access to a session, but has not been granted those access rights.
3708 CTX_WINSTATION_ACCESS_DENIED = 0xC00A002B,
3709
3710 /// The terminal connection driver %1 is invalid.
3711 CTX_INVALID_WD = 0xC00A002E,
3712
3713 /// The terminal connection driver %1 was not found in the system path.
3714 CTX_WD_NOT_FOUND = 0xC00A002F,
3715
3716 /// The requested session cannot be controlled remotely.
3717 /// You cannot control your own session, a session that is trying to control your session, a session that has no user logged on, or other sessions from the console.
3718 CTX_SHADOW_INVALID = 0xC00A0030,
3719
3720 /// The requested session is not configured to allow remote control.
3721 CTX_SHADOW_DISABLED = 0xC00A0031,
3722
3723 /// The RDP protocol component %2 detected an error in the protocol stream and has disconnected the client.
3724 RDP_PROTOCOL_ERROR = 0xC00A0032,
3725
3726 /// Your request to connect to this terminal server has been rejected.
3727 /// Your terminal server client license number has not been entered for this copy of the terminal client.
3728 /// Contact your system administrator for help in entering a valid, unique license number for this terminal server client. Click OK to continue.
3729 CTX_CLIENT_LICENSE_NOT_SET = 0xC00A0033,
3730
3731 /// Your request to connect to this terminal server has been rejected.
3732 /// Your terminal server client license number is currently being used by another user.
3733 /// Contact your system administrator to obtain a new copy of the terminal server client with a valid, unique license number. Click OK to continue.
3734 CTX_CLIENT_LICENSE_IN_USE = 0xC00A0034,
3735
3736 /// The remote control of the console was terminated because the display mode was changed.
3737 /// Changing the display mode in a remote control session is not supported.
3738 CTX_SHADOW_ENDED_BY_MODE_CHANGE = 0xC00A0035,
3739
3740 /// Remote control could not be terminated because the specified session is not currently being remotely controlled.
3741 CTX_SHADOW_NOT_RUNNING = 0xC00A0036,
3742
3743 /// Your interactive logon privilege has been disabled. Contact your system administrator.
3744 CTX_LOGON_DISABLED = 0xC00A0037,
3745
3746 /// The terminal server security layer detected an error in the protocol stream and has disconnected the client.
3747 CTX_SECURITY_LAYER_ERROR = 0xC00A0038,
3748
3749 /// The target session is incompatible with the current session.
3750 TS_INCOMPATIBLE_SESSIONS = 0xC00A0039,
3751
3752 /// The resource loader failed to find an MUI file.
3753 MUI_FILE_NOT_FOUND = 0xC00B0001,
3754
3755 /// The resource loader failed to load an MUI file because the file failed to pass validation.
3756 MUI_INVALID_FILE = 0xC00B0002,
3757
3758 /// The RC manifest is corrupted with garbage data, is an unsupported version, or is missing a required item.
3759 MUI_INVALID_RC_CONFIG = 0xC00B0003,
3760
3761 /// The RC manifest has an invalid culture name.
3762 MUI_INVALID_LOCALE_NAME = 0xC00B0004,
3763
3764 /// The RC manifest has and invalid ultimate fallback name.
3765 MUI_INVALID_ULTIMATEFALLBACK_NAME = 0xC00B0005,
3766
3767 /// The resource loader cache does not have a loaded MUI entry.
3768 MUI_FILE_NOT_LOADED = 0xC00B0006,
3769
3770 /// The user stopped resource enumeration.
3771 RESOURCE_ENUM_USER_STOP = 0xC00B0007,
3772
3773 /// The cluster node is not valid.
3774 CLUSTER_INVALID_NODE = 0xC0130001,
3775
3776 /// The cluster node already exists.
3777 CLUSTER_NODE_EXISTS = 0xC0130002,
3778
3779 /// A node is in the process of joining the cluster.
3780 CLUSTER_JOIN_IN_PROGRESS = 0xC0130003,
3781
3782 /// The cluster node was not found.
3783 CLUSTER_NODE_NOT_FOUND = 0xC0130004,
3784
3785 /// The cluster local node information was not found.
3786 CLUSTER_LOCAL_NODE_NOT_FOUND = 0xC0130005,
3787
3788 /// The cluster network already exists.
3789 CLUSTER_NETWORK_EXISTS = 0xC0130006,
3790
3791 /// The cluster network was not found.
3792 CLUSTER_NETWORK_NOT_FOUND = 0xC0130007,
3793
3794 /// The cluster network interface already exists.
3795 CLUSTER_NETINTERFACE_EXISTS = 0xC0130008,
3796
3797 /// The cluster network interface was not found.
3798 CLUSTER_NETINTERFACE_NOT_FOUND = 0xC0130009,
3799
3800 /// The cluster request is not valid for this object.
3801 CLUSTER_INVALID_REQUEST = 0xC013000A,
3802
3803 /// The cluster network provider is not valid.
3804 CLUSTER_INVALID_NETWORK_PROVIDER = 0xC013000B,
3805
3806 /// The cluster node is down.
3807 CLUSTER_NODE_DOWN = 0xC013000C,
3808
3809 /// The cluster node is not reachable.
3810 CLUSTER_NODE_UNREACHABLE = 0xC013000D,
3811
3812 /// The cluster node is not a member of the cluster.
3813 CLUSTER_NODE_NOT_MEMBER = 0xC013000E,
3814
3815 /// A cluster join operation is not in progress.
3816 CLUSTER_JOIN_NOT_IN_PROGRESS = 0xC013000F,
3817
3818 /// The cluster network is not valid.
3819 CLUSTER_INVALID_NETWORK = 0xC0130010,
3820
3821 /// No network adapters are available.
3822 CLUSTER_NO_NET_ADAPTERS = 0xC0130011,
3823
3824 /// The cluster node is up.
3825 CLUSTER_NODE_UP = 0xC0130012,
3826
3827 /// The cluster node is paused.
3828 CLUSTER_NODE_PAUSED = 0xC0130013,
3829
3830 /// The cluster node is not paused.
3831 CLUSTER_NODE_NOT_PAUSED = 0xC0130014,
3832
3833 /// No cluster security context is available.
3834 CLUSTER_NO_SECURITY_CONTEXT = 0xC0130015,
3835
3836 /// The cluster network is not configured for internal cluster communication.
3837 CLUSTER_NETWORK_NOT_INTERNAL = 0xC0130016,
3838
3839 /// The cluster node has been poisoned.
3840 CLUSTER_POISONED = 0xC0130017,
3841
3842 /// An attempt was made to run an invalid AML opcode.
3843 ACPI_INVALID_OPCODE = 0xC0140001,
3844
3845 /// The AML interpreter stack has overflowed.
3846 ACPI_STACK_OVERFLOW = 0xC0140002,
3847
3848 /// An inconsistent state has occurred.
3849 ACPI_ASSERT_FAILED = 0xC0140003,
3850
3851 /// An attempt was made to access an array outside its bounds.
3852 ACPI_INVALID_INDEX = 0xC0140004,
3853
3854 /// A required argument was not specified.
3855 ACPI_INVALID_ARGUMENT = 0xC0140005,
3856
3857 /// A fatal error has occurred.
3858 ACPI_FATAL = 0xC0140006,
3859
3860 /// An invalid SuperName was specified.
3861 ACPI_INVALID_SUPERNAME = 0xC0140007,
3862
3863 /// An argument with an incorrect type was specified.
3864 ACPI_INVALID_ARGTYPE = 0xC0140008,
3865
3866 /// An object with an incorrect type was specified.
3867 ACPI_INVALID_OBJTYPE = 0xC0140009,
3868
3869 /// A target with an incorrect type was specified.
3870 ACPI_INVALID_TARGETTYPE = 0xC014000A,
3871
3872 /// An incorrect number of arguments was specified.
3873 ACPI_INCORRECT_ARGUMENT_COUNT = 0xC014000B,
3874
3875 /// An address failed to translate.
3876 ACPI_ADDRESS_NOT_MAPPED = 0xC014000C,
3877
3878 /// An incorrect event type was specified.
3879 ACPI_INVALID_EVENTTYPE = 0xC014000D,
3880
3881 /// A handler for the target already exists.
3882 ACPI_HANDLER_COLLISION = 0xC014000E,
3883
3884 /// Invalid data for the target was specified.
3885 ACPI_INVALID_DATA = 0xC014000F,
3886
3887 /// An invalid region for the target was specified.
3888 ACPI_INVALID_REGION = 0xC0140010,
3889
3890 /// An attempt was made to access a field outside the defined range.
3891 ACPI_INVALID_ACCESS_SIZE = 0xC0140011,
3892
3893 /// The global system lock could not be acquired.
3894 ACPI_ACQUIRE_GLOBAL_LOCK = 0xC0140012,
3895
3896 /// An attempt was made to reinitialize the ACPI subsystem.
3897 ACPI_ALREADY_INITIALIZED = 0xC0140013,
3898
3899 /// The ACPI subsystem has not been initialized.
3900 ACPI_NOT_INITIALIZED = 0xC0140014,
3901
3902 /// An incorrect mutex was specified.
3903 ACPI_INVALID_MUTEX_LEVEL = 0xC0140015,
3904
3905 /// The mutex is not currently owned.
3906 ACPI_MUTEX_NOT_OWNED = 0xC0140016,
3907
3908 /// An attempt was made to access the mutex by a process that was not the owner.
3909 ACPI_MUTEX_NOT_OWNER = 0xC0140017,
3910
3911 /// An error occurred during an access to region space.
3912 ACPI_RS_ACCESS = 0xC0140018,
3913
3914 /// An attempt was made to use an incorrect table.
3915 ACPI_INVALID_TABLE = 0xC0140019,
3916
3917 /// The registration of an ACPI event failed.
3918 ACPI_REG_HANDLER_FAILED = 0xC0140020,
3919
3920 /// An ACPI power object failed to transition state.
3921 ACPI_POWER_REQUEST_FAILED = 0xC0140021,
3922
3923 /// The requested section is not present in the activation context.
3924 SXS_SECTION_NOT_FOUND = 0xC0150001,
3925
3926 /// Windows was unble to process the application binding information.
3927 /// Refer to the system event log for further information.
3928 SXS_CANT_GEN_ACTCTX = 0xC0150002,
3929
3930 /// The application binding data format is invalid.
3931 SXS_INVALID_ACTCTXDATA_FORMAT = 0xC0150003,
3932
3933 /// The referenced assembly is not installed on the system.
3934 SXS_ASSEMBLY_NOT_FOUND = 0xC0150004,
3935
3936 /// The manifest file does not begin with the required tag and format information.
3937 SXS_MANIFEST_FORMAT_ERROR = 0xC0150005,
3938
3939 /// The manifest file contains one or more syntax errors.
3940 SXS_MANIFEST_PARSE_ERROR = 0xC0150006,
3941
3942 /// The application attempted to activate a disabled activation context.
3943 SXS_ACTIVATION_CONTEXT_DISABLED = 0xC0150007,
3944
3945 /// The requested lookup key was not found in any active activation context.
3946 SXS_KEY_NOT_FOUND = 0xC0150008,
3947
3948 /// A component version required by the application conflicts with another component version that is already active.
3949 SXS_VERSION_CONFLICT = 0xC0150009,
3950
3951 /// The type requested activation context section does not match the query API used.
3952 SXS_WRONG_SECTION_TYPE = 0xC015000A,
3953
3954 /// Lack of system resources has required isolated activation to be disabled for the current thread of execution.
3955 SXS_THREAD_QUERIES_DISABLED = 0xC015000B,
3956
3957 /// The referenced assembly could not be found.
3958 SXS_ASSEMBLY_MISSING = 0xC015000C,
3959
3960 /// An attempt to set the process default activation context failed because the process default activation context was already set.
3961 SXS_PROCESS_DEFAULT_ALREADY_SET = 0xC015000E,
3962
3963 /// The activation context being deactivated is not the most recently activated one.
3964 SXS_EARLY_DEACTIVATION = 0xC015000F,
3965
3966 /// The activation context being deactivated is not active for the current thread of execution.
3967 SXS_INVALID_DEACTIVATION = 0xC0150010,
3968
3969 /// The activation context being deactivated has already been deactivated.
3970 SXS_MULTIPLE_DEACTIVATION = 0xC0150011,
3971
3972 /// The activation context of the system default assembly could not be generated.
3973 SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY = 0xC0150012,
3974
3975 /// A component used by the isolation facility has requested that the process be terminated.
3976 SXS_PROCESS_TERMINATION_REQUESTED = 0xC0150013,
3977
3978 /// The activation context activation stack for the running thread of execution is corrupt.
3979 SXS_CORRUPT_ACTIVATION_STACK = 0xC0150014,
3980
3981 /// The application isolation metadata for this process or thread has become corrupt.
3982 SXS_CORRUPTION = 0xC0150015,
3983
3984 /// The value of an attribute in an identity is not within the legal range.
3985 SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE = 0xC0150016,
3986
3987 /// The name of an attribute in an identity is not within the legal range.
3988 SXS_INVALID_IDENTITY_ATTRIBUTE_NAME = 0xC0150017,
3989
3990 /// An identity contains two definitions for the same attribute.
3991 SXS_IDENTITY_DUPLICATE_ATTRIBUTE = 0xC0150018,
3992
3993 /// The identity string is malformed.
3994 /// This might be due to a trailing comma, more than two unnamed attributes, a missing attribute name, or a missing attribute value.
3995 SXS_IDENTITY_PARSE_ERROR = 0xC0150019,
3996
3997 /// The component store has become corrupted.
3998 SXS_COMPONENT_STORE_CORRUPT = 0xC015001A,
3999
4000 /// A component's file does not match the verification information present in the component manifest.
4001 SXS_FILE_HASH_MISMATCH = 0xC015001B,
4002
4003 /// The identities of the manifests are identical, but their contents are different.
4004 SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT = 0xC015001C,
4005
4006 /// The component identities are different.
4007 SXS_IDENTITIES_DIFFERENT = 0xC015001D,
4008
4009 /// The assembly is not a deployment.
4010 SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT = 0xC015001E,
4011
4012 /// The file is not a part of the assembly.
4013 SXS_FILE_NOT_PART_OF_ASSEMBLY = 0xC015001F,
4014
4015 /// An advanced installer failed during setup or servicing.
4016 ADVANCED_INSTALLER_FAILED = 0xC0150020,
4017
4018 /// The character encoding in the XML declaration did not match the encoding used in the document.
4019 XML_ENCODING_MISMATCH = 0xC0150021,
4020
4021 /// The size of the manifest exceeds the maximum allowed.
4022 SXS_MANIFEST_TOO_BIG = 0xC0150022,
4023
4024 /// The setting is not registered.
4025 SXS_SETTING_NOT_REGISTERED = 0xC0150023,
4026
4027 /// One or more required transaction members are not present.
4028 SXS_TRANSACTION_CLOSURE_INCOMPLETE = 0xC0150024,
4029
4030 /// The SMI primitive installer failed during setup or servicing.
4031 SMI_PRIMITIVE_INSTALLER_FAILED = 0xC0150025,
4032
4033 /// A generic command executable returned a result that indicates failure.
4034 GENERIC_COMMAND_FAILED = 0xC0150026,
4035
4036 /// A component is missing file verification information in its manifest.
4037 SXS_FILE_HASH_MISSING = 0xC0150027,
4038
4039 /// The function attempted to use a name that is reserved for use by another transaction.
4040 TRANSACTIONAL_CONFLICT = 0xC0190001,
4041
4042 /// The transaction handle associated with this operation is invalid.
4043 INVALID_TRANSACTION = 0xC0190002,
4044
4045 /// The requested operation was made in the context of a transaction that is no longer active.
4046 TRANSACTION_NOT_ACTIVE = 0xC0190003,
4047
4048 /// The transaction manager was unable to be successfully initialized. Transacted operations are not supported.
4049 TM_INITIALIZATION_FAILED = 0xC0190004,
4050
4051 /// Transaction support within the specified file system resource manager was not started or was shut down due to an error.
4052 RM_NOT_ACTIVE = 0xC0190005,
4053
4054 /// The metadata of the resource manager has been corrupted. The resource manager will not function.
4055 RM_METADATA_CORRUPT = 0xC0190006,
4056
4057 /// The resource manager attempted to prepare a transaction that it has not successfully joined.
4058 TRANSACTION_NOT_JOINED = 0xC0190007,
4059
4060 /// The specified directory does not contain a file system resource manager.
4061 DIRECTORY_NOT_RM = 0xC0190008,
4062
4063 /// The remote server or share does not support transacted file operations.
4064 TRANSACTIONS_UNSUPPORTED_REMOTE = 0xC019000A,
4065
4066 /// The requested log size for the file system resource manager is invalid.
4067 LOG_RESIZE_INVALID_SIZE = 0xC019000B,
4068
4069 /// The remote server sent mismatching version number or Fid for a file opened with transactions.
4070 REMOTE_FILE_VERSION_MISMATCH = 0xC019000C,
4071
4072 /// The resource manager tried to register a protocol that already exists.
4073 CRM_PROTOCOL_ALREADY_EXISTS = 0xC019000F,
4074
4075 /// The attempt to propagate the transaction failed.
4076 TRANSACTION_PROPAGATION_FAILED = 0xC0190010,
4077
4078 /// The requested propagation protocol was not registered as a CRM.
4079 CRM_PROTOCOL_NOT_FOUND = 0xC0190011,
4080
4081 /// The transaction object already has a superior enlistment, and the caller attempted an operation that would have created a new superior. Only a single superior enlistment is allowed.
4082 TRANSACTION_SUPERIOR_EXISTS = 0xC0190012,
4083
4084 /// The requested operation is not valid on the transaction object in its current state.
4085 TRANSACTION_REQUEST_NOT_VALID = 0xC0190013,
4086
4087 /// The caller has called a response API, but the response is not expected because the transaction manager did not issue the corresponding request to the caller.
4088 TRANSACTION_NOT_REQUESTED = 0xC0190014,
4089
4090 /// It is too late to perform the requested operation, because the transaction has already been aborted.
4091 TRANSACTION_ALREADY_ABORTED = 0xC0190015,
4092
4093 /// It is too late to perform the requested operation, because the transaction has already been committed.
4094 TRANSACTION_ALREADY_COMMITTED = 0xC0190016,
4095
4096 /// The buffer passed in to NtPushTransaction or NtPullTransaction is not in a valid format.
4097 TRANSACTION_INVALID_MARSHALL_BUFFER = 0xC0190017,
4098
4099 /// The current transaction context associated with the thread is not a valid handle to a transaction object.
4100 CURRENT_TRANSACTION_NOT_VALID = 0xC0190018,
4101
4102 /// An attempt to create space in the transactional resource manager's log failed.
4103 /// The failure status has been recorded in the event log.
4104 LOG_GROWTH_FAILED = 0xC0190019,
4105
4106 /// The object (file, stream, or link) that corresponds to the handle has been deleted by a transaction savepoint rollback.
4107 OBJECT_NO_LONGER_EXISTS = 0xC0190021,
4108
4109 /// The specified file miniversion was not found for this transacted file open.
4110 STREAM_MINIVERSION_NOT_FOUND = 0xC0190022,
4111
4112 /// The specified file miniversion was found but has been invalidated.
4113 /// The most likely cause is a transaction savepoint rollback.
4114 STREAM_MINIVERSION_NOT_VALID = 0xC0190023,
4115
4116 /// A miniversion can be opened only in the context of the transaction that created it.
4117 MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION = 0xC0190024,
4118
4119 /// It is not possible to open a miniversion with modify access.
4120 CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT = 0xC0190025,
4121
4122 /// It is not possible to create any more miniversions for this stream.
4123 CANT_CREATE_MORE_STREAM_MINIVERSIONS = 0xC0190026,
4124
4125 /// The handle has been invalidated by a transaction.
4126 /// The most likely cause is the presence of memory mapping on a file or an open handle when the transaction ended or rolled back to savepoint.
4127 HANDLE_NO_LONGER_VALID = 0xC0190028,
4128
4129 /// The log data is corrupt.
4130 LOG_CORRUPTION_DETECTED = 0xC0190030,
4131
4132 /// The transaction outcome is unavailable because the resource manager responsible for it is disconnected.
4133 RM_DISCONNECTED = 0xC0190032,
4134
4135 /// The request was rejected because the enlistment in question is not a superior enlistment.
4136 ENLISTMENT_NOT_SUPERIOR = 0xC0190033,
4137
4138 /// The file cannot be opened in a transaction because its identity depends on the outcome of an unresolved transaction.
4139 FILE_IDENTITY_NOT_PERSISTENT = 0xC0190036,
4140
4141 /// The operation cannot be performed because another transaction is depending on this property not changing.
4142 CANT_BREAK_TRANSACTIONAL_DEPENDENCY = 0xC0190037,
4143
4144 /// The operation would involve a single file with two transactional resource managers and is, therefore, not allowed.
4145 CANT_CROSS_RM_BOUNDARY = 0xC0190038,
4146
4147 /// The $Txf directory must be empty for this operation to succeed.
4148 TXF_DIR_NOT_EMPTY = 0xC0190039,
4149
4150 /// The operation would leave a transactional resource manager in an inconsistent state and is therefore not allowed.
4151 INDOUBT_TRANSACTIONS_EXIST = 0xC019003A,
4152
4153 /// The operation could not be completed because the transaction manager does not have a log.
4154 TM_VOLATILE = 0xC019003B,
4155
4156 /// A rollback could not be scheduled because a previously scheduled rollback has already executed or been queued for execution.
4157 ROLLBACK_TIMER_EXPIRED = 0xC019003C,
4158
4159 /// The transactional metadata attribute on the file or directory %hs is corrupt and unreadable.
4160 TXF_ATTRIBUTE_CORRUPT = 0xC019003D,
4161
4162 /// The encryption operation could not be completed because a transaction is active.
4163 EFS_NOT_ALLOWED_IN_TRANSACTION = 0xC019003E,
4164
4165 /// This object is not allowed to be opened in a transaction.
4166 TRANSACTIONAL_OPEN_NOT_ALLOWED = 0xC019003F,
4167
4168 /// Memory mapping (creating a mapped section) a remote file under a transaction is not supported.
4169 TRANSACTED_MAPPING_UNSUPPORTED_REMOTE = 0xC0190040,
4170
4171 /// Promotion was required to allow the resource manager to enlist, but the transaction was set to disallow it.
4172 TRANSACTION_REQUIRED_PROMOTION = 0xC0190043,
4173
4174 /// This file is open for modification in an unresolved transaction and can be opened for execute only by a transacted reader.
4175 CANNOT_EXECUTE_FILE_IN_TRANSACTION = 0xC0190044,
4176
4177 /// The request to thaw frozen transactions was ignored because transactions were not previously frozen.
4178 TRANSACTIONS_NOT_FROZEN = 0xC0190045,
4179
4180 /// Transactions cannot be frozen because a freeze is already in progress.
4181 TRANSACTION_FREEZE_IN_PROGRESS = 0xC0190046,
4182
4183 /// The target volume is not a snapshot volume.
4184 /// This operation is valid only on a volume mounted as a snapshot.
4185 NOT_SNAPSHOT_VOLUME = 0xC0190047,
4186
4187 /// The savepoint operation failed because files are open on the transaction, which is not permitted.
4188 NO_SAVEPOINT_WITH_OPEN_FILES = 0xC0190048,
4189
4190 /// The sparse operation could not be completed because a transaction is active on the file.
4191 SPARSE_NOT_ALLOWED_IN_TRANSACTION = 0xC0190049,
4192
4193 /// The call to create a transaction manager object failed because the Tm Identity that is stored in the log file does not match the Tm Identity that was passed in as an argument.
4194 TM_IDENTITY_MISMATCH = 0xC019004A,
4195
4196 /// I/O was attempted on a section object that has been floated as a result of a transaction ending. There is no valid data.
4197 FLOATED_SECTION = 0xC019004B,
4198
4199 /// The transactional resource manager cannot currently accept transacted work due to a transient condition, such as low resources.
4200 CANNOT_ACCEPT_TRANSACTED_WORK = 0xC019004C,
4201
4202 /// The transactional resource manager had too many transactions outstanding that could not be aborted.
4203 /// The transactional resource manager has been shut down.
4204 CANNOT_ABORT_TRANSACTIONS = 0xC019004D,
4205
4206 /// The specified transaction was unable to be opened because it was not found.
4207 TRANSACTION_NOT_FOUND = 0xC019004E,
4208
4209 /// The specified resource manager was unable to be opened because it was not found.
4210 RESOURCEMANAGER_NOT_FOUND = 0xC019004F,
4211
4212 /// The specified enlistment was unable to be opened because it was not found.
4213 ENLISTMENT_NOT_FOUND = 0xC0190050,
4214
4215 /// The specified transaction manager was unable to be opened because it was not found.
4216 TRANSACTIONMANAGER_NOT_FOUND = 0xC0190051,
4217
4218 /// The specified resource manager was unable to create an enlistment because its associated transaction manager is not online.
4219 TRANSACTIONMANAGER_NOT_ONLINE = 0xC0190052,
4220
4221 /// The specified transaction manager was unable to create the objects contained in its log file in the Ob namespace.
4222 /// Therefore, the transaction manager was unable to recover.
4223 TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION = 0xC0190053,
4224
4225 /// The call to create a superior enlistment on this transaction object could not be completed because the transaction object specified for the enlistment is a subordinate branch of the transaction.
4226 /// Only the root of the transaction can be enlisted as a superior.
4227 TRANSACTION_NOT_ROOT = 0xC0190054,
4228
4229 /// Because the associated transaction manager or resource manager has been closed, the handle is no longer valid.
4230 TRANSACTION_OBJECT_EXPIRED = 0xC0190055,
4231
4232 /// The compression operation could not be completed because a transaction is active on the file.
4233 COMPRESSION_NOT_ALLOWED_IN_TRANSACTION = 0xC0190056,
4234
4235 /// The specified operation could not be performed on this superior enlistment because the enlistment was not created with the corresponding completion response in the NotificationMask.
4236 TRANSACTION_RESPONSE_NOT_ENLISTED = 0xC0190057,
4237
4238 /// The specified operation could not be performed because the record to be logged was too long.
4239 /// This can occur because either there are too many enlistments on this transaction or the combined RecoveryInformation being logged on behalf of those enlistments is too long.
4240 TRANSACTION_RECORD_TOO_LONG = 0xC0190058,
4241
4242 /// The link-tracking operation could not be completed because a transaction is active.
4243 NO_LINK_TRACKING_IN_TRANSACTION = 0xC0190059,
4244
4245 /// This operation cannot be performed in a transaction.
4246 OPERATION_NOT_SUPPORTED_IN_TRANSACTION = 0xC019005A,
4247
4248 /// The kernel transaction manager had to abort or forget the transaction because it blocked forward progress.
4249 TRANSACTION_INTEGRITY_VIOLATED = 0xC019005B,
4250
4251 /// The handle is no longer properly associated with its transaction.
4252 /// It might have been opened in a transactional resource manager that was subsequently forced to restart. Please close the handle and open a new one.
4253 EXPIRED_HANDLE = 0xC0190060,
4254
4255 /// The specified operation could not be performed because the resource manager is not enlisted in the transaction.
4256 TRANSACTION_NOT_ENLISTED = 0xC0190061,
4257
4258 /// The log service found an invalid log sector.
4259 LOG_SECTOR_INVALID = 0xC01A0001,
4260
4261 /// The log service encountered a log sector with invalid block parity.
4262 LOG_SECTOR_PARITY_INVALID = 0xC01A0002,
4263
4264 /// The log service encountered a remapped log sector.
4265 LOG_SECTOR_REMAPPED = 0xC01A0003,
4266
4267 /// The log service encountered a partial or incomplete log block.
4268 LOG_BLOCK_INCOMPLETE = 0xC01A0004,
4269
4270 /// The log service encountered an attempt to access data outside the active log range.
4271 LOG_INVALID_RANGE = 0xC01A0005,
4272
4273 /// The log service user-log marshaling buffers are exhausted.
4274 LOG_BLOCKS_EXHAUSTED = 0xC01A0006,
4275
4276 /// The log service encountered an attempt to read from a marshaling area with an invalid read context.
4277 LOG_READ_CONTEXT_INVALID = 0xC01A0007,
4278
4279 /// The log service encountered an invalid log restart area.
4280 LOG_RESTART_INVALID = 0xC01A0008,
4281
4282 /// The log service encountered an invalid log block version.
4283 LOG_BLOCK_VERSION = 0xC01A0009,
4284
4285 /// The log service encountered an invalid log block.
4286 LOG_BLOCK_INVALID = 0xC01A000A,
4287
4288 /// The log service encountered an attempt to read the log with an invalid read mode.
4289 LOG_READ_MODE_INVALID = 0xC01A000B,
4290
4291 /// The log service encountered a corrupted metadata file.
4292 LOG_METADATA_CORRUPT = 0xC01A000D,
4293
4294 /// The log service encountered a metadata file that could not be created by the log file system.
4295 LOG_METADATA_INVALID = 0xC01A000E,
4296
4297 /// The log service encountered a metadata file with inconsistent data.
4298 LOG_METADATA_INCONSISTENT = 0xC01A000F,
4299
4300 /// The log service encountered an attempt to erroneously allocate or dispose reservation space.
4301 LOG_RESERVATION_INVALID = 0xC01A0010,
4302
4303 /// The log service cannot delete the log file or the file system container.
4304 LOG_CANT_DELETE = 0xC01A0011,
4305
4306 /// The log service has reached the maximum allowable containers allocated to a log file.
4307 LOG_CONTAINER_LIMIT_EXCEEDED = 0xC01A0012,
4308
4309 /// The log service has attempted to read or write backward past the start of the log.
4310 LOG_START_OF_LOG = 0xC01A0013,
4311
4312 /// The log policy could not be installed because a policy of the same type is already present.
4313 LOG_POLICY_ALREADY_INSTALLED = 0xC01A0014,
4314
4315 /// The log policy in question was not installed at the time of the request.
4316 LOG_POLICY_NOT_INSTALLED = 0xC01A0015,
4317
4318 /// The installed set of policies on the log is invalid.
4319 LOG_POLICY_INVALID = 0xC01A0016,
4320
4321 /// A policy on the log in question prevented the operation from completing.
4322 LOG_POLICY_CONFLICT = 0xC01A0017,
4323
4324 /// The log space cannot be reclaimed because the log is pinned by the archive tail.
4325 LOG_PINNED_ARCHIVE_TAIL = 0xC01A0018,
4326
4327 /// The log record is not a record in the log file.
4328 LOG_RECORD_NONEXISTENT = 0xC01A0019,
4329
4330 /// The number of reserved log records or the adjustment of the number of reserved log records is invalid.
4331 LOG_RECORDS_RESERVED_INVALID = 0xC01A001A,
4332
4333 /// The reserved log space or the adjustment of the log space is invalid.
4334 LOG_SPACE_RESERVED_INVALID = 0xC01A001B,
4335
4336 /// A new or existing archive tail or the base of the active log is invalid.
4337 LOG_TAIL_INVALID = 0xC01A001C,
4338
4339 /// The log space is exhausted.
4340 LOG_FULL = 0xC01A001D,
4341
4342 /// The log is multiplexed; no direct writes to the physical log are allowed.
4343 LOG_MULTIPLEXED = 0xC01A001E,
4344
4345 /// The operation failed because the log is dedicated.
4346 LOG_DEDICATED = 0xC01A001F,
4347
4348 /// The operation requires an archive context.
4349 LOG_ARCHIVE_NOT_IN_PROGRESS = 0xC01A0020,
4350
4351 /// Log archival is in progress.
4352 LOG_ARCHIVE_IN_PROGRESS = 0xC01A0021,
4353
4354 /// The operation requires a nonephemeral log, but the log is ephemeral.
4355 LOG_EPHEMERAL = 0xC01A0022,
4356
4357 /// The log must have at least two containers before it can be read from or written to.
4358 LOG_NOT_ENOUGH_CONTAINERS = 0xC01A0023,
4359
4360 /// A log client has already registered on the stream.
4361 LOG_CLIENT_ALREADY_REGISTERED = 0xC01A0024,
4362
4363 /// A log client has not been registered on the stream.
4364 LOG_CLIENT_NOT_REGISTERED = 0xC01A0025,
4365
4366 /// A request has already been made to handle the log full condition.
4367 LOG_FULL_HANDLER_IN_PROGRESS = 0xC01A0026,
4368
4369 /// The log service encountered an error when attempting to read from a log container.
4370 LOG_CONTAINER_READ_FAILED = 0xC01A0027,
4371
4372 /// The log service encountered an error when attempting to write to a log container.
4373 LOG_CONTAINER_WRITE_FAILED = 0xC01A0028,
4374
4375 /// The log service encountered an error when attempting to open a log container.
4376 LOG_CONTAINER_OPEN_FAILED = 0xC01A0029,
4377
4378 /// The log service encountered an invalid container state when attempting a requested action.
4379 LOG_CONTAINER_STATE_INVALID = 0xC01A002A,
4380
4381 /// The log service is not in the correct state to perform a requested action.
4382 LOG_STATE_INVALID = 0xC01A002B,
4383
4384 /// The log space cannot be reclaimed because the log is pinned.
4385 LOG_PINNED = 0xC01A002C,
4386
4387 /// The log metadata flush failed.
4388 LOG_METADATA_FLUSH_FAILED = 0xC01A002D,
4389
4390 /// Security on the log and its containers is inconsistent.
4391 LOG_INCONSISTENT_SECURITY = 0xC01A002E,
4392
4393 /// Records were appended to the log or reservation changes were made, but the log could not be flushed.
4394 LOG_APPENDED_FLUSH_FAILED = 0xC01A002F,
4395
4396 /// The log is pinned due to reservation consuming most of the log space.
4397 /// Free some reserved records to make space available.
4398 LOG_PINNED_RESERVATION = 0xC01A0030,
4399
4400 /// {Display Driver Stopped Responding} The %hs display driver has stopped working normally.
4401 /// Save your work and reboot the system to restore full display functionality.
4402 /// The next time you reboot the computer, a dialog box will allow you to upload data about this failure to Microsoft.
4403 VIDEO_HUNG_DISPLAY_DRIVER_THREAD = 0xC01B00EA,
4404
4405 /// A handler was not defined by the filter for this operation.
4406 FLT_NO_HANDLER_DEFINED = 0xC01C0001,
4407
4408 /// A context is already defined for this object.
4409 FLT_CONTEXT_ALREADY_DEFINED = 0xC01C0002,
4410
4411 /// Asynchronous requests are not valid for this operation.
4412 FLT_INVALID_ASYNCHRONOUS_REQUEST = 0xC01C0003,
4413
4414 /// This is an internal error code used by the filter manager to determine if a fast I/O operation should be forced down the input/output request packet (IRP) path. Minifilters should never return this value.
4415 FLT_DISALLOW_FAST_IO = 0xC01C0004,
4416
4417 /// An invalid name request was made.
4418 /// The name requested cannot be retrieved at this time.
4419 FLT_INVALID_NAME_REQUEST = 0xC01C0005,
4420
4421 /// Posting this operation to a worker thread for further processing is not safe at this time because it could lead to a system deadlock.
4422 FLT_NOT_SAFE_TO_POST_OPERATION = 0xC01C0006,
4423
4424 /// The Filter Manager was not initialized when a filter tried to register.
4425 /// Make sure that the Filter Manager is loaded as a driver.
4426 FLT_NOT_INITIALIZED = 0xC01C0007,
4427
4428 /// The filter is not ready for attachment to volumes because it has not finished initializing (FltStartFiltering has not been called).
4429 FLT_FILTER_NOT_READY = 0xC01C0008,
4430
4431 /// The filter must clean up any operation-specific context at this time because it is being removed from the system before the operation is completed by the lower drivers.
4432 FLT_POST_OPERATION_CLEANUP = 0xC01C0009,
4433
4434 /// The Filter Manager had an internal error from which it cannot recover; therefore, the operation has failed.
4435 /// This is usually the result of a filter returning an invalid value from a pre-operation callback.
4436 FLT_INTERNAL_ERROR = 0xC01C000A,
4437
4438 /// The object specified for this action is in the process of being deleted; therefore, the action requested cannot be completed at this time.
4439 FLT_DELETING_OBJECT = 0xC01C000B,
4440
4441 /// A nonpaged pool must be used for this type of context.
4442 FLT_MUST_BE_NONPAGED_POOL = 0xC01C000C,
4443
4444 /// A duplicate handler definition has been provided for an operation.
4445 FLT_DUPLICATE_ENTRY = 0xC01C000D,
4446
4447 /// The callback data queue has been disabled.
4448 FLT_CBDQ_DISABLED = 0xC01C000E,
4449
4450 /// Do not attach the filter to the volume at this time.
4451 FLT_DO_NOT_ATTACH = 0xC01C000F,
4452
4453 /// Do not detach the filter from the volume at this time.
4454 FLT_DO_NOT_DETACH = 0xC01C0010,
4455
4456 /// An instance already exists at this altitude on the volume specified.
4457 FLT_INSTANCE_ALTITUDE_COLLISION = 0xC01C0011,
4458
4459 /// An instance already exists with this name on the volume specified.
4460 FLT_INSTANCE_NAME_COLLISION = 0xC01C0012,
4461
4462 /// The system could not find the filter specified.
4463 FLT_FILTER_NOT_FOUND = 0xC01C0013,
4464
4465 /// The system could not find the volume specified.
4466 FLT_VOLUME_NOT_FOUND = 0xC01C0014,
4467
4468 /// The system could not find the instance specified.
4469 FLT_INSTANCE_NOT_FOUND = 0xC01C0015,
4470
4471 /// No registered context allocation definition was found for the given request.
4472 FLT_CONTEXT_ALLOCATION_NOT_FOUND = 0xC01C0016,
4473
4474 /// An invalid parameter was specified during context registration.
4475 FLT_INVALID_CONTEXT_REGISTRATION = 0xC01C0017,
4476
4477 /// The name requested was not found in the Filter Manager name cache and could not be retrieved from the file system.
4478 FLT_NAME_CACHE_MISS = 0xC01C0018,
4479
4480 /// The requested device object does not exist for the given volume.
4481 FLT_NO_DEVICE_OBJECT = 0xC01C0019,
4482
4483 /// The specified volume is already mounted.
4484 FLT_VOLUME_ALREADY_MOUNTED = 0xC01C001A,
4485
4486 /// The specified transaction context is already enlisted in a transaction.
4487 FLT_ALREADY_ENLISTED = 0xC01C001B,
4488
4489 /// The specified context is already attached to another object.
4490 FLT_CONTEXT_ALREADY_LINKED = 0xC01C001C,
4491
4492 /// No waiter is present for the filter's reply to this message.
4493 FLT_NO_WAITER_FOR_REPLY = 0xC01C0020,
4494
4495 /// A monitor descriptor could not be obtained.
4496 MONITOR_NO_DESCRIPTOR = 0xC01D0001,
4497
4498 /// This release does not support the format of the obtained monitor descriptor.
4499 MONITOR_UNKNOWN_DESCRIPTOR_FORMAT = 0xC01D0002,
4500
4501 /// The checksum of the obtained monitor descriptor is invalid.
4502 MONITOR_INVALID_DESCRIPTOR_CHECKSUM = 0xC01D0003,
4503
4504 /// The monitor descriptor contains an invalid standard timing block.
4505 MONITOR_INVALID_STANDARD_TIMING_BLOCK = 0xC01D0004,
4506
4507 /// WMI data-block registration failed for one of the MSMonitorClass WMI subclasses.
4508 MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED = 0xC01D0005,
4509
4510 /// The provided monitor descriptor block is either corrupted or does not contain the monitor's detailed serial number.
4511 MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK = 0xC01D0006,
4512
4513 /// The provided monitor descriptor block is either corrupted or does not contain the monitor's user-friendly name.
4514 MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK = 0xC01D0007,
4515
4516 /// There is no monitor descriptor data at the specified (offset or size) region.
4517 MONITOR_NO_MORE_DESCRIPTOR_DATA = 0xC01D0008,
4518
4519 /// The monitor descriptor contains an invalid detailed timing block.
4520 MONITOR_INVALID_DETAILED_TIMING_BLOCK = 0xC01D0009,
4521
4522 /// Monitor descriptor contains invalid manufacture date.
4523 MONITOR_INVALID_MANUFACTURE_DATE = 0xC01D000A,
4524
4525 /// Exclusive mode ownership is needed to create an unmanaged primary allocation.
4526 GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER = 0xC01E0000,
4527
4528 /// The driver needs more DMA buffer space to complete the requested operation.
4529 GRAPHICS_INSUFFICIENT_DMA_BUFFER = 0xC01E0001,
4530
4531 /// The specified display adapter handle is invalid.
4532 GRAPHICS_INVALID_DISPLAY_ADAPTER = 0xC01E0002,
4533
4534 /// The specified display adapter and all of its state have been reset.
4535 GRAPHICS_ADAPTER_WAS_RESET = 0xC01E0003,
4536
4537 /// The driver stack does not match the expected driver model.
4538 GRAPHICS_INVALID_DRIVER_MODEL = 0xC01E0004,
4539
4540 /// Present happened but ended up into the changed desktop mode.
4541 GRAPHICS_PRESENT_MODE_CHANGED = 0xC01E0005,
4542
4543 /// Nothing to present due to desktop occlusion.
4544 GRAPHICS_PRESENT_OCCLUDED = 0xC01E0006,
4545
4546 /// Not able to present due to denial of desktop access.
4547 GRAPHICS_PRESENT_DENIED = 0xC01E0007,
4548
4549 /// Not able to present with color conversion.
4550 GRAPHICS_CANNOTCOLORCONVERT = 0xC01E0008,
4551
4552 /// Present redirection is disabled (desktop windowing management subsystem is off).
4553 GRAPHICS_PRESENT_REDIRECTION_DISABLED = 0xC01E000B,
4554
4555 /// Previous exclusive VidPn source owner has released its ownership
4556 GRAPHICS_PRESENT_UNOCCLUDED = 0xC01E000C,
4557
4558 /// Not enough video memory is available to complete the operation.
4559 GRAPHICS_NO_VIDEO_MEMORY = 0xC01E0100,
4560
4561 /// Could not probe and lock the underlying memory of an allocation.
4562 GRAPHICS_CANT_LOCK_MEMORY = 0xC01E0101,
4563
4564 /// The allocation is currently busy.
4565 GRAPHICS_ALLOCATION_BUSY = 0xC01E0102,
4566
4567 /// An object being referenced has already reached the maximum reference count and cannot be referenced further.
4568 GRAPHICS_TOO_MANY_REFERENCES = 0xC01E0103,
4569
4570 /// A problem could not be solved due to an existing condition. Try again later.
4571 GRAPHICS_TRY_AGAIN_LATER = 0xC01E0104,
4572
4573 /// A problem could not be solved due to an existing condition. Try again now.
4574 GRAPHICS_TRY_AGAIN_NOW = 0xC01E0105,
4575
4576 /// The allocation is invalid.
4577 GRAPHICS_ALLOCATION_INVALID = 0xC01E0106,
4578
4579 /// No more unswizzling apertures are currently available.
4580 GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE = 0xC01E0107,
4581
4582 /// The current allocation cannot be unswizzled by an aperture.
4583 GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED = 0xC01E0108,
4584
4585 /// The request failed because a pinned allocation cannot be evicted.
4586 GRAPHICS_CANT_EVICT_PINNED_ALLOCATION = 0xC01E0109,
4587
4588 /// The allocation cannot be used from its current segment location for the specified operation.
4589 GRAPHICS_INVALID_ALLOCATION_USAGE = 0xC01E0110,
4590
4591 /// A locked allocation cannot be used in the current command buffer.
4592 GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION = 0xC01E0111,
4593
4594 /// The allocation being referenced has been closed permanently.
4595 GRAPHICS_ALLOCATION_CLOSED = 0xC01E0112,
4596
4597 /// An invalid allocation instance is being referenced.
4598 GRAPHICS_INVALID_ALLOCATION_INSTANCE = 0xC01E0113,
4599
4600 /// An invalid allocation handle is being referenced.
4601 GRAPHICS_INVALID_ALLOCATION_HANDLE = 0xC01E0114,
4602
4603 /// The allocation being referenced does not belong to the current device.
4604 GRAPHICS_WRONG_ALLOCATION_DEVICE = 0xC01E0115,
4605
4606 /// The specified allocation lost its content.
4607 GRAPHICS_ALLOCATION_CONTENT_LOST = 0xC01E0116,
4608
4609 /// A GPU exception was detected on the given device. The device cannot be scheduled.
4610 GRAPHICS_GPU_EXCEPTION_ON_DEVICE = 0xC01E0200,
4611
4612 /// The specified VidPN topology is invalid.
4613 GRAPHICS_INVALID_VIDPN_TOPOLOGY = 0xC01E0300,
4614
4615 /// The specified VidPN topology is valid but is not supported by this model of the display adapter.
4616 GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED = 0xC01E0301,
4617
4618 /// The specified VidPN topology is valid but is not currently supported by the display adapter due to allocation of its resources.
4619 GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED = 0xC01E0302,
4620
4621 /// The specified VidPN handle is invalid.
4622 GRAPHICS_INVALID_VIDPN = 0xC01E0303,
4623
4624 /// The specified video present source is invalid.
4625 GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE = 0xC01E0304,
4626
4627 /// The specified video present target is invalid.
4628 GRAPHICS_INVALID_VIDEO_PRESENT_TARGET = 0xC01E0305,
4629
4630 /// The specified VidPN modality is not supported (for example, at least two of the pinned modes are not co-functional).
4631 GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED = 0xC01E0306,
4632
4633 /// The specified VidPN source mode set is invalid.
4634 GRAPHICS_INVALID_VIDPN_SOURCEMODESET = 0xC01E0308,
4635
4636 /// The specified VidPN target mode set is invalid.
4637 GRAPHICS_INVALID_VIDPN_TARGETMODESET = 0xC01E0309,
4638
4639 /// The specified video signal frequency is invalid.
4640 GRAPHICS_INVALID_FREQUENCY = 0xC01E030A,
4641
4642 /// The specified video signal active region is invalid.
4643 GRAPHICS_INVALID_ACTIVE_REGION = 0xC01E030B,
4644
4645 /// The specified video signal total region is invalid.
4646 GRAPHICS_INVALID_TOTAL_REGION = 0xC01E030C,
4647
4648 /// The specified video present source mode is invalid.
4649 GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE = 0xC01E0310,
4650
4651 /// The specified video present target mode is invalid.
4652 GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE = 0xC01E0311,
4653
4654 /// The pinned mode must remain in the set on the VidPN's co-functional modality enumeration.
4655 GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET = 0xC01E0312,
4656
4657 /// The specified video present path is already in the VidPN's topology.
4658 GRAPHICS_PATH_ALREADY_IN_TOPOLOGY = 0xC01E0313,
4659
4660 /// The specified mode is already in the mode set.
4661 GRAPHICS_MODE_ALREADY_IN_MODESET = 0xC01E0314,
4662
4663 /// The specified video present source set is invalid.
4664 GRAPHICS_INVALID_VIDEOPRESENTSOURCESET = 0xC01E0315,
4665
4666 /// The specified video present target set is invalid.
4667 GRAPHICS_INVALID_VIDEOPRESENTTARGETSET = 0xC01E0316,
4668
4669 /// The specified video present source is already in the video present source set.
4670 GRAPHICS_SOURCE_ALREADY_IN_SET = 0xC01E0317,
4671
4672 /// The specified video present target is already in the video present target set.
4673 GRAPHICS_TARGET_ALREADY_IN_SET = 0xC01E0318,
4674
4675 /// The specified VidPN present path is invalid.
4676 GRAPHICS_INVALID_VIDPN_PRESENT_PATH = 0xC01E0319,
4677
4678 /// The miniport has no recommendation for augmenting the specified VidPN's topology.
4679 GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY = 0xC01E031A,
4680
4681 /// The specified monitor frequency range set is invalid.
4682 GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET = 0xC01E031B,
4683
4684 /// The specified monitor frequency range is invalid.
4685 GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE = 0xC01E031C,
4686
4687 /// The specified frequency range is not in the specified monitor frequency range set.
4688 GRAPHICS_FREQUENCYRANGE_NOT_IN_SET = 0xC01E031D,
4689
4690 /// The specified frequency range is already in the specified monitor frequency range set.
4691 GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET = 0xC01E031F,
4692
4693 /// The specified mode set is stale. Reacquire the new mode set.
4694 GRAPHICS_STALE_MODESET = 0xC01E0320,
4695
4696 /// The specified monitor source mode set is invalid.
4697 GRAPHICS_INVALID_MONITOR_SOURCEMODESET = 0xC01E0321,
4698
4699 /// The specified monitor source mode is invalid.
4700 GRAPHICS_INVALID_MONITOR_SOURCE_MODE = 0xC01E0322,
4701
4702 /// The miniport does not have a recommendation regarding the request to provide a functional VidPN given the current display adapter configuration.
4703 GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN = 0xC01E0323,
4704
4705 /// The ID of the specified mode is being used by another mode in the set.
4706 GRAPHICS_MODE_ID_MUST_BE_UNIQUE = 0xC01E0324,
4707
4708 /// The system failed to determine a mode that is supported by both the display adapter and the monitor connected to it.
4709 GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION = 0xC01E0325,
4710
4711 /// The number of video present targets must be greater than or equal to the number of video present sources.
4712 GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES = 0xC01E0326,
4713
4714 /// The specified present path is not in the VidPN's topology.
4715 GRAPHICS_PATH_NOT_IN_TOPOLOGY = 0xC01E0327,
4716
4717 /// The display adapter must have at least one video present source.
4718 GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE = 0xC01E0328,
4719
4720 /// The display adapter must have at least one video present target.
4721 GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET = 0xC01E0329,
4722
4723 /// The specified monitor descriptor set is invalid.
4724 GRAPHICS_INVALID_MONITORDESCRIPTORSET = 0xC01E032A,
4725
4726 /// The specified monitor descriptor is invalid.
4727 GRAPHICS_INVALID_MONITORDESCRIPTOR = 0xC01E032B,
4728
4729 /// The specified descriptor is not in the specified monitor descriptor set.
4730 GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET = 0xC01E032C,
4731
4732 /// The specified descriptor is already in the specified monitor descriptor set.
4733 GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET = 0xC01E032D,
4734
4735 /// The ID of the specified monitor descriptor is being used by another descriptor in the set.
4736 GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE = 0xC01E032E,
4737
4738 /// The specified video present target subset type is invalid.
4739 GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE = 0xC01E032F,
4740
4741 /// Two or more of the specified resources are not related to each other, as defined by the interface semantics.
4742 GRAPHICS_RESOURCES_NOT_RELATED = 0xC01E0330,
4743
4744 /// The ID of the specified video present source is being used by another source in the set.
4745 GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE = 0xC01E0331,
4746
4747 /// The ID of the specified video present target is being used by another target in the set.
4748 GRAPHICS_TARGET_ID_MUST_BE_UNIQUE = 0xC01E0332,
4749
4750 /// The specified VidPN source cannot be used because there is no available VidPN target to connect it to.
4751 GRAPHICS_NO_AVAILABLE_VIDPN_TARGET = 0xC01E0333,
4752
4753 /// The newly arrived monitor could not be associated with a display adapter.
4754 GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER = 0xC01E0334,
4755
4756 /// The particular display adapter does not have an associated VidPN manager.
4757 GRAPHICS_NO_VIDPNMGR = 0xC01E0335,
4758
4759 /// The VidPN manager of the particular display adapter does not have an active VidPN.
4760 GRAPHICS_NO_ACTIVE_VIDPN = 0xC01E0336,
4761
4762 /// The specified VidPN topology is stale; obtain the new topology.
4763 GRAPHICS_STALE_VIDPN_TOPOLOGY = 0xC01E0337,
4764
4765 /// No monitor is connected on the specified video present target.
4766 GRAPHICS_MONITOR_NOT_CONNECTED = 0xC01E0338,
4767
4768 /// The specified source is not part of the specified VidPN's topology.
4769 GRAPHICS_SOURCE_NOT_IN_TOPOLOGY = 0xC01E0339,
4770
4771 /// The specified primary surface size is invalid.
4772 GRAPHICS_INVALID_PRIMARYSURFACE_SIZE = 0xC01E033A,
4773
4774 /// The specified visible region size is invalid.
4775 GRAPHICS_INVALID_VISIBLEREGION_SIZE = 0xC01E033B,
4776
4777 /// The specified stride is invalid.
4778 GRAPHICS_INVALID_STRIDE = 0xC01E033C,
4779
4780 /// The specified pixel format is invalid.
4781 GRAPHICS_INVALID_PIXELFORMAT = 0xC01E033D,
4782
4783 /// The specified color basis is invalid.
4784 GRAPHICS_INVALID_COLORBASIS = 0xC01E033E,
4785
4786 /// The specified pixel value access mode is invalid.
4787 GRAPHICS_INVALID_PIXELVALUEACCESSMODE = 0xC01E033F,
4788
4789 /// The specified target is not part of the specified VidPN's topology.
4790 GRAPHICS_TARGET_NOT_IN_TOPOLOGY = 0xC01E0340,
4791
4792 /// Failed to acquire the display mode management interface.
4793 GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT = 0xC01E0341,
4794
4795 /// The specified VidPN source is already owned by a DMM client and cannot be used until that client releases it.
4796 GRAPHICS_VIDPN_SOURCE_IN_USE = 0xC01E0342,
4797
4798 /// The specified VidPN is active and cannot be accessed.
4799 GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN = 0xC01E0343,
4800
4801 /// The specified VidPN's present path importance ordinal is invalid.
4802 GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL = 0xC01E0344,
4803
4804 /// The specified VidPN's present path content geometry transformation is invalid.
4805 GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION = 0xC01E0345,
4806
4807 /// The specified content geometry transformation is not supported on the respective VidPN present path.
4808 GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED = 0xC01E0346,
4809
4810 /// The specified gamma ramp is invalid.
4811 GRAPHICS_INVALID_GAMMA_RAMP = 0xC01E0347,
4812
4813 /// The specified gamma ramp is not supported on the respective VidPN present path.
4814 GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED = 0xC01E0348,
4815
4816 /// Multisampling is not supported on the respective VidPN present path.
4817 GRAPHICS_MULTISAMPLING_NOT_SUPPORTED = 0xC01E0349,
4818
4819 /// The specified mode is not in the specified mode set.
4820 GRAPHICS_MODE_NOT_IN_MODESET = 0xC01E034A,
4821
4822 /// The specified VidPN topology recommendation reason is invalid.
4823 GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON = 0xC01E034D,
4824
4825 /// The specified VidPN present path content type is invalid.
4826 GRAPHICS_INVALID_PATH_CONTENT_TYPE = 0xC01E034E,
4827
4828 /// The specified VidPN present path copy protection type is invalid.
4829 GRAPHICS_INVALID_COPYPROTECTION_TYPE = 0xC01E034F,
4830
4831 /// Only one unassigned mode set can exist at any one time for a particular VidPN source or target.
4832 GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS = 0xC01E0350,
4833
4834 /// The specified scan line ordering type is invalid.
4835 GRAPHICS_INVALID_SCANLINE_ORDERING = 0xC01E0352,
4836
4837 /// The topology changes are not allowed for the specified VidPN.
4838 GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED = 0xC01E0353,
4839
4840 /// All available importance ordinals are being used in the specified topology.
4841 GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS = 0xC01E0354,
4842
4843 /// The specified primary surface has a different private-format attribute than the current primary surface.
4844 GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT = 0xC01E0355,
4845
4846 /// The specified mode-pruning algorithm is invalid.
4847 GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM = 0xC01E0356,
4848
4849 /// The specified monitor-capability origin is invalid.
4850 GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN = 0xC01E0357,
4851
4852 /// The specified monitor-frequency range constraint is invalid.
4853 GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT = 0xC01E0358,
4854
4855 /// The maximum supported number of present paths has been reached.
4856 GRAPHICS_MAX_NUM_PATHS_REACHED = 0xC01E0359,
4857
4858 /// The miniport requested that augmentation be canceled for the specified source of the specified VidPN's topology.
4859 GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION = 0xC01E035A,
4860
4861 /// The specified client type was not recognized.
4862 GRAPHICS_INVALID_CLIENT_TYPE = 0xC01E035B,
4863
4864 /// The client VidPN is not set on this adapter (for example, no user mode-initiated mode changes have taken place on this adapter).
4865 GRAPHICS_CLIENTVIDPN_NOT_SET = 0xC01E035C,
4866
4867 /// The specified display adapter child device already has an external device connected to it.
4868 GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED = 0xC01E0400,
4869
4870 /// The display adapter child device does not support reporting a descriptor.
4871 GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED = 0xC01E0401,
4872
4873 /// The display adapter is not linked to any other adapters.
4874 GRAPHICS_NOT_A_LINKED_ADAPTER = 0xC01E0430,
4875
4876 /// The lead adapter in a linked configuration was not enumerated yet.
4877 GRAPHICS_LEADLINK_NOT_ENUMERATED = 0xC01E0431,
4878
4879 /// Some chain adapters in a linked configuration have not yet been enumerated.
4880 GRAPHICS_CHAINLINKS_NOT_ENUMERATED = 0xC01E0432,
4881
4882 /// The chain of linked adapters is not ready to start because of an unknown failure.
4883 GRAPHICS_ADAPTER_CHAIN_NOT_READY = 0xC01E0433,
4884
4885 /// An attempt was made to start a lead link display adapter when the chain links had not yet started.
4886 GRAPHICS_CHAINLINKS_NOT_STARTED = 0xC01E0434,
4887
4888 /// An attempt was made to turn on a lead link display adapter when the chain links were turned off.
4889 GRAPHICS_CHAINLINKS_NOT_POWERED_ON = 0xC01E0435,
4890
4891 /// The adapter link was found in an inconsistent state.
4892 /// Not all adapters are in an expected PNP/power state.
4893 GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE = 0xC01E0436,
4894
4895 /// The driver trying to start is not the same as the driver for the posted display adapter.
4896 GRAPHICS_NOT_POST_DEVICE_DRIVER = 0xC01E0438,
4897
4898 /// An operation is being attempted that requires the display adapter to be in a quiescent state.
4899 GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED = 0xC01E043B,
4900
4901 /// The driver does not support OPM.
4902 GRAPHICS_OPM_NOT_SUPPORTED = 0xC01E0500,
4903
4904 /// The driver does not support COPP.
4905 GRAPHICS_COPP_NOT_SUPPORTED = 0xC01E0501,
4906
4907 /// The driver does not support UAB.
4908 GRAPHICS_UAB_NOT_SUPPORTED = 0xC01E0502,
4909
4910 /// The specified encrypted parameters are invalid.
4911 GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS = 0xC01E0503,
4912
4913 /// An array passed to a function cannot hold all of the data that the function wants to put in it.
4914 GRAPHICS_OPM_PARAMETER_ARRAY_TOO_SMALL = 0xC01E0504,
4915
4916 /// The GDI display device passed to this function does not have any active protected outputs.
4917 GRAPHICS_OPM_NO_PROTECTED_OUTPUTS_EXIST = 0xC01E0505,
4918
4919 /// The PVP cannot find an actual GDI display device that corresponds to the passed-in GDI display device name.
4920 GRAPHICS_PVP_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME = 0xC01E0506,
4921
4922 /// This function failed because the GDI display device passed to it was not attached to the Windows desktop.
4923 GRAPHICS_PVP_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP = 0xC01E0507,
4924
4925 /// The PVP does not support mirroring display devices because they do not have any protected outputs.
4926 GRAPHICS_PVP_MIRRORING_DEVICES_NOT_SUPPORTED = 0xC01E0508,
4927
4928 /// The function failed because an invalid pointer parameter was passed to it.
4929 /// A pointer parameter is invalid if it is null, is not correctly aligned, or it points to an invalid address or a kernel mode address.
4930 GRAPHICS_OPM_INVALID_POINTER = 0xC01E050A,
4931
4932 /// An internal error caused an operation to fail.
4933 GRAPHICS_OPM_INTERNAL_ERROR = 0xC01E050B,
4934
4935 /// The function failed because the caller passed in an invalid OPM user-mode handle.
4936 GRAPHICS_OPM_INVALID_HANDLE = 0xC01E050C,
4937
4938 /// This function failed because the GDI device passed to it did not have any monitors associated with it.
4939 GRAPHICS_PVP_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE = 0xC01E050D,
4940
4941 /// A certificate could not be returned because the certificate buffer passed to the function was too small.
4942 GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH = 0xC01E050E,
4943
4944 /// DxgkDdiOpmCreateProtectedOutput() could not create a protected output because the video present yarget is in spanning mode.
4945 GRAPHICS_OPM_SPANNING_MODE_ENABLED = 0xC01E050F,
4946
4947 /// DxgkDdiOpmCreateProtectedOutput() could not create a protected output because the video present target is in theater mode.
4948 GRAPHICS_OPM_THEATER_MODE_ENABLED = 0xC01E0510,
4949
4950 /// The function call failed because the display adapter's hardware functionality scan (HFS) failed to validate the graphics hardware.
4951 GRAPHICS_PVP_HFS_FAILED = 0xC01E0511,
4952
4953 /// The HDCP SRM passed to this function did not comply with section 5 of the HDCP 1.1 specification.
4954 GRAPHICS_OPM_INVALID_SRM = 0xC01E0512,
4955
4956 /// The protected output cannot enable the HDCP system because it does not support it.
4957 GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP = 0xC01E0513,
4958
4959 /// The protected output cannot enable analog copy protection because it does not support it.
4960 GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP = 0xC01E0514,
4961
4962 /// The protected output cannot enable the CGMS-A protection technology because it does not support it.
4963 GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA = 0xC01E0515,
4964
4965 /// DxgkDdiOPMGetInformation() cannot return the version of the SRM being used because the application never successfully passed an SRM to the protected output.
4966 GRAPHICS_OPM_HDCP_SRM_NEVER_SET = 0xC01E0516,
4967
4968 /// DxgkDdiOPMConfigureProtectedOutput() cannot enable the specified output protection technology because the output's screen resolution is too high.
4969 GRAPHICS_OPM_RESOLUTION_TOO_HIGH = 0xC01E0517,
4970
4971 /// DxgkDdiOPMConfigureProtectedOutput() cannot enable HDCP because other physical outputs are using the display adapter's HDCP hardware.
4972 GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE = 0xC01E0518,
4973
4974 /// The operating system asynchronously destroyed this OPM-protected output because the operating system state changed.
4975 /// This error typically occurs because the monitor PDO associated with this protected output was removed or stopped, the protected output's session became a nonconsole session, or the protected output's desktop became inactive.
4976 GRAPHICS_OPM_PROTECTED_OUTPUT_NO_LONGER_EXISTS = 0xC01E051A,
4977
4978 /// OPM functions cannot be called when a session is changing its type.
4979 /// Three types of sessions currently exist: console, disconnected, and remote (RDP or ICA).
4980 GRAPHICS_OPM_SESSION_TYPE_CHANGE_IN_PROGRESS = 0xC01E051B,
4981
4982 /// The DxgkDdiOPMGetCOPPCompatibleInformation, DxgkDdiOPMGetInformation, or DxgkDdiOPMConfigureProtectedOutput function failed.
4983 /// This error is returned only if a protected output has OPM semantics.
4984 /// DxgkDdiOPMGetCOPPCompatibleInformation always returns this error if a protected output has OPM semantics.
4985 /// DxgkDdiOPMGetInformation returns this error code if the caller requested COPP-specific information.
4986 /// DxgkDdiOPMConfigureProtectedOutput returns this error when the caller tries to use a COPP-specific command.
4987 GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS = 0xC01E051C,
4988
4989 /// The DxgkDdiOPMGetInformation and DxgkDdiOPMGetCOPPCompatibleInformation functions return this error code if the passed-in sequence number is not the expected sequence number or the passed-in OMAC value is invalid.
4990 GRAPHICS_OPM_INVALID_INFORMATION_REQUEST = 0xC01E051D,
4991
4992 /// The function failed because an unexpected error occurred inside a display driver.
4993 GRAPHICS_OPM_DRIVER_INTERNAL_ERROR = 0xC01E051E,
4994
4995 /// The DxgkDdiOPMGetCOPPCompatibleInformation, DxgkDdiOPMGetInformation, or DxgkDdiOPMConfigureProtectedOutput function failed.
4996 /// This error is returned only if a protected output has COPP semantics.
4997 /// DxgkDdiOPMGetCOPPCompatibleInformation returns this error code if the caller requested OPM-specific information.
4998 /// DxgkDdiOPMGetInformation always returns this error if a protected output has COPP semantics.
4999 /// DxgkDdiOPMConfigureProtectedOutput returns this error when the caller tries to use an OPM-specific command.
5000 GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS = 0xC01E051F,
5001
5002 /// The DxgkDdiOPMGetCOPPCompatibleInformation and DxgkDdiOPMConfigureProtectedOutput functions return this error if the display driver does not support the DXGKMDT_OPM_GET_ACP_AND_CGMSA_SIGNALING and DXGKMDT_OPM_SET_ACP_AND_CGMSA_SIGNALING GUIDs.
5003 GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED = 0xC01E0520,
5004
5005 /// The DxgkDdiOPMConfigureProtectedOutput function returns this error code if the passed-in sequence number is not the expected sequence number or the passed-in OMAC value is invalid.
5006 GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST = 0xC01E0521,
5007
5008 /// The monitor connected to the specified video output does not have an I2C bus.
5009 GRAPHICS_I2C_NOT_SUPPORTED = 0xC01E0580,
5010
5011 /// No device on the I2C bus has the specified address.
5012 GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST = 0xC01E0581,
5013
5014 /// An error occurred while transmitting data to the device on the I2C bus.
5015 GRAPHICS_I2C_ERROR_TRANSMITTING_DATA = 0xC01E0582,
5016
5017 /// An error occurred while receiving data from the device on the I2C bus.
5018 GRAPHICS_I2C_ERROR_RECEIVING_DATA = 0xC01E0583,
5019
5020 /// The monitor does not support the specified VCP code.
5021 GRAPHICS_DDCCI_VCP_NOT_SUPPORTED = 0xC01E0584,
5022
5023 /// The data received from the monitor is invalid.
5024 GRAPHICS_DDCCI_INVALID_DATA = 0xC01E0585,
5025
5026 /// A function call failed because a monitor returned an invalid timing status byte when the operating system used the DDC/CI get timing report and timing message command to get a timing report from a monitor.
5027 GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE = 0xC01E0586,
5028
5029 /// A monitor returned a DDC/CI capabilities string that did not comply with the ACCESS.bus 3.0, DDC/CI 1.1, or MCCS 2 Revision 1 specification.
5030 GRAPHICS_DDCCI_INVALID_CAPABILITIES_STRING = 0xC01E0587,
5031
5032 /// An internal error caused an operation to fail.
5033 GRAPHICS_MCA_INTERNAL_ERROR = 0xC01E0588,
5034
5035 /// An operation failed because a DDC/CI message had an invalid value in its command field.
5036 GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND = 0xC01E0589,
5037
5038 /// This error occurred because a DDC/CI message had an invalid value in its length field.
5039 GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH = 0xC01E058A,
5040
5041 /// This error occurred because the value in a DDC/CI message's checksum field did not match the message's computed checksum value.
5042 /// This error implies that the data was corrupted while it was being transmitted from a monitor to a computer.
5043 GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM = 0xC01E058B,
5044
5045 /// This function failed because an invalid monitor handle was passed to it.
5046 GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE = 0xC01E058C,
5047
5048 /// The operating system asynchronously destroyed the monitor that corresponds to this handle because the operating system's state changed.
5049 /// This error typically occurs because the monitor PDO associated with this handle was removed or stopped, or a display mode change occurred.
5050 /// A display mode change occurs when Windows sends a WM_DISPLAYCHANGE message to applications.
5051 GRAPHICS_MONITOR_NO_LONGER_EXISTS = 0xC01E058D,
5052
5053 /// This function can be used only if a program is running in the local console session.
5054 /// It cannot be used if a program is running on a remote desktop session or on a terminal server session.
5055 GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED = 0xC01E05E0,
5056
5057 /// This function cannot find an actual GDI display device that corresponds to the specified GDI display device name.
5058 GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME = 0xC01E05E1,
5059
5060 /// The function failed because the specified GDI display device was not attached to the Windows desktop.
5061 GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP = 0xC01E05E2,
5062
5063 /// This function does not support GDI mirroring display devices because GDI mirroring display devices do not have any physical monitors associated with them.
5064 GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED = 0xC01E05E3,
5065
5066 /// The function failed because an invalid pointer parameter was passed to it.
5067 /// A pointer parameter is invalid if it is null, is not correctly aligned, or points to an invalid address or to a kernel mode address.
5068 GRAPHICS_INVALID_POINTER = 0xC01E05E4,
5069
5070 /// This function failed because the GDI device passed to it did not have a monitor associated with it.
5071 GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE = 0xC01E05E5,
5072
5073 /// An array passed to the function cannot hold all of the data that the function must copy into the array.
5074 GRAPHICS_PARAMETER_ARRAY_TOO_SMALL = 0xC01E05E6,
5075
5076 /// An internal error caused an operation to fail.
5077 GRAPHICS_INTERNAL_ERROR = 0xC01E05E7,
5078
5079 /// The function failed because the current session is changing its type.
5080 /// This function cannot be called when the current session is changing its type.
5081 /// Three types of sessions currently exist: console, disconnected, and remote (RDP or ICA).
5082 GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS = 0xC01E05E8,
5083
5084 /// The volume must be unlocked before it can be used.
5085 FVE_LOCKED_VOLUME = 0xC0210000,
5086
5087 /// The volume is fully decrypted and no key is available.
5088 FVE_NOT_ENCRYPTED = 0xC0210001,
5089
5090 /// The control block for the encrypted volume is not valid.
5091 FVE_BAD_INFORMATION = 0xC0210002,
5092
5093 /// Not enough free space remains on the volume to allow encryption.
5094 FVE_TOO_SMALL = 0xC0210003,
5095
5096 /// The partition cannot be encrypted because the file system is not supported.
5097 FVE_FAILED_WRONG_FS = 0xC0210004,
5098
5099 /// The file system is inconsistent. Run the Check Disk utility.
5100 FVE_FAILED_BAD_FS = 0xC0210005,
5101
5102 /// The file system does not extend to the end of the volume.
5103 FVE_FS_NOT_EXTENDED = 0xC0210006,
5104
5105 /// This operation cannot be performed while a file system is mounted on the volume.
5106 FVE_FS_MOUNTED = 0xC0210007,
5107
5108 /// BitLocker Drive Encryption is not included with this version of Windows.
5109 FVE_NO_LICENSE = 0xC0210008,
5110
5111 /// The requested action was denied by the FVE control engine.
5112 FVE_ACTION_NOT_ALLOWED = 0xC0210009,
5113
5114 /// The data supplied is malformed.
5115 FVE_BAD_DATA = 0xC021000A,
5116
5117 /// The volume is not bound to the system.
5118 FVE_VOLUME_NOT_BOUND = 0xC021000B,
5119
5120 /// The volume specified is not a data volume.
5121 FVE_NOT_DATA_VOLUME = 0xC021000C,
5122
5123 /// A read operation failed while converting the volume.
5124 FVE_CONV_READ_ERROR = 0xC021000D,
5125
5126 /// A write operation failed while converting the volume.
5127 FVE_CONV_WRITE_ERROR = 0xC021000E,
5128
5129 /// The control block for the encrypted volume was updated by another thread. Try again.
5130 FVE_OVERLAPPED_UPDATE = 0xC021000F,
5131
5132 /// The volume encryption algorithm cannot be used on this sector size.
5133 FVE_FAILED_SECTOR_SIZE = 0xC0210010,
5134
5135 /// BitLocker recovery authentication failed.
5136 FVE_FAILED_AUTHENTICATION = 0xC0210011,
5137
5138 /// The volume specified is not the boot operating system volume.
5139 FVE_NOT_OS_VOLUME = 0xC0210012,
5140
5141 /// The BitLocker startup key or recovery password could not be read from external media.
5142 FVE_KEYFILE_NOT_FOUND = 0xC0210013,
5143
5144 /// The BitLocker startup key or recovery password file is corrupt or invalid.
5145 FVE_KEYFILE_INVALID = 0xC0210014,
5146
5147 /// The BitLocker encryption key could not be obtained from the startup key or the recovery password.
5148 FVE_KEYFILE_NO_VMK = 0xC0210015,
5149
5150 /// The TPM is disabled.
5151 FVE_TPM_DISABLED = 0xC0210016,
5152
5153 /// The authorization data for the SRK of the TPM is not zero.
5154 FVE_TPM_SRK_AUTH_NOT_ZERO = 0xC0210017,
5155
5156 /// The system boot information changed or the TPM locked out access to BitLocker encryption keys until the computer is restarted.
5157 FVE_TPM_INVALID_PCR = 0xC0210018,
5158
5159 /// The BitLocker encryption key could not be obtained from the TPM.
5160 FVE_TPM_NO_VMK = 0xC0210019,
5161
5162 /// The BitLocker encryption key could not be obtained from the TPM and PIN.
5163 FVE_PIN_INVALID = 0xC021001A,
5164
5165 /// A boot application hash does not match the hash computed when BitLocker was turned on.
5166 FVE_AUTH_INVALID_APPLICATION = 0xC021001B,
5167
5168 /// The Boot Configuration Data (BCD) settings are not supported or have changed because BitLocker was enabled.
5169 FVE_AUTH_INVALID_CONFIG = 0xC021001C,
5170
5171 /// Boot debugging is enabled. Run Windows Boot Configuration Data Store Editor (bcdedit.exe) to turn it off.
5172 FVE_DEBUGGER_ENABLED = 0xC021001D,
5173
5174 /// The BitLocker encryption key could not be obtained.
5175 FVE_DRY_RUN_FAILED = 0xC021001E,
5176
5177 /// The metadata disk region pointer is incorrect.
5178 FVE_BAD_METADATA_POINTER = 0xC021001F,
5179
5180 /// The backup copy of the metadata is out of date.
5181 FVE_OLD_METADATA_COPY = 0xC0210020,
5182
5183 /// No action was taken because a system restart is required.
5184 FVE_REBOOT_REQUIRED = 0xC0210021,
5185
5186 /// No action was taken because BitLocker Drive Encryption is in RAW access mode.
5187 FVE_RAW_ACCESS = 0xC0210022,
5188
5189 /// BitLocker Drive Encryption cannot enter RAW access mode for this volume.
5190 FVE_RAW_BLOCKED = 0xC0210023,
5191
5192 /// This feature of BitLocker Drive Encryption is not included with this version of Windows.
5193 FVE_NO_FEATURE_LICENSE = 0xC0210026,
5194
5195 /// Group policy does not permit turning off BitLocker Drive Encryption on roaming data volumes.
5196 FVE_POLICY_USER_DISABLE_RDV_NOT_ALLOWED = 0xC0210027,
5197
5198 /// Bitlocker Drive Encryption failed to recover from aborted conversion.
5199 /// This could be due to either all conversion logs being corrupted or the media being write-protected.
5200 FVE_CONV_RECOVERY_FAILED = 0xC0210028,
5201
5202 /// The requested virtualization size is too big.
5203 FVE_VIRTUALIZED_SPACE_TOO_BIG = 0xC0210029,
5204
5205 /// The drive is too small to be protected using BitLocker Drive Encryption.
5206 FVE_VOLUME_TOO_SMALL = 0xC0210030,
5207
5208 /// The callout does not exist.
5209 FWP_CALLOUT_NOT_FOUND = 0xC0220001,
5210
5211 /// The filter condition does not exist.
5212 FWP_CONDITION_NOT_FOUND = 0xC0220002,
5213
5214 /// The filter does not exist.
5215 FWP_FILTER_NOT_FOUND = 0xC0220003,
5216
5217 /// The layer does not exist.
5218 FWP_LAYER_NOT_FOUND = 0xC0220004,
5219
5220 /// The provider does not exist.
5221 FWP_PROVIDER_NOT_FOUND = 0xC0220005,
5222
5223 /// The provider context does not exist.
5224 FWP_PROVIDER_CONTEXT_NOT_FOUND = 0xC0220006,
5225
5226 /// The sublayer does not exist.
5227 FWP_SUBLAYER_NOT_FOUND = 0xC0220007,
5228
5229 /// The object does not exist.
5230 FWP_NOT_FOUND = 0xC0220008,
5231
5232 /// An object with that GUID or LUID already exists.
5233 FWP_ALREADY_EXISTS = 0xC0220009,
5234
5235 /// The object is referenced by other objects and cannot be deleted.
5236 FWP_IN_USE = 0xC022000A,
5237
5238 /// The call is not allowed from within a dynamic session.
5239 FWP_DYNAMIC_SESSION_IN_PROGRESS = 0xC022000B,
5240
5241 /// The call was made from the wrong session and cannot be completed.
5242 FWP_WRONG_SESSION = 0xC022000C,
5243
5244 /// The call must be made from within an explicit transaction.
5245 FWP_NO_TXN_IN_PROGRESS = 0xC022000D,
5246
5247 /// The call is not allowed from within an explicit transaction.
5248 FWP_TXN_IN_PROGRESS = 0xC022000E,
5249
5250 /// The explicit transaction has been forcibly canceled.
5251 FWP_TXN_ABORTED = 0xC022000F,
5252
5253 /// The session has been canceled.
5254 FWP_SESSION_ABORTED = 0xC0220010,
5255
5256 /// The call is not allowed from within a read-only transaction.
5257 FWP_INCOMPATIBLE_TXN = 0xC0220011,
5258
5259 /// The call timed out while waiting to acquire the transaction lock.
5260 FWP_TIMEOUT = 0xC0220012,
5261
5262 /// The collection of network diagnostic events is disabled.
5263 FWP_NET_EVENTS_DISABLED = 0xC0220013,
5264
5265 /// The operation is not supported by the specified layer.
5266 FWP_INCOMPATIBLE_LAYER = 0xC0220014,
5267
5268 /// The call is allowed for kernel-mode callers only.
5269 FWP_KM_CLIENTS_ONLY = 0xC0220015,
5270
5271 /// The call tried to associate two objects with incompatible lifetimes.
5272 FWP_LIFETIME_MISMATCH = 0xC0220016,
5273
5274 /// The object is built-in and cannot be deleted.
5275 FWP_BUILTIN_OBJECT = 0xC0220017,
5276
5277 /// The maximum number of boot-time filters has been reached.
5278 FWP_TOO_MANY_BOOTTIME_FILTERS = 0xC0220018,
5279
5280 /// The maximum number of callouts has been reached.
5281 FWP_TOO_MANY_CALLOUTS = 0xC0220018,
5282
5283 /// A notification could not be delivered because a message queue has reached maximum capacity.
5284 FWP_NOTIFICATION_DROPPED = 0xC0220019,
5285
5286 /// The traffic parameters do not match those for the security association context.
5287 FWP_TRAFFIC_MISMATCH = 0xC022001A,
5288
5289 /// The call is not allowed for the current security association state.
5290 FWP_INCOMPATIBLE_SA_STATE = 0xC022001B,
5291
5292 /// A required pointer is null.
5293 FWP_NULL_POINTER = 0xC022001C,
5294
5295 /// An enumerator is not valid.
5296 FWP_INVALID_ENUMERATOR = 0xC022001D,
5297
5298 /// The flags field contains an invalid value.
5299 FWP_INVALID_FLAGS = 0xC022001E,
5300
5301 /// A network mask is not valid.
5302 FWP_INVALID_NET_MASK = 0xC022001F,
5303
5304 /// An FWP_RANGE is not valid.
5305 FWP_INVALID_RANGE = 0xC0220020,
5306
5307 /// The time interval is not valid.
5308 FWP_INVALID_INTERVAL = 0xC0220021,
5309
5310 /// An array that must contain at least one element has a zero length.
5311 FWP_ZERO_LENGTH_ARRAY = 0xC0220022,
5312
5313 /// The displayData.name field cannot be null.
5314 FWP_NULL_DISPLAY_NAME = 0xC0220023,
5315
5316 /// The action type is not one of the allowed action types for a filter.
5317 FWP_INVALID_ACTION_TYPE = 0xC0220024,
5318
5319 /// The filter weight is not valid.
5320 FWP_INVALID_WEIGHT = 0xC0220025,
5321
5322 /// A filter condition contains a match type that is not compatible with the operands.
5323 FWP_MATCH_TYPE_MISMATCH = 0xC0220026,
5324
5325 /// An FWP_VALUE or FWPM_CONDITION_VALUE is of the wrong type.
5326 FWP_TYPE_MISMATCH = 0xC0220027,
5327
5328 /// An integer value is outside the allowed range.
5329 FWP_OUT_OF_BOUNDS = 0xC0220028,
5330
5331 /// A reserved field is nonzero.
5332 FWP_RESERVED = 0xC0220029,
5333
5334 /// A filter cannot contain multiple conditions operating on a single field.
5335 FWP_DUPLICATE_CONDITION = 0xC022002A,
5336
5337 /// A policy cannot contain the same keying module more than once.
5338 FWP_DUPLICATE_KEYMOD = 0xC022002B,
5339
5340 /// The action type is not compatible with the layer.
5341 FWP_ACTION_INCOMPATIBLE_WITH_LAYER = 0xC022002C,
5342
5343 /// The action type is not compatible with the sublayer.
5344 FWP_ACTION_INCOMPATIBLE_WITH_SUBLAYER = 0xC022002D,
5345
5346 /// The raw context or the provider context is not compatible with the layer.
5347 FWP_CONTEXT_INCOMPATIBLE_WITH_LAYER = 0xC022002E,
5348
5349 /// The raw context or the provider context is not compatible with the callout.
5350 FWP_CONTEXT_INCOMPATIBLE_WITH_CALLOUT = 0xC022002F,
5351
5352 /// The authentication method is not compatible with the policy type.
5353 FWP_INCOMPATIBLE_AUTH_METHOD = 0xC0220030,
5354
5355 /// The Diffie-Hellman group is not compatible with the policy type.
5356 FWP_INCOMPATIBLE_DH_GROUP = 0xC0220031,
5357
5358 /// An IKE policy cannot contain an Extended Mode policy.
5359 FWP_EM_NOT_SUPPORTED = 0xC0220032,
5360
5361 /// The enumeration template or subscription will never match any objects.
5362 FWP_NEVER_MATCH = 0xC0220033,
5363
5364 /// The provider context is of the wrong type.
5365 FWP_PROVIDER_CONTEXT_MISMATCH = 0xC0220034,
5366
5367 /// The parameter is incorrect.
5368 FWP_INVALID_PARAMETER = 0xC0220035,
5369
5370 /// The maximum number of sublayers has been reached.
5371 FWP_TOO_MANY_SUBLAYERS = 0xC0220036,
5372
5373 /// The notification function for a callout returned an error.
5374 FWP_CALLOUT_NOTIFICATION_FAILED = 0xC0220037,
5375
5376 /// The IPsec authentication configuration is not compatible with the authentication type.
5377 FWP_INCOMPATIBLE_AUTH_CONFIG = 0xC0220038,
5378
5379 /// The IPsec cipher configuration is not compatible with the cipher type.
5380 FWP_INCOMPATIBLE_CIPHER_CONFIG = 0xC0220039,
5381
5382 /// A policy cannot contain the same auth method more than once.
5383 FWP_DUPLICATE_AUTH_METHOD = 0xC022003C,
5384
5385 /// The TCP/IP stack is not ready.
5386 FWP_TCPIP_NOT_READY = 0xC0220100,
5387
5388 /// The injection handle is being closed by another thread.
5389 FWP_INJECT_HANDLE_CLOSING = 0xC0220101,
5390
5391 /// The injection handle is stale.
5392 FWP_INJECT_HANDLE_STALE = 0xC0220102,
5393
5394 /// The classify cannot be pended.
5395 FWP_CANNOT_PEND = 0xC0220103,
5396
5397 /// The binding to the network interface is being closed.
5398 NDIS_CLOSING = 0xC0230002,
5399
5400 /// An invalid version was specified.
5401 NDIS_BAD_VERSION = 0xC0230004,
5402
5403 /// An invalid characteristics table was used.
5404 NDIS_BAD_CHARACTERISTICS = 0xC0230005,
5405
5406 /// Failed to find the network interface or the network interface is not ready.
5407 NDIS_ADAPTER_NOT_FOUND = 0xC0230006,
5408
5409 /// Failed to open the network interface.
5410 NDIS_OPEN_FAILED = 0xC0230007,
5411
5412 /// The network interface has encountered an internal unrecoverable failure.
5413 NDIS_DEVICE_FAILED = 0xC0230008,
5414
5415 /// The multicast list on the network interface is full.
5416 NDIS_MULTICAST_FULL = 0xC0230009,
5417
5418 /// An attempt was made to add a duplicate multicast address to the list.
5419 NDIS_MULTICAST_EXISTS = 0xC023000A,
5420
5421 /// At attempt was made to remove a multicast address that was never added.
5422 NDIS_MULTICAST_NOT_FOUND = 0xC023000B,
5423
5424 /// The network interface aborted the request.
5425 NDIS_REQUEST_ABORTED = 0xC023000C,
5426
5427 /// The network interface cannot process the request because it is being reset.
5428 NDIS_RESET_IN_PROGRESS = 0xC023000D,
5429
5430 /// An attempt was made to send an invalid packet on a network interface.
5431 NDIS_INVALID_PACKET = 0xC023000F,
5432
5433 /// The specified request is not a valid operation for the target device.
5434 NDIS_INVALID_DEVICE_REQUEST = 0xC0230010,
5435
5436 /// The network interface is not ready to complete this operation.
5437 NDIS_ADAPTER_NOT_READY = 0xC0230011,
5438
5439 /// The length of the buffer submitted for this operation is not valid.
5440 NDIS_INVALID_LENGTH = 0xC0230014,
5441
5442 /// The data used for this operation is not valid.
5443 NDIS_INVALID_DATA = 0xC0230015,
5444
5445 /// The length of the submitted buffer for this operation is too small.
5446 NDIS_BUFFER_TOO_SHORT = 0xC0230016,
5447
5448 /// The network interface does not support this object identifier.
5449 NDIS_INVALID_OID = 0xC0230017,
5450
5451 /// The network interface has been removed.
5452 NDIS_ADAPTER_REMOVED = 0xC0230018,
5453
5454 /// The network interface does not support this media type.
5455 NDIS_UNSUPPORTED_MEDIA = 0xC0230019,
5456
5457 /// An attempt was made to remove a token ring group address that is in use by other components.
5458 NDIS_GROUP_ADDRESS_IN_USE = 0xC023001A,
5459
5460 /// An attempt was made to map a file that cannot be found.
5461 NDIS_FILE_NOT_FOUND = 0xC023001B,
5462
5463 /// An error occurred while NDIS tried to map the file.
5464 NDIS_ERROR_READING_FILE = 0xC023001C,
5465
5466 /// An attempt was made to map a file that is already mapped.
5467 NDIS_ALREADY_MAPPED = 0xC023001D,
5468
5469 /// An attempt to allocate a hardware resource failed because the resource is used by another component.
5470 NDIS_RESOURCE_CONFLICT = 0xC023001E,
5471
5472 /// The I/O operation failed because the network media is disconnected or the wireless access point is out of range.
5473 NDIS_MEDIA_DISCONNECTED = 0xC023001F,
5474
5475 /// The network address used in the request is invalid.
5476 NDIS_INVALID_ADDRESS = 0xC0230022,
5477
5478 /// The offload operation on the network interface has been paused.
5479 NDIS_PAUSED = 0xC023002A,
5480
5481 /// The network interface was not found.
5482 NDIS_INTERFACE_NOT_FOUND = 0xC023002B,
5483
5484 /// The revision number specified in the structure is not supported.
5485 NDIS_UNSUPPORTED_REVISION = 0xC023002C,
5486
5487 /// The specified port does not exist on this network interface.
5488 NDIS_INVALID_PORT = 0xC023002D,
5489
5490 /// The current state of the specified port on this network interface does not support the requested operation.
5491 NDIS_INVALID_PORT_STATE = 0xC023002E,
5492
5493 /// The miniport adapter is in a lower power state.
5494 NDIS_LOW_POWER_STATE = 0xC023002F,
5495
5496 /// The network interface does not support this request.
5497 NDIS_NOT_SUPPORTED = 0xC02300BB,
5498
5499 /// The TCP connection is not offloadable because of a local policy setting.
5500 NDIS_OFFLOAD_POLICY = 0xC023100F,
5501
5502 /// The TCP connection is not offloadable by the Chimney offload target.
5503 NDIS_OFFLOAD_CONNECTION_REJECTED = 0xC0231012,
5504
5505 /// The IP Path object is not in an offloadable state.
5506 NDIS_OFFLOAD_PATH_REJECTED = 0xC0231013,
5507
5508 /// The wireless LAN interface is in auto-configuration mode and does not support the requested parameter change operation.
5509 NDIS_DOT11_AUTO_CONFIG_ENABLED = 0xC0232000,
5510
5511 /// The wireless LAN interface is busy and cannot perform the requested operation.
5512 NDIS_DOT11_MEDIA_IN_USE = 0xC0232001,
5513
5514 /// The wireless LAN interface is power down and does not support the requested operation.
5515 NDIS_DOT11_POWER_STATE_INVALID = 0xC0232002,
5516
5517 /// The list of wake on LAN patterns is full.
5518 NDIS_PM_WOL_PATTERN_LIST_FULL = 0xC0232003,
5519
5520 /// The list of low power protocol offloads is full.
5521 NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL = 0xC0232004,
5522
5523 /// The SPI in the packet does not match a valid IPsec SA.
5524 IPSEC_BAD_SPI = 0xC0360001,
5525
5526 /// The packet was received on an IPsec SA whose lifetime has expired.
5527 IPSEC_SA_LIFETIME_EXPIRED = 0xC0360002,
5528
5529 /// The packet was received on an IPsec SA that does not match the packet characteristics.
5530 IPSEC_WRONG_SA = 0xC0360003,
5531
5532 /// The packet sequence number replay check failed.
5533 IPSEC_REPLAY_CHECK_FAILED = 0xC0360004,
5534
5535 /// The IPsec header and/or trailer in the packet is invalid.
5536 IPSEC_INVALID_PACKET = 0xC0360005,
5537
5538 /// The IPsec integrity check failed.
5539 IPSEC_INTEGRITY_CHECK_FAILED = 0xC0360006,
5540
5541 /// IPsec dropped a clear text packet.
5542 IPSEC_CLEAR_TEXT_DROP = 0xC0360007,
5543
5544 /// IPsec dropped an incoming ESP packet in authenticated firewall mode. This drop is benign.
5545 IPSEC_AUTH_FIREWALL_DROP = 0xC0360008,
5546
5547 /// IPsec dropped a packet due to DOS throttle.
5548 IPSEC_THROTTLE_DROP = 0xC0360009,
5549
5550 /// IPsec Dos Protection matched an explicit block rule.
5551 IPSEC_DOSP_BLOCK = 0xC0368000,
5552
5553 /// IPsec Dos Protection received an IPsec specific multicast packet which is not allowed.
5554 IPSEC_DOSP_RECEIVED_MULTICAST = 0xC0368001,
5555
5556 /// IPsec Dos Protection received an incorrectly formatted packet.
5557 IPSEC_DOSP_INVALID_PACKET = 0xC0368002,
5558
5559 /// IPsec Dos Protection failed to lookup state.
5560 IPSEC_DOSP_STATE_LOOKUP_FAILED = 0xC0368003,
5561
5562 /// IPsec Dos Protection failed to create state because there are already maximum number of entries allowed by policy.
5563 IPSEC_DOSP_MAX_ENTRIES = 0xC0368004,
5564
5565 /// IPsec Dos Protection received an IPsec negotiation packet for a keying module which is not allowed by policy.
5566 IPSEC_DOSP_KEYMOD_NOT_ALLOWED = 0xC0368005,
5567
5568 /// IPsec Dos Protection failed to create per internal IP ratelimit queue because there is already maximum number of queues allowed by policy.
5569 IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES = 0xC0368006,
5570
5571 /// The system does not support mirrored volumes.
5572 VOLMGR_MIRROR_NOT_SUPPORTED = 0xC038005B,
5573
5574 /// The system does not support RAID-5 volumes.
5575 VOLMGR_RAID5_NOT_SUPPORTED = 0xC038005C,
5576
5577 /// A virtual disk support provider for the specified file was not found.
5578 VIRTDISK_PROVIDER_NOT_FOUND = 0xC03A0014,
5579
5580 /// The specified disk is not a virtual disk.
5581 VIRTDISK_NOT_VIRTUAL_DISK = 0xC03A0015,
5582
5583 /// The chain of virtual hard disks is inaccessible.
5584 /// The process has not been granted access rights to the parent virtual hard disk for the differencing disk.
5585 VHD_PARENT_VHD_ACCESS_DENIED = 0xC03A0016,
5586
5587 /// The chain of virtual hard disks is corrupted.
5588 /// There is a mismatch in the virtual sizes of the parent virtual hard disk and differencing disk.
5589 VHD_CHILD_PARENT_SIZE_MISMATCH = 0xC03A0017,
5590
5591 /// The chain of virtual hard disks is corrupted.
5592 /// A differencing disk is indicated in its own parent chain.
5593 VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED = 0xC03A0018,
5594
5595 /// The chain of virtual hard disks is inaccessible.
5596 /// There was an error opening a virtual hard disk further up the chain.
5597 VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT = 0xC03A0019,
5598
5599 _,
5600};
lib/std/os/windows/psapi.zig created+29
...@@ -0,0 +1,29 @@
1usingnamespace @import("bits.zig");
2
3pub extern "psapi" fn EmptyWorkingSet(hProcess: HANDLE) callconv(.Stdcall) BOOL;
4pub extern "psapi" fn EnumDeviceDrivers(lpImageBase: [*]LPVOID, cb: DWORD, lpcbNeeded: LPDWORD) callconv(.Stdcall) BOOL;
5pub extern "psapi" fn EnumPageFilesA(pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKA, pContext: LPVOID) callconv(.Stdcall) BOOL;
6pub extern "psapi" fn EnumPageFilesW(pCallBackRoutine: PENUM_PAGE_FILE_CALLBACKW, pContext: LPVOID) callconv(.Stdcall) BOOL;
7pub extern "psapi" fn EnumProcessModules(hProcess: HANDLE, lphModule: [*]HMODULE, cb: DWORD, lpcbNeeded: LPDWORD) callconv(.Stdcall) BOOL;
8pub extern "psapi" fn EnumProcessModulesEx(hProcess: HANDLE, lphModule: [*]HMODULE, cb: DWORD, lpcbNeeded: LPDWORD, dwFilterFlag: DWORD) callconv(.Stdcall) BOOL;
9pub extern "psapi" fn EnumProcesses(lpidProcess: [*]DWORD, cb: DWORD, cbNeeded: LPDWORD) callconv(.Stdcall) BOOL;
10pub extern "psapi" fn GetDeviceDriverBaseNameA(ImageBase: LPVOID, lpBaseName: LPSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
11pub extern "psapi" fn GetDeviceDriverBaseNameW(ImageBase: LPVOID, lpBaseName: LPWSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
12pub extern "psapi" fn GetDeviceDriverFileNameA(ImageBase: LPVOID, lpFilename: LPSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
13pub extern "psapi" fn GetDeviceDriverFileNameW(ImageBase: LPVOID, lpFilename: LPWSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
14pub extern "psapi" fn GetMappedFileNameA(hProcess: HANDLE, lpv: ?LPVOID, lpFilename: LPSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
15pub extern "psapi" fn GetMappedFileNameW(hProcess: HANDLE, lpv: ?LPVOID, lpFilename: LPWSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
16pub extern "psapi" fn GetModuleBaseNameA(hProcess: HANDLE, hModule: ?HMODULE, lpBaseName: LPSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
17pub extern "psapi" fn GetModuleBaseNameW(hProcess: HANDLE, hModule: ?HMODULE, lpBaseName: LPWSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
18pub extern "psapi" fn GetModuleFileNameExA(hProcess: HANDLE, hModule: ?HMODULE, lpFilename: LPSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
19pub extern "psapi" fn GetModuleFileNameExW(hProcess: HANDLE, hModule: ?HMODULE, lpFilename: LPWSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
20pub extern "psapi" fn GetModuleInformation(hProcess: HANDLE, hModule: HMODULE, lpmodinfo: LPMODULEINFO, cb: DWORD) callconv(.Stdcall) BOOL;
21pub extern "psapi" fn GetPerformanceInfo(pPerformanceInformation: PPERFORMACE_INFORMATION, cb: DWORD) callconv(.Stdcall) BOOL;
22pub extern "psapi" fn GetProcessImageFileNameA(hProcess: HANDLE, lpImageFileName: LPSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
23pub extern "psapi" fn GetProcessImageFileNameW(hProcess: HANDLE, lpImageFileName: LPWSTR, nSize: DWORD) callconv(.Stdcall) DWORD;
24pub extern "psapi" fn GetProcessMemoryInfo(Process: HANDLE, ppsmemCounters: PPROCESS_MEMORY_COUNTERS, cb: DWORD) callconv(.Stdcall) BOOL;
25pub extern "psapi" fn GetWsChanges(hProcess: HANDLE, lpWatchInfo: PPSAPI_WS_WATCH_INFORMATION, cb: DWORD) callconv(.Stdcall) BOOL;
26pub extern "psapi" fn GetWsChangesEx(hProcess: HANDLE, lpWatchInfoEx: PPSAPI_WS_WATCH_INFORMATION_EX, cb: DWORD) callconv(.Stdcall) BOOL;
27pub extern "psapi" fn InitializeProcessForWsWatch(hProcess: HANDLE) callconv(.Stdcall) BOOL;
28pub extern "psapi" fn QueryWorkingSet(hProcess: HANDLE, pv: PVOID, cb: DWORD) callconv(.Stdcall) BOOL;
29pub extern "psapi" fn QueryWorkingSetEx(hProcess: HANDLE, pv: PVOID, cb: DWORD) callconv(.Stdcall) BOOL;
lib/std/os/windows/status.zig deleted-1670
...@@ -1,1670 +0,0 @@
1/// The operation completed successfully.
2pub const SUCCESS = 0x00000000;
3
4pub const WAIT_0 = 0x00000000;
5pub const WAIT_1 = 0x00000001;
6pub const WAIT_2 = 0x00000002;
7pub const WAIT_3 = 0x00000003;
8pub const WAIT_63 = 0x0000003F;
9pub const ABANDONED = 0x00000080;
10pub const ABANDONED_WAIT_0 = 0x00000080;
11pub const ABANDONED_WAIT_63 = 0x000000BF;
12pub const USER_APC = 0x000000C0;
13pub const ALERTED = 0x00000101;
14
15/// The given Timeout interval expired.
16pub const TIMEOUT = 0x00000102;
17
18/// The operation that was requested is pending completion.
19pub const PENDING = 0x00000103;
20
21pub const REPARSE = 0x00000104;
22pub const MORE_ENTRIES = 0x00000105;
23pub const NOT_ALL_ASSIGNED = 0x00000106;
24pub const SOME_NOT_MAPPED = 0x00000107;
25pub const OPLOCK_BREAK_IN_PROGRESS = 0x00000108;
26pub const VOLUME_MOUNTED = 0x00000109;
27pub const RXACT_COMMITTED = 0x0000010A;
28pub const NOTIFY_CLEANUP = 0x0000010B;
29pub const NOTIFY_ENUM_DIR = 0x0000010C;
30pub const NO_QUOTAS_FOR_ACCOUNT = 0x0000010D;
31pub const PRIMARY_TRANSPORT_CONNECT_FAILED = 0x0000010E;
32pub const PAGE_FAULT_TRANSITION = 0x00000110;
33pub const PAGE_FAULT_DEMAND_ZERO = 0x00000111;
34pub const PAGE_FAULT_COPY_ON_WRITE = 0x00000112;
35pub const PAGE_FAULT_GUARD_PAGE = 0x00000113;
36pub const PAGE_FAULT_PAGING_FILE = 0x00000114;
37pub const CACHE_PAGE_LOCKED = 0x00000115;
38pub const CRASH_DUMP = 0x00000116;
39pub const BUFFER_ALL_ZEROS = 0x00000117;
40pub const REPARSE_OBJECT = 0x00000118;
41pub const RESOURCE_REQUIREMENTS_CHANGED = 0x00000119;
42pub const TRANSLATION_COMPLETE = 0x00000120;
43pub const DS_MEMBERSHIP_EVALUATED_LOCALLY = 0x00000121;
44pub const NOTHING_TO_TERMINATE = 0x00000122;
45pub const PROCESS_NOT_IN_JOB = 0x00000123;
46pub const PROCESS_IN_JOB = 0x00000124;
47pub const VOLSNAP_HIBERNATE_READY = 0x00000125;
48pub const FSFILTER_OP_COMPLETED_SUCCESSFULLY = 0x00000126;
49pub const INTERRUPT_VECTOR_ALREADY_CONNECTED = 0x00000127;
50pub const INTERRUPT_STILL_CONNECTED = 0x00000128;
51pub const PROCESS_CLONED = 0x00000129;
52pub const FILE_LOCKED_WITH_ONLY_READERS = 0x0000012A;
53pub const FILE_LOCKED_WITH_WRITERS = 0x0000012B;
54pub const RESOURCEMANAGER_READ_ONLY = 0x00000202;
55pub const WAIT_FOR_OPLOCK = 0x00000367;
56pub const FLT_IO_COMPLETE = 0x001C0001;
57pub const FILE_NOT_AVAILABLE = 0xC0000467;
58pub const OBJECT_NAME_EXISTS = 0x40000000;
59pub const THREAD_WAS_SUSPENDED = 0x40000001;
60pub const WORKING_SET_LIMIT_RANGE = 0x40000002;
61pub const IMAGE_NOT_AT_BASE = 0x40000003;
62pub const RXACT_STATE_CREATED = 0x40000004;
63pub const SEGMENT_NOTIFICATION = 0x40000005;
64pub const LOCAL_USER_SESSION_KEY = 0x40000006;
65pub const BAD_CURRENT_DIRECTORY = 0x40000007;
66pub const SERIAL_MORE_WRITES = 0x40000008;
67pub const REGISTRY_RECOVERED = 0x40000009;
68pub const FT_READ_RECOVERY_FROM_BACKUP = 0x4000000A;
69pub const FT_WRITE_RECOVERY = 0x4000000B;
70pub const SERIAL_COUNTER_TIMEOUT = 0x4000000C;
71pub const NULL_LM_PASSWORD = 0x4000000D;
72pub const IMAGE_MACHINE_TYPE_MISMATCH = 0x4000000E;
73pub const RECEIVE_PARTIAL = 0x4000000F;
74pub const RECEIVE_EXPEDITED = 0x40000010;
75pub const RECEIVE_PARTIAL_EXPEDITED = 0x40000011;
76pub const EVENT_DONE = 0x40000012;
77pub const EVENT_PENDING = 0x40000013;
78pub const CHECKING_FILE_SYSTEM = 0x40000014;
79pub const FATAL_APP_EXIT = 0x40000015;
80pub const PREDEFINED_HANDLE = 0x40000016;
81pub const WAS_UNLOCKED = 0x40000017;
82pub const SERVICE_NOTIFICATION = 0x40000018;
83pub const WAS_LOCKED = 0x40000019;
84pub const LOG_HARD_ERROR = 0x4000001A;
85pub const ALREADY_WIN32 = 0x4000001B;
86pub const WX86_UNSIMULATE = 0x4000001C;
87pub const WX86_CONTINUE = 0x4000001D;
88pub const WX86_SINGLE_STEP = 0x4000001E;
89pub const WX86_BREAKPOINT = 0x4000001F;
90pub const WX86_EXCEPTION_CONTINUE = 0x40000020;
91pub const WX86_EXCEPTION_LASTCHANCE = 0x40000021;
92pub const WX86_EXCEPTION_CHAIN = 0x40000022;
93pub const IMAGE_MACHINE_TYPE_MISMATCH_EXE = 0x40000023;
94pub const NO_YIELD_PERFORMED = 0x40000024;
95pub const TIMER_RESUME_IGNORED = 0x40000025;
96pub const ARBITRATION_UNHANDLED = 0x40000026;
97pub const CARDBUS_NOT_SUPPORTED = 0x40000027;
98pub const WX86_CREATEWX86TIB = 0x40000028;
99pub const MP_PROCESSOR_MISMATCH = 0x40000029;
100pub const HIBERNATED = 0x4000002A;
101pub const RESUME_HIBERNATION = 0x4000002B;
102pub const FIRMWARE_UPDATED = 0x4000002C;
103pub const DRIVERS_LEAKING_LOCKED_PAGES = 0x4000002D;
104pub const MESSAGE_RETRIEVED = 0x4000002E;
105pub const SYSTEM_POWERSTATE_TRANSITION = 0x4000002F;
106pub const ALPC_CHECK_COMPLETION_LIST = 0x40000030;
107pub const SYSTEM_POWERSTATE_COMPLEX_TRANSITION = 0x40000031;
108pub const ACCESS_AUDIT_BY_POLICY = 0x40000032;
109pub const ABANDON_HIBERFILE = 0x40000033;
110pub const BIZRULES_NOT_ENABLED = 0x40000034;
111pub const WAKE_SYSTEM = 0x40000294;
112pub const DS_SHUTTING_DOWN = 0x40000370;
113pub const CTX_CDM_CONNECT = 0x400A0004;
114pub const CTX_CDM_DISCONNECT = 0x400A0005;
115pub const SXS_RELEASE_ACTIVATION_CONTEXT = 0x4015000D;
116pub const RECOVERY_NOT_NEEDED = 0x40190034;
117pub const RM_ALREADY_STARTED = 0x40190035;
118pub const LOG_NO_RESTART = 0x401A000C;
119pub const VIDEO_DRIVER_DEBUG_REPORT_REQUEST = 0x401B00EC;
120pub const GRAPHICS_PARTIAL_DATA_POPULATED = 0x401E000A;
121pub const GRAPHICS_DRIVER_MISMATCH = 0x401E0117;
122pub const GRAPHICS_MODE_NOT_PINNED = 0x401E0307;
123pub const GRAPHICS_NO_PREFERRED_MODE = 0x401E031E;
124pub const GRAPHICS_DATASET_IS_EMPTY = 0x401E034B;
125pub const GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET = 0x401E034C;
126pub const GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED = 0x401E0351;
127pub const GRAPHICS_UNKNOWN_CHILD_STATUS = 0x401E042F;
128pub const GRAPHICS_LEADLINK_START_DEFERRED = 0x401E0437;
129pub const GRAPHICS_POLLING_TOO_FREQUENTLY = 0x401E0439;
130pub const GRAPHICS_START_DEFERRED = 0x401E043A;
131pub const NDIS_INDICATION_REQUIRED = 0x40230001;
132pub const GUARD_PAGE_VIOLATION = 0x80000001;
133pub const DATATYPE_MISALIGNMENT = 0x80000002;
134pub const BREAKPOINT = 0x80000003;
135pub const SINGLE_STEP = 0x80000004;
136
137/// The data was too large to fit into the specified buffer.
138pub const BUFFER_OVERFLOW = 0x80000005;
139pub const NO_MORE_FILES = 0x80000006;
140pub const WAKE_SYSTEM_DEBUGGER = 0x80000007;
141pub const HANDLES_CLOSED = 0x8000000A;
142pub const NO_INHERITANCE = 0x8000000B;
143pub const GUID_SUBSTITUTION_MADE = 0x8000000C;
144pub const PARTIAL_COPY = 0x8000000D;
145pub const DEVICE_PAPER_EMPTY = 0x8000000E;
146pub const DEVICE_POWERED_OFF = 0x8000000F;
147pub const DEVICE_OFF_LINE = 0x80000010;
148pub const DEVICE_BUSY = 0x80000011;
149pub const NO_MORE_EAS = 0x80000012;
150pub const INVALID_EA_NAME = 0x80000013;
151pub const EA_LIST_INCONSISTENT = 0x80000014;
152pub const INVALID_EA_FLAG = 0x80000015;
153pub const VERIFY_REQUIRED = 0x80000016;
154pub const EXTRANEOUS_INFORMATION = 0x80000017;
155pub const RXACT_COMMIT_NECESSARY = 0x80000018;
156pub const NO_MORE_ENTRIES = 0x8000001A;
157pub const FILEMARK_DETECTED = 0x8000001B;
158pub const MEDIA_CHANGED = 0x8000001C;
159pub const BUS_RESET = 0x8000001D;
160pub const END_OF_MEDIA = 0x8000001E;
161pub const BEGINNING_OF_MEDIA = 0x8000001F;
162pub const MEDIA_CHECK = 0x80000020;
163pub const SETMARK_DETECTED = 0x80000021;
164pub const NO_DATA_DETECTED = 0x80000022;
165pub const REDIRECTOR_HAS_OPEN_HANDLES = 0x80000023;
166pub const SERVER_HAS_OPEN_HANDLES = 0x80000024;
167pub const ALREADY_DISCONNECTED = 0x80000025;
168pub const LONGJUMP = 0x80000026;
169pub const CLEANER_CARTRIDGE_INSTALLED = 0x80000027;
170pub const PLUGPLAY_QUERY_VETOED = 0x80000028;
171pub const UNWIND_CONSOLIDATE = 0x80000029;
172pub const REGISTRY_HIVE_RECOVERED = 0x8000002A;
173pub const DLL_MIGHT_BE_INSECURE = 0x8000002B;
174pub const DLL_MIGHT_BE_INCOMPATIBLE = 0x8000002C;
175pub const STOPPED_ON_SYMLINK = 0x8000002D;
176pub const DEVICE_REQUIRES_CLEANING = 0x80000288;
177pub const DEVICE_DOOR_OPEN = 0x80000289;
178pub const DATA_LOST_REPAIR = 0x80000803;
179pub const CLUSTER_NODE_ALREADY_UP = 0x80130001;
180pub const CLUSTER_NODE_ALREADY_DOWN = 0x80130002;
181pub const CLUSTER_NETWORK_ALREADY_ONLINE = 0x80130003;
182pub const CLUSTER_NETWORK_ALREADY_OFFLINE = 0x80130004;
183pub const CLUSTER_NODE_ALREADY_MEMBER = 0x80130005;
184pub const COULD_NOT_RESIZE_LOG = 0x80190009;
185pub const NO_TXF_METADATA = 0x80190029;
186pub const CANT_RECOVER_WITH_HANDLE_OPEN = 0x80190031;
187pub const TXF_METADATA_ALREADY_PRESENT = 0x80190041;
188pub const TRANSACTION_SCOPE_CALLBACKS_NOT_SET = 0x80190042;
189pub const VIDEO_HUNG_DISPLAY_DRIVER_THREAD_RECOVERED = 0x801B00EB;
190pub const FLT_BUFFER_TOO_SMALL = 0x801C0001;
191pub const FVE_PARTIAL_METADATA = 0x80210001;
192pub const FVE_TRANSIENT_STATE = 0x80210002;
193pub const UNSUCCESSFUL = 0xC0000001;
194pub const NOT_IMPLEMENTED = 0xC0000002;
195pub const INVALID_INFO_CLASS = 0xC0000003;
196pub const INFO_LENGTH_MISMATCH = 0xC0000004;
197pub const ACCESS_VIOLATION = 0xC0000005;
198pub const IN_PAGE_ERROR = 0xC0000006;
199pub const PAGEFILE_QUOTA = 0xC0000007;
200pub const INVALID_HANDLE = 0xC0000008;
201pub const BAD_INITIAL_STACK = 0xC0000009;
202pub const BAD_INITIAL_PC = 0xC000000A;
203pub const INVALID_CID = 0xC000000B;
204pub const TIMER_NOT_CANCELED = 0xC000000C;
205pub const INVALID_PARAMETER = 0xC000000D;
206pub const NO_SUCH_DEVICE = 0xC000000E;
207pub const NO_SUCH_FILE = 0xC000000F;
208pub const INVALID_DEVICE_REQUEST = 0xC0000010;
209pub const END_OF_FILE = 0xC0000011;
210pub const WRONG_VOLUME = 0xC0000012;
211pub const NO_MEDIA_IN_DEVICE = 0xC0000013;
212pub const UNRECOGNIZED_MEDIA = 0xC0000014;
213pub const NONEXISTENT_SECTOR = 0xC0000015;
214pub const MORE_PROCESSING_REQUIRED = 0xC0000016;
215pub const NO_MEMORY = 0xC0000017;
216pub const CONFLICTING_ADDRESSES = 0xC0000018;
217pub const NOT_MAPPED_VIEW = 0xC0000019;
218pub const UNABLE_TO_FREE_VM = 0xC000001A;
219pub const UNABLE_TO_DELETE_SECTION = 0xC000001B;
220pub const INVALID_SYSTEM_SERVICE = 0xC000001C;
221pub const ILLEGAL_INSTRUCTION = 0xC000001D;
222pub const INVALID_LOCK_SEQUENCE = 0xC000001E;
223pub const INVALID_VIEW_SIZE = 0xC000001F;
224pub const INVALID_FILE_FOR_SECTION = 0xC0000020;
225pub const ALREADY_COMMITTED = 0xC0000021;
226pub const ACCESS_DENIED = 0xC0000022;
227pub const BUFFER_TOO_SMALL = 0xC0000023;
228pub const OBJECT_TYPE_MISMATCH = 0xC0000024;
229pub const NONCONTINUABLE_EXCEPTION = 0xC0000025;
230pub const INVALID_DISPOSITION = 0xC0000026;
231pub const UNWIND = 0xC0000027;
232pub const BAD_STACK = 0xC0000028;
233pub const INVALID_UNWIND_TARGET = 0xC0000029;
234pub const NOT_LOCKED = 0xC000002A;
235pub const PARITY_ERROR = 0xC000002B;
236pub const UNABLE_TO_DECOMMIT_VM = 0xC000002C;
237pub const NOT_COMMITTED = 0xC000002D;
238pub const INVALID_PORT_ATTRIBUTES = 0xC000002E;
239pub const PORT_MESSAGE_TOO_LONG = 0xC000002F;
240pub const INVALID_PARAMETER_MIX = 0xC0000030;
241pub const INVALID_QUOTA_LOWER = 0xC0000031;
242pub const DISK_CORRUPT_ERROR = 0xC0000032;
243pub const OBJECT_NAME_INVALID = 0xC0000033;
244pub const OBJECT_NAME_NOT_FOUND = 0xC0000034;
245pub const OBJECT_NAME_COLLISION = 0xC0000035;
246pub const PORT_DISCONNECTED = 0xC0000037;
247pub const DEVICE_ALREADY_ATTACHED = 0xC0000038;
248pub const OBJECT_PATH_INVALID = 0xC0000039;
249pub const OBJECT_PATH_NOT_FOUND = 0xC000003A;
250pub const OBJECT_PATH_SYNTAX_BAD = 0xC000003B;
251pub const DATA_OVERRUN = 0xC000003C;
252pub const DATA_LATE_ERROR = 0xC000003D;
253pub const DATA_ERROR = 0xC000003E;
254pub const CRC_ERROR = 0xC000003F;
255pub const SECTION_TOO_BIG = 0xC0000040;
256pub const PORT_CONNECTION_REFUSED = 0xC0000041;
257pub const INVALID_PORT_HANDLE = 0xC0000042;
258pub const SHARING_VIOLATION = 0xC0000043;
259pub const QUOTA_EXCEEDED = 0xC0000044;
260pub const INVALID_PAGE_PROTECTION = 0xC0000045;
261pub const MUTANT_NOT_OWNED = 0xC0000046;
262pub const SEMAPHORE_LIMIT_EXCEEDED = 0xC0000047;
263pub const PORT_ALREADY_SET = 0xC0000048;
264pub const SECTION_NOT_IMAGE = 0xC0000049;
265pub const SUSPEND_COUNT_EXCEEDED = 0xC000004A;
266pub const THREAD_IS_TERMINATING = 0xC000004B;
267pub const BAD_WORKING_SET_LIMIT = 0xC000004C;
268pub const INCOMPATIBLE_FILE_MAP = 0xC000004D;
269pub const SECTION_PROTECTION = 0xC000004E;
270pub const EAS_NOT_SUPPORTED = 0xC000004F;
271pub const EA_TOO_LARGE = 0xC0000050;
272pub const NONEXISTENT_EA_ENTRY = 0xC0000051;
273pub const NO_EAS_ON_FILE = 0xC0000052;
274pub const EA_CORRUPT_ERROR = 0xC0000053;
275pub const FILE_LOCK_CONFLICT = 0xC0000054;
276pub const LOCK_NOT_GRANTED = 0xC0000055;
277pub const DELETE_PENDING = 0xC0000056;
278pub const CTL_FILE_NOT_SUPPORTED = 0xC0000057;
279pub const UNKNOWN_REVISION = 0xC0000058;
280pub const REVISION_MISMATCH = 0xC0000059;
281pub const INVALID_OWNER = 0xC000005A;
282pub const INVALID_PRIMARY_GROUP = 0xC000005B;
283pub const NO_IMPERSONATION_TOKEN = 0xC000005C;
284pub const CANT_DISABLE_MANDATORY = 0xC000005D;
285pub const NO_LOGON_SERVERS = 0xC000005E;
286pub const NO_SUCH_LOGON_SESSION = 0xC000005F;
287pub const NO_SUCH_PRIVILEGE = 0xC0000060;
288pub const PRIVILEGE_NOT_HELD = 0xC0000061;
289pub const INVALID_ACCOUNT_NAME = 0xC0000062;
290pub const USER_EXISTS = 0xC0000063;
291pub const NO_SUCH_USER = 0xC0000064;
292pub const GROUP_EXISTS = 0xC0000065;
293pub const NO_SUCH_GROUP = 0xC0000066;
294pub const MEMBER_IN_GROUP = 0xC0000067;
295pub const MEMBER_NOT_IN_GROUP = 0xC0000068;
296pub const LAST_ADMIN = 0xC0000069;
297pub const WRONG_PASSWORD = 0xC000006A;
298pub const ILL_FORMED_PASSWORD = 0xC000006B;
299pub const PASSWORD_RESTRICTION = 0xC000006C;
300pub const LOGON_FAILURE = 0xC000006D;
301pub const ACCOUNT_RESTRICTION = 0xC000006E;
302pub const INVALID_LOGON_HOURS = 0xC000006F;
303pub const INVALID_WORKSTATION = 0xC0000070;
304pub const PASSWORD_EXPIRED = 0xC0000071;
305pub const ACCOUNT_DISABLED = 0xC0000072;
306pub const NONE_MAPPED = 0xC0000073;
307pub const TOO_MANY_LUIDS_REQUESTED = 0xC0000074;
308pub const LUIDS_EXHAUSTED = 0xC0000075;
309pub const INVALID_SUB_AUTHORITY = 0xC0000076;
310pub const INVALID_ACL = 0xC0000077;
311pub const INVALID_SID = 0xC0000078;
312pub const INVALID_SECURITY_DESCR = 0xC0000079;
313pub const PROCEDURE_NOT_FOUND = 0xC000007A;
314pub const INVALID_IMAGE_FORMAT = 0xC000007B;
315pub const NO_TOKEN = 0xC000007C;
316pub const BAD_INHERITANCE_ACL = 0xC000007D;
317pub const RANGE_NOT_LOCKED = 0xC000007E;
318pub const DISK_FULL = 0xC000007F;
319pub const SERVER_DISABLED = 0xC0000080;
320pub const SERVER_NOT_DISABLED = 0xC0000081;
321pub const TOO_MANY_GUIDS_REQUESTED = 0xC0000082;
322pub const GUIDS_EXHAUSTED = 0xC0000083;
323pub const INVALID_ID_AUTHORITY = 0xC0000084;
324pub const AGENTS_EXHAUSTED = 0xC0000085;
325pub const INVALID_VOLUME_LABEL = 0xC0000086;
326pub const SECTION_NOT_EXTENDED = 0xC0000087;
327pub const NOT_MAPPED_DATA = 0xC0000088;
328pub const RESOURCE_DATA_NOT_FOUND = 0xC0000089;
329pub const RESOURCE_TYPE_NOT_FOUND = 0xC000008A;
330pub const RESOURCE_NAME_NOT_FOUND = 0xC000008B;
331pub const ARRAY_BOUNDS_EXCEEDED = 0xC000008C;
332pub const FLOAT_DENORMAL_OPERAND = 0xC000008D;
333pub const FLOAT_DIVIDE_BY_ZERO = 0xC000008E;
334pub const FLOAT_INEXACT_RESULT = 0xC000008F;
335pub const FLOAT_INVALID_OPERATION = 0xC0000090;
336pub const FLOAT_OVERFLOW = 0xC0000091;
337pub const FLOAT_STACK_CHECK = 0xC0000092;
338pub const FLOAT_UNDERFLOW = 0xC0000093;
339pub const INTEGER_DIVIDE_BY_ZERO = 0xC0000094;
340pub const INTEGER_OVERFLOW = 0xC0000095;
341pub const PRIVILEGED_INSTRUCTION = 0xC0000096;
342pub const TOO_MANY_PAGING_FILES = 0xC0000097;
343pub const FILE_INVALID = 0xC0000098;
344pub const ALLOTTED_SPACE_EXCEEDED = 0xC0000099;
345pub const INSUFFICIENT_RESOURCES = 0xC000009A;
346pub const DFS_EXIT_PATH_FOUND = 0xC000009B;
347pub const DEVICE_DATA_ERROR = 0xC000009C;
348pub const DEVICE_NOT_CONNECTED = 0xC000009D;
349pub const FREE_VM_NOT_AT_BASE = 0xC000009F;
350pub const MEMORY_NOT_ALLOCATED = 0xC00000A0;
351pub const WORKING_SET_QUOTA = 0xC00000A1;
352pub const MEDIA_WRITE_PROTECTED = 0xC00000A2;
353pub const DEVICE_NOT_READY = 0xC00000A3;
354pub const INVALID_GROUP_ATTRIBUTES = 0xC00000A4;
355pub const BAD_IMPERSONATION_LEVEL = 0xC00000A5;
356pub const CANT_OPEN_ANONYMOUS = 0xC00000A6;
357pub const BAD_VALIDATION_CLASS = 0xC00000A7;
358pub const BAD_TOKEN_TYPE = 0xC00000A8;
359pub const BAD_MASTER_BOOT_RECORD = 0xC00000A9;
360pub const INSTRUCTION_MISALIGNMENT = 0xC00000AA;
361pub const INSTANCE_NOT_AVAILABLE = 0xC00000AB;
362pub const PIPE_NOT_AVAILABLE = 0xC00000AC;
363pub const INVALID_PIPE_STATE = 0xC00000AD;
364pub const PIPE_BUSY = 0xC00000AE;
365pub const ILLEGAL_FUNCTION = 0xC00000AF;
366pub const PIPE_DISCONNECTED = 0xC00000B0;
367pub const PIPE_CLOSING = 0xC00000B1;
368pub const PIPE_CONNECTED = 0xC00000B2;
369pub const PIPE_LISTENING = 0xC00000B3;
370pub const INVALID_READ_MODE = 0xC00000B4;
371pub const IO_TIMEOUT = 0xC00000B5;
372pub const FILE_FORCED_CLOSED = 0xC00000B6;
373pub const PROFILING_NOT_STARTED = 0xC00000B7;
374pub const PROFILING_NOT_STOPPED = 0xC00000B8;
375pub const COULD_NOT_INTERPRET = 0xC00000B9;
376pub const FILE_IS_A_DIRECTORY = 0xC00000BA;
377pub const NOT_SUPPORTED = 0xC00000BB;
378pub const REMOTE_NOT_LISTENING = 0xC00000BC;
379pub const DUPLICATE_NAME = 0xC00000BD;
380pub const BAD_NETWORK_PATH = 0xC00000BE;
381pub const NETWORK_BUSY = 0xC00000BF;
382pub const DEVICE_DOES_NOT_EXIST = 0xC00000C0;
383pub const TOO_MANY_COMMANDS = 0xC00000C1;
384pub const ADAPTER_HARDWARE_ERROR = 0xC00000C2;
385pub const INVALID_NETWORK_RESPONSE = 0xC00000C3;
386pub const UNEXPECTED_NETWORK_ERROR = 0xC00000C4;
387pub const BAD_REMOTE_ADAPTER = 0xC00000C5;
388pub const PRINT_QUEUE_FULL = 0xC00000C6;
389pub const NO_SPOOL_SPACE = 0xC00000C7;
390pub const PRINT_CANCELLED = 0xC00000C8;
391pub const NETWORK_NAME_DELETED = 0xC00000C9;
392pub const NETWORK_ACCESS_DENIED = 0xC00000CA;
393pub const BAD_DEVICE_TYPE = 0xC00000CB;
394pub const BAD_NETWORK_NAME = 0xC00000CC;
395pub const TOO_MANY_NAMES = 0xC00000CD;
396pub const TOO_MANY_SESSIONS = 0xC00000CE;
397pub const SHARING_PAUSED = 0xC00000CF;
398pub const REQUEST_NOT_ACCEPTED = 0xC00000D0;
399pub const REDIRECTOR_PAUSED = 0xC00000D1;
400pub const NET_WRITE_FAULT = 0xC00000D2;
401pub const PROFILING_AT_LIMIT = 0xC00000D3;
402pub const NOT_SAME_DEVICE = 0xC00000D4;
403pub const FILE_RENAMED = 0xC00000D5;
404pub const VIRTUAL_CIRCUIT_CLOSED = 0xC00000D6;
405pub const NO_SECURITY_ON_OBJECT = 0xC00000D7;
406pub const CANT_WAIT = 0xC00000D8;
407pub const PIPE_EMPTY = 0xC00000D9;
408pub const CANT_ACCESS_DOMAIN_INFO = 0xC00000DA;
409pub const CANT_TERMINATE_SELF = 0xC00000DB;
410pub const INVALID_SERVER_STATE = 0xC00000DC;
411pub const INVALID_DOMAIN_STATE = 0xC00000DD;
412pub const INVALID_DOMAIN_ROLE = 0xC00000DE;
413pub const NO_SUCH_DOMAIN = 0xC00000DF;
414pub const DOMAIN_EXISTS = 0xC00000E0;
415pub const DOMAIN_LIMIT_EXCEEDED = 0xC00000E1;
416pub const OPLOCK_NOT_GRANTED = 0xC00000E2;
417pub const INVALID_OPLOCK_PROTOCOL = 0xC00000E3;
418pub const INTERNAL_DB_CORRUPTION = 0xC00000E4;
419pub const INTERNAL_ERROR = 0xC00000E5;
420pub const GENERIC_NOT_MAPPED = 0xC00000E6;
421pub const BAD_DESCRIPTOR_FORMAT = 0xC00000E7;
422pub const INVALID_USER_BUFFER = 0xC00000E8;
423pub const UNEXPECTED_IO_ERROR = 0xC00000E9;
424pub const UNEXPECTED_MM_CREATE_ERR = 0xC00000EA;
425pub const UNEXPECTED_MM_MAP_ERROR = 0xC00000EB;
426pub const UNEXPECTED_MM_EXTEND_ERR = 0xC00000EC;
427pub const NOT_LOGON_PROCESS = 0xC00000ED;
428pub const LOGON_SESSION_EXISTS = 0xC00000EE;
429pub const INVALID_PARAMETER_1 = 0xC00000EF;
430pub const INVALID_PARAMETER_2 = 0xC00000F0;
431pub const INVALID_PARAMETER_3 = 0xC00000F1;
432pub const INVALID_PARAMETER_4 = 0xC00000F2;
433pub const INVALID_PARAMETER_5 = 0xC00000F3;
434pub const INVALID_PARAMETER_6 = 0xC00000F4;
435pub const INVALID_PARAMETER_7 = 0xC00000F5;
436pub const INVALID_PARAMETER_8 = 0xC00000F6;
437pub const INVALID_PARAMETER_9 = 0xC00000F7;
438pub const INVALID_PARAMETER_10 = 0xC00000F8;
439pub const INVALID_PARAMETER_11 = 0xC00000F9;
440pub const INVALID_PARAMETER_12 = 0xC00000FA;
441pub const REDIRECTOR_NOT_STARTED = 0xC00000FB;
442pub const REDIRECTOR_STARTED = 0xC00000FC;
443pub const STACK_OVERFLOW = 0xC00000FD;
444pub const NO_SUCH_PACKAGE = 0xC00000FE;
445pub const BAD_FUNCTION_TABLE = 0xC00000FF;
446pub const VARIABLE_NOT_FOUND = 0xC0000100;
447pub const DIRECTORY_NOT_EMPTY = 0xC0000101;
448pub const FILE_CORRUPT_ERROR = 0xC0000102;
449pub const NOT_A_DIRECTORY = 0xC0000103;
450pub const BAD_LOGON_SESSION_STATE = 0xC0000104;
451pub const LOGON_SESSION_COLLISION = 0xC0000105;
452pub const NAME_TOO_LONG = 0xC0000106;
453pub const FILES_OPEN = 0xC0000107;
454pub const CONNECTION_IN_USE = 0xC0000108;
455pub const MESSAGE_NOT_FOUND = 0xC0000109;
456pub const PROCESS_IS_TERMINATING = 0xC000010A;
457pub const INVALID_LOGON_TYPE = 0xC000010B;
458pub const NO_GUID_TRANSLATION = 0xC000010C;
459pub const CANNOT_IMPERSONATE = 0xC000010D;
460pub const IMAGE_ALREADY_LOADED = 0xC000010E;
461pub const NO_LDT = 0xC0000117;
462pub const INVALID_LDT_SIZE = 0xC0000118;
463pub const INVALID_LDT_OFFSET = 0xC0000119;
464pub const INVALID_LDT_DESCRIPTOR = 0xC000011A;
465pub const INVALID_IMAGE_NE_FORMAT = 0xC000011B;
466pub const RXACT_INVALID_STATE = 0xC000011C;
467pub const RXACT_COMMIT_FAILURE = 0xC000011D;
468pub const MAPPED_FILE_SIZE_ZERO = 0xC000011E;
469pub const TOO_MANY_OPENED_FILES = 0xC000011F;
470pub const CANCELLED = 0xC0000120;
471pub const CANNOT_DELETE = 0xC0000121;
472pub const INVALID_COMPUTER_NAME = 0xC0000122;
473pub const FILE_DELETED = 0xC0000123;
474pub const SPECIAL_ACCOUNT = 0xC0000124;
475pub const SPECIAL_GROUP = 0xC0000125;
476pub const SPECIAL_USER = 0xC0000126;
477pub const MEMBERS_PRIMARY_GROUP = 0xC0000127;
478pub const FILE_CLOSED = 0xC0000128;
479pub const TOO_MANY_THREADS = 0xC0000129;
480pub const THREAD_NOT_IN_PROCESS = 0xC000012A;
481pub const TOKEN_ALREADY_IN_USE = 0xC000012B;
482pub const PAGEFILE_QUOTA_EXCEEDED = 0xC000012C;
483pub const COMMITMENT_LIMIT = 0xC000012D;
484pub const INVALID_IMAGE_LE_FORMAT = 0xC000012E;
485pub const INVALID_IMAGE_NOT_MZ = 0xC000012F;
486pub const INVALID_IMAGE_PROTECT = 0xC0000130;
487pub const INVALID_IMAGE_WIN_16 = 0xC0000131;
488pub const LOGON_SERVER_CONFLICT = 0xC0000132;
489pub const TIME_DIFFERENCE_AT_DC = 0xC0000133;
490pub const SYNCHRONIZATION_REQUIRED = 0xC0000134;
491pub const DLL_NOT_FOUND = 0xC0000135;
492pub const OPEN_FAILED = 0xC0000136;
493pub const IO_PRIVILEGE_FAILED = 0xC0000137;
494pub const ORDINAL_NOT_FOUND = 0xC0000138;
495pub const ENTRYPOINT_NOT_FOUND = 0xC0000139;
496pub const CONTROL_C_EXIT = 0xC000013A;
497pub const LOCAL_DISCONNECT = 0xC000013B;
498pub const REMOTE_DISCONNECT = 0xC000013C;
499pub const REMOTE_RESOURCES = 0xC000013D;
500pub const LINK_FAILED = 0xC000013E;
501pub const LINK_TIMEOUT = 0xC000013F;
502pub const INVALID_CONNECTION = 0xC0000140;
503pub const INVALID_ADDRESS = 0xC0000141;
504pub const DLL_INIT_FAILED = 0xC0000142;
505pub const MISSING_SYSTEMFILE = 0xC0000143;
506pub const UNHANDLED_EXCEPTION = 0xC0000144;
507pub const APP_INIT_FAILURE = 0xC0000145;
508pub const PAGEFILE_CREATE_FAILED = 0xC0000146;
509pub const NO_PAGEFILE = 0xC0000147;
510pub const INVALID_LEVEL = 0xC0000148;
511pub const WRONG_PASSWORD_CORE = 0xC0000149;
512pub const ILLEGAL_FLOAT_CONTEXT = 0xC000014A;
513pub const PIPE_BROKEN = 0xC000014B;
514pub const REGISTRY_CORRUPT = 0xC000014C;
515pub const REGISTRY_IO_FAILED = 0xC000014D;
516pub const NO_EVENT_PAIR = 0xC000014E;
517pub const UNRECOGNIZED_VOLUME = 0xC000014F;
518pub const SERIAL_NO_DEVICE_INITED = 0xC0000150;
519pub const NO_SUCH_ALIAS = 0xC0000151;
520pub const MEMBER_NOT_IN_ALIAS = 0xC0000152;
521pub const MEMBER_IN_ALIAS = 0xC0000153;
522pub const ALIAS_EXISTS = 0xC0000154;
523pub const LOGON_NOT_GRANTED = 0xC0000155;
524pub const TOO_MANY_SECRETS = 0xC0000156;
525pub const SECRET_TOO_LONG = 0xC0000157;
526pub const INTERNAL_DB_ERROR = 0xC0000158;
527pub const FULLSCREEN_MODE = 0xC0000159;
528pub const TOO_MANY_CONTEXT_IDS = 0xC000015A;
529pub const LOGON_TYPE_NOT_GRANTED = 0xC000015B;
530pub const NOT_REGISTRY_FILE = 0xC000015C;
531pub const NT_CROSS_ENCRYPTION_REQUIRED = 0xC000015D;
532pub const DOMAIN_CTRLR_CONFIG_ERROR = 0xC000015E;
533pub const FT_MISSING_MEMBER = 0xC000015F;
534pub const ILL_FORMED_SERVICE_ENTRY = 0xC0000160;
535pub const ILLEGAL_CHARACTER = 0xC0000161;
536pub const UNMAPPABLE_CHARACTER = 0xC0000162;
537pub const UNDEFINED_CHARACTER = 0xC0000163;
538pub const FLOPPY_VOLUME = 0xC0000164;
539pub const FLOPPY_ID_MARK_NOT_FOUND = 0xC0000165;
540pub const FLOPPY_WRONG_CYLINDER = 0xC0000166;
541pub const FLOPPY_UNKNOWN_ERROR = 0xC0000167;
542pub const FLOPPY_BAD_REGISTERS = 0xC0000168;
543pub const DISK_RECALIBRATE_FAILED = 0xC0000169;
544pub const DISK_OPERATION_FAILED = 0xC000016A;
545pub const DISK_RESET_FAILED = 0xC000016B;
546pub const SHARED_IRQ_BUSY = 0xC000016C;
547pub const FT_ORPHANING = 0xC000016D;
548pub const BIOS_FAILED_TO_CONNECT_INTERRUPT = 0xC000016E;
549pub const PARTITION_FAILURE = 0xC0000172;
550pub const INVALID_BLOCK_LENGTH = 0xC0000173;
551pub const DEVICE_NOT_PARTITIONED = 0xC0000174;
552pub const UNABLE_TO_LOCK_MEDIA = 0xC0000175;
553pub const UNABLE_TO_UNLOAD_MEDIA = 0xC0000176;
554pub const EOM_OVERFLOW = 0xC0000177;
555pub const NO_MEDIA = 0xC0000178;
556pub const NO_SUCH_MEMBER = 0xC000017A;
557pub const INVALID_MEMBER = 0xC000017B;
558pub const KEY_DELETED = 0xC000017C;
559pub const NO_LOG_SPACE = 0xC000017D;
560pub const TOO_MANY_SIDS = 0xC000017E;
561pub const LM_CROSS_ENCRYPTION_REQUIRED = 0xC000017F;
562pub const KEY_HAS_CHILDREN = 0xC0000180;
563pub const CHILD_MUST_BE_VOLATILE = 0xC0000181;
564pub const DEVICE_CONFIGURATION_ERROR = 0xC0000182;
565pub const DRIVER_INTERNAL_ERROR = 0xC0000183;
566pub const INVALID_DEVICE_STATE = 0xC0000184;
567pub const IO_DEVICE_ERROR = 0xC0000185;
568pub const DEVICE_PROTOCOL_ERROR = 0xC0000186;
569pub const BACKUP_CONTROLLER = 0xC0000187;
570pub const LOG_FILE_FULL = 0xC0000188;
571pub const TOO_LATE = 0xC0000189;
572pub const NO_TRUST_LSA_SECRET = 0xC000018A;
573pub const NO_TRUST_SAM_ACCOUNT = 0xC000018B;
574pub const TRUSTED_DOMAIN_FAILURE = 0xC000018C;
575pub const TRUSTED_RELATIONSHIP_FAILURE = 0xC000018D;
576pub const EVENTLOG_FILE_CORRUPT = 0xC000018E;
577pub const EVENTLOG_CANT_START = 0xC000018F;
578pub const TRUST_FAILURE = 0xC0000190;
579pub const MUTANT_LIMIT_EXCEEDED = 0xC0000191;
580pub const NETLOGON_NOT_STARTED = 0xC0000192;
581pub const ACCOUNT_EXPIRED = 0xC0000193;
582pub const POSSIBLE_DEADLOCK = 0xC0000194;
583pub const NETWORK_CREDENTIAL_CONFLICT = 0xC0000195;
584pub const REMOTE_SESSION_LIMIT = 0xC0000196;
585pub const EVENTLOG_FILE_CHANGED = 0xC0000197;
586pub const NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = 0xC0000198;
587pub const NOLOGON_WORKSTATION_TRUST_ACCOUNT = 0xC0000199;
588pub const NOLOGON_SERVER_TRUST_ACCOUNT = 0xC000019A;
589pub const DOMAIN_TRUST_INCONSISTENT = 0xC000019B;
590pub const FS_DRIVER_REQUIRED = 0xC000019C;
591pub const IMAGE_ALREADY_LOADED_AS_DLL = 0xC000019D;
592pub const INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING = 0xC000019E;
593pub const SHORT_NAMES_NOT_ENABLED_ON_VOLUME = 0xC000019F;
594pub const SECURITY_STREAM_IS_INCONSISTENT = 0xC00001A0;
595pub const INVALID_LOCK_RANGE = 0xC00001A1;
596pub const INVALID_ACE_CONDITION = 0xC00001A2;
597pub const IMAGE_SUBSYSTEM_NOT_PRESENT = 0xC00001A3;
598pub const NOTIFICATION_GUID_ALREADY_DEFINED = 0xC00001A4;
599pub const NETWORK_OPEN_RESTRICTION = 0xC0000201;
600pub const NO_USER_SESSION_KEY = 0xC0000202;
601pub const USER_SESSION_DELETED = 0xC0000203;
602pub const RESOURCE_LANG_NOT_FOUND = 0xC0000204;
603pub const INSUFF_SERVER_RESOURCES = 0xC0000205;
604pub const INVALID_BUFFER_SIZE = 0xC0000206;
605pub const INVALID_ADDRESS_COMPONENT = 0xC0000207;
606pub const INVALID_ADDRESS_WILDCARD = 0xC0000208;
607pub const TOO_MANY_ADDRESSES = 0xC0000209;
608pub const ADDRESS_ALREADY_EXISTS = 0xC000020A;
609pub const ADDRESS_CLOSED = 0xC000020B;
610pub const CONNECTION_DISCONNECTED = 0xC000020C;
611pub const CONNECTION_RESET = 0xC000020D;
612pub const TOO_MANY_NODES = 0xC000020E;
613pub const TRANSACTION_ABORTED = 0xC000020F;
614pub const TRANSACTION_TIMED_OUT = 0xC0000210;
615pub const TRANSACTION_NO_RELEASE = 0xC0000211;
616pub const TRANSACTION_NO_MATCH = 0xC0000212;
617pub const TRANSACTION_RESPONDED = 0xC0000213;
618pub const TRANSACTION_INVALID_ID = 0xC0000214;
619pub const TRANSACTION_INVALID_TYPE = 0xC0000215;
620pub const NOT_SERVER_SESSION = 0xC0000216;
621pub const NOT_CLIENT_SESSION = 0xC0000217;
622pub const CANNOT_LOAD_REGISTRY_FILE = 0xC0000218;
623pub const DEBUG_ATTACH_FAILED = 0xC0000219;
624pub const SYSTEM_PROCESS_TERMINATED = 0xC000021A;
625pub const DATA_NOT_ACCEPTED = 0xC000021B;
626pub const NO_BROWSER_SERVERS_FOUND = 0xC000021C;
627pub const VDM_HARD_ERROR = 0xC000021D;
628pub const DRIVER_CANCEL_TIMEOUT = 0xC000021E;
629pub const REPLY_MESSAGE_MISMATCH = 0xC000021F;
630pub const MAPPED_ALIGNMENT = 0xC0000220;
631pub const IMAGE_CHECKSUM_MISMATCH = 0xC0000221;
632pub const LOST_WRITEBEHIND_DATA = 0xC0000222;
633pub const CLIENT_SERVER_PARAMETERS_INVALID = 0xC0000223;
634pub const PASSWORD_MUST_CHANGE = 0xC0000224;
635pub const NOT_FOUND = 0xC0000225;
636pub const NOT_TINY_STREAM = 0xC0000226;
637pub const RECOVERY_FAILURE = 0xC0000227;
638pub const STACK_OVERFLOW_READ = 0xC0000228;
639pub const FAIL_CHECK = 0xC0000229;
640pub const DUPLICATE_OBJECTID = 0xC000022A;
641pub const OBJECTID_EXISTS = 0xC000022B;
642pub const CONVERT_TO_LARGE = 0xC000022C;
643pub const RETRY = 0xC000022D;
644pub const FOUND_OUT_OF_SCOPE = 0xC000022E;
645pub const ALLOCATE_BUCKET = 0xC000022F;
646pub const PROPSET_NOT_FOUND = 0xC0000230;
647pub const MARSHALL_OVERFLOW = 0xC0000231;
648pub const INVALID_VARIANT = 0xC0000232;
649pub const DOMAIN_CONTROLLER_NOT_FOUND = 0xC0000233;
650pub const ACCOUNT_LOCKED_OUT = 0xC0000234;
651pub const HANDLE_NOT_CLOSABLE = 0xC0000235;
652pub const CONNECTION_REFUSED = 0xC0000236;
653pub const GRACEFUL_DISCONNECT = 0xC0000237;
654pub const ADDRESS_ALREADY_ASSOCIATED = 0xC0000238;
655pub const ADDRESS_NOT_ASSOCIATED = 0xC0000239;
656pub const CONNECTION_INVALID = 0xC000023A;
657pub const CONNECTION_ACTIVE = 0xC000023B;
658pub const NETWORK_UNREACHABLE = 0xC000023C;
659pub const HOST_UNREACHABLE = 0xC000023D;
660pub const PROTOCOL_UNREACHABLE = 0xC000023E;
661pub const PORT_UNREACHABLE = 0xC000023F;
662pub const REQUEST_ABORTED = 0xC0000240;
663pub const CONNECTION_ABORTED = 0xC0000241;
664pub const BAD_COMPRESSION_BUFFER = 0xC0000242;
665pub const USER_MAPPED_FILE = 0xC0000243;
666pub const AUDIT_FAILED = 0xC0000244;
667pub const TIMER_RESOLUTION_NOT_SET = 0xC0000245;
668pub const CONNECTION_COUNT_LIMIT = 0xC0000246;
669pub const LOGIN_TIME_RESTRICTION = 0xC0000247;
670pub const LOGIN_WKSTA_RESTRICTION = 0xC0000248;
671pub const IMAGE_MP_UP_MISMATCH = 0xC0000249;
672pub const INSUFFICIENT_LOGON_INFO = 0xC0000250;
673pub const BAD_DLL_ENTRYPOINT = 0xC0000251;
674pub const BAD_SERVICE_ENTRYPOINT = 0xC0000252;
675pub const LPC_REPLY_LOST = 0xC0000253;
676pub const IP_ADDRESS_CONFLICT1 = 0xC0000254;
677pub const IP_ADDRESS_CONFLICT2 = 0xC0000255;
678pub const REGISTRY_QUOTA_LIMIT = 0xC0000256;
679pub const PATH_NOT_COVERED = 0xC0000257;
680pub const NO_CALLBACK_ACTIVE = 0xC0000258;
681pub const LICENSE_QUOTA_EXCEEDED = 0xC0000259;
682pub const PWD_TOO_SHORT = 0xC000025A;
683pub const PWD_TOO_RECENT = 0xC000025B;
684pub const PWD_HISTORY_CONFLICT = 0xC000025C;
685pub const PLUGPLAY_NO_DEVICE = 0xC000025E;
686pub const UNSUPPORTED_COMPRESSION = 0xC000025F;
687pub const INVALID_HW_PROFILE = 0xC0000260;
688pub const INVALID_PLUGPLAY_DEVICE_PATH = 0xC0000261;
689pub const DRIVER_ORDINAL_NOT_FOUND = 0xC0000262;
690pub const DRIVER_ENTRYPOINT_NOT_FOUND = 0xC0000263;
691pub const RESOURCE_NOT_OWNED = 0xC0000264;
692pub const TOO_MANY_LINKS = 0xC0000265;
693pub const QUOTA_LIST_INCONSISTENT = 0xC0000266;
694pub const FILE_IS_OFFLINE = 0xC0000267;
695pub const EVALUATION_EXPIRATION = 0xC0000268;
696pub const ILLEGAL_DLL_RELOCATION = 0xC0000269;
697pub const LICENSE_VIOLATION = 0xC000026A;
698pub const DLL_INIT_FAILED_LOGOFF = 0xC000026B;
699pub const DRIVER_UNABLE_TO_LOAD = 0xC000026C;
700pub const DFS_UNAVAILABLE = 0xC000026D;
701pub const VOLUME_DISMOUNTED = 0xC000026E;
702pub const WX86_INTERNAL_ERROR = 0xC000026F;
703pub const WX86_FLOAT_STACK_CHECK = 0xC0000270;
704pub const VALIDATE_CONTINUE = 0xC0000271;
705pub const NO_MATCH = 0xC0000272;
706pub const NO_MORE_MATCHES = 0xC0000273;
707pub const NOT_A_REPARSE_POINT = 0xC0000275;
708pub const IO_REPARSE_TAG_INVALID = 0xC0000276;
709pub const IO_REPARSE_TAG_MISMATCH = 0xC0000277;
710pub const IO_REPARSE_DATA_INVALID = 0xC0000278;
711pub const IO_REPARSE_TAG_NOT_HANDLED = 0xC0000279;
712pub const REPARSE_POINT_NOT_RESOLVED = 0xC0000280;
713pub const DIRECTORY_IS_A_REPARSE_POINT = 0xC0000281;
714pub const RANGE_LIST_CONFLICT = 0xC0000282;
715pub const SOURCE_ELEMENT_EMPTY = 0xC0000283;
716pub const DESTINATION_ELEMENT_FULL = 0xC0000284;
717pub const ILLEGAL_ELEMENT_ADDRESS = 0xC0000285;
718pub const MAGAZINE_NOT_PRESENT = 0xC0000286;
719pub const REINITIALIZATION_NEEDED = 0xC0000287;
720pub const ENCRYPTION_FAILED = 0xC000028A;
721pub const DECRYPTION_FAILED = 0xC000028B;
722pub const RANGE_NOT_FOUND = 0xC000028C;
723pub const NO_RECOVERY_POLICY = 0xC000028D;
724pub const NO_EFS = 0xC000028E;
725pub const WRONG_EFS = 0xC000028F;
726pub const NO_USER_KEYS = 0xC0000290;
727pub const FILE_NOT_ENCRYPTED = 0xC0000291;
728pub const NOT_EXPORT_FORMAT = 0xC0000292;
729pub const FILE_ENCRYPTED = 0xC0000293;
730pub const WMI_GUID_NOT_FOUND = 0xC0000295;
731pub const WMI_INSTANCE_NOT_FOUND = 0xC0000296;
732pub const WMI_ITEMID_NOT_FOUND = 0xC0000297;
733pub const WMI_TRY_AGAIN = 0xC0000298;
734pub const SHARED_POLICY = 0xC0000299;
735pub const POLICY_OBJECT_NOT_FOUND = 0xC000029A;
736pub const POLICY_ONLY_IN_DS = 0xC000029B;
737pub const VOLUME_NOT_UPGRADED = 0xC000029C;
738pub const REMOTE_STORAGE_NOT_ACTIVE = 0xC000029D;
739pub const REMOTE_STORAGE_MEDIA_ERROR = 0xC000029E;
740pub const NO_TRACKING_SERVICE = 0xC000029F;
741pub const SERVER_SID_MISMATCH = 0xC00002A0;
742pub const DS_NO_ATTRIBUTE_OR_VALUE = 0xC00002A1;
743pub const DS_INVALID_ATTRIBUTE_SYNTAX = 0xC00002A2;
744pub const DS_ATTRIBUTE_TYPE_UNDEFINED = 0xC00002A3;
745pub const DS_ATTRIBUTE_OR_VALUE_EXISTS = 0xC00002A4;
746pub const DS_BUSY = 0xC00002A5;
747pub const DS_UNAVAILABLE = 0xC00002A6;
748pub const DS_NO_RIDS_ALLOCATED = 0xC00002A7;
749pub const DS_NO_MORE_RIDS = 0xC00002A8;
750pub const DS_INCORRECT_ROLE_OWNER = 0xC00002A9;
751pub const DS_RIDMGR_INIT_ERROR = 0xC00002AA;
752pub const DS_OBJ_CLASS_VIOLATION = 0xC00002AB;
753pub const DS_CANT_ON_NON_LEAF = 0xC00002AC;
754pub const DS_CANT_ON_RDN = 0xC00002AD;
755pub const DS_CANT_MOD_OBJ_CLASS = 0xC00002AE;
756pub const DS_CROSS_DOM_MOVE_FAILED = 0xC00002AF;
757pub const DS_GC_NOT_AVAILABLE = 0xC00002B0;
758pub const DIRECTORY_SERVICE_REQUIRED = 0xC00002B1;
759pub const REPARSE_ATTRIBUTE_CONFLICT = 0xC00002B2;
760pub const CANT_ENABLE_DENY_ONLY = 0xC00002B3;
761pub const FLOAT_MULTIPLE_FAULTS = 0xC00002B4;
762pub const FLOAT_MULTIPLE_TRAPS = 0xC00002B5;
763pub const DEVICE_REMOVED = 0xC00002B6;
764pub const JOURNAL_DELETE_IN_PROGRESS = 0xC00002B7;
765pub const JOURNAL_NOT_ACTIVE = 0xC00002B8;
766pub const NOINTERFACE = 0xC00002B9;
767pub const DS_ADMIN_LIMIT_EXCEEDED = 0xC00002C1;
768pub const DRIVER_FAILED_SLEEP = 0xC00002C2;
769pub const MUTUAL_AUTHENTICATION_FAILED = 0xC00002C3;
770pub const CORRUPT_SYSTEM_FILE = 0xC00002C4;
771pub const DATATYPE_MISALIGNMENT_ERROR = 0xC00002C5;
772pub const WMI_READ_ONLY = 0xC00002C6;
773pub const WMI_SET_FAILURE = 0xC00002C7;
774pub const COMMITMENT_MINIMUM = 0xC00002C8;
775pub const REG_NAT_CONSUMPTION = 0xC00002C9;
776pub const TRANSPORT_FULL = 0xC00002CA;
777pub const DS_SAM_INIT_FAILURE = 0xC00002CB;
778pub const ONLY_IF_CONNECTED = 0xC00002CC;
779pub const DS_SENSITIVE_GROUP_VIOLATION = 0xC00002CD;
780pub const PNP_RESTART_ENUMERATION = 0xC00002CE;
781pub const JOURNAL_ENTRY_DELETED = 0xC00002CF;
782pub const DS_CANT_MOD_PRIMARYGROUPID = 0xC00002D0;
783pub const SYSTEM_IMAGE_BAD_SIGNATURE = 0xC00002D1;
784pub const PNP_REBOOT_REQUIRED = 0xC00002D2;
785pub const POWER_STATE_INVALID = 0xC00002D3;
786pub const DS_INVALID_GROUP_TYPE = 0xC00002D4;
787pub const DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN = 0xC00002D5;
788pub const DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN = 0xC00002D6;
789pub const DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER = 0xC00002D7;
790pub const DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER = 0xC00002D8;
791pub const DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER = 0xC00002D9;
792pub const DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER = 0xC00002DA;
793pub const DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER = 0xC00002DB;
794pub const DS_HAVE_PRIMARY_MEMBERS = 0xC00002DC;
795pub const WMI_NOT_SUPPORTED = 0xC00002DD;
796pub const INSUFFICIENT_POWER = 0xC00002DE;
797pub const SAM_NEED_BOOTKEY_PASSWORD = 0xC00002DF;
798pub const SAM_NEED_BOOTKEY_FLOPPY = 0xC00002E0;
799pub const DS_CANT_START = 0xC00002E1;
800pub const DS_INIT_FAILURE = 0xC00002E2;
801pub const SAM_INIT_FAILURE = 0xC00002E3;
802pub const DS_GC_REQUIRED = 0xC00002E4;
803pub const DS_LOCAL_MEMBER_OF_LOCAL_ONLY = 0xC00002E5;
804pub const DS_NO_FPO_IN_UNIVERSAL_GROUPS = 0xC00002E6;
805pub const DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED = 0xC00002E7;
806pub const CURRENT_DOMAIN_NOT_ALLOWED = 0xC00002E9;
807pub const CANNOT_MAKE = 0xC00002EA;
808pub const SYSTEM_SHUTDOWN = 0xC00002EB;
809pub const DS_INIT_FAILURE_CONSOLE = 0xC00002EC;
810pub const DS_SAM_INIT_FAILURE_CONSOLE = 0xC00002ED;
811pub const UNFINISHED_CONTEXT_DELETED = 0xC00002EE;
812pub const NO_TGT_REPLY = 0xC00002EF;
813pub const OBJECTID_NOT_FOUND = 0xC00002F0;
814pub const NO_IP_ADDRESSES = 0xC00002F1;
815pub const WRONG_CREDENTIAL_HANDLE = 0xC00002F2;
816pub const CRYPTO_SYSTEM_INVALID = 0xC00002F3;
817pub const MAX_REFERRALS_EXCEEDED = 0xC00002F4;
818pub const MUST_BE_KDC = 0xC00002F5;
819pub const STRONG_CRYPTO_NOT_SUPPORTED = 0xC00002F6;
820pub const TOO_MANY_PRINCIPALS = 0xC00002F7;
821pub const NO_PA_DATA = 0xC00002F8;
822pub const PKINIT_NAME_MISMATCH = 0xC00002F9;
823pub const SMARTCARD_LOGON_REQUIRED = 0xC00002FA;
824pub const KDC_INVALID_REQUEST = 0xC00002FB;
825pub const KDC_UNABLE_TO_REFER = 0xC00002FC;
826pub const KDC_UNKNOWN_ETYPE = 0xC00002FD;
827pub const SHUTDOWN_IN_PROGRESS = 0xC00002FE;
828pub const SERVER_SHUTDOWN_IN_PROGRESS = 0xC00002FF;
829pub const NOT_SUPPORTED_ON_SBS = 0xC0000300;
830pub const WMI_GUID_DISCONNECTED = 0xC0000301;
831pub const WMI_ALREADY_DISABLED = 0xC0000302;
832pub const WMI_ALREADY_ENABLED = 0xC0000303;
833pub const MFT_TOO_FRAGMENTED = 0xC0000304;
834pub const COPY_PROTECTION_FAILURE = 0xC0000305;
835pub const CSS_AUTHENTICATION_FAILURE = 0xC0000306;
836pub const CSS_KEY_NOT_PRESENT = 0xC0000307;
837pub const CSS_KEY_NOT_ESTABLISHED = 0xC0000308;
838pub const CSS_SCRAMBLED_SECTOR = 0xC0000309;
839pub const CSS_REGION_MISMATCH = 0xC000030A;
840pub const CSS_RESETS_EXHAUSTED = 0xC000030B;
841pub const PKINIT_FAILURE = 0xC0000320;
842pub const SMARTCARD_SUBSYSTEM_FAILURE = 0xC0000321;
843pub const NO_KERB_KEY = 0xC0000322;
844pub const HOST_DOWN = 0xC0000350;
845pub const UNSUPPORTED_PREAUTH = 0xC0000351;
846pub const EFS_ALG_BLOB_TOO_BIG = 0xC0000352;
847pub const PORT_NOT_SET = 0xC0000353;
848pub const DEBUGGER_INACTIVE = 0xC0000354;
849pub const DS_VERSION_CHECK_FAILURE = 0xC0000355;
850pub const AUDITING_DISABLED = 0xC0000356;
851pub const PRENT4_MACHINE_ACCOUNT = 0xC0000357;
852pub const DS_AG_CANT_HAVE_UNIVERSAL_MEMBER = 0xC0000358;
853pub const INVALID_IMAGE_WIN_32 = 0xC0000359;
854pub const INVALID_IMAGE_WIN_64 = 0xC000035A;
855pub const BAD_BINDINGS = 0xC000035B;
856pub const NETWORK_SESSION_EXPIRED = 0xC000035C;
857pub const APPHELP_BLOCK = 0xC000035D;
858pub const ALL_SIDS_FILTERED = 0xC000035E;
859pub const NOT_SAFE_MODE_DRIVER = 0xC000035F;
860pub const ACCESS_DISABLED_BY_POLICY_DEFAULT = 0xC0000361;
861pub const ACCESS_DISABLED_BY_POLICY_PATH = 0xC0000362;
862pub const ACCESS_DISABLED_BY_POLICY_PUBLISHER = 0xC0000363;
863pub const ACCESS_DISABLED_BY_POLICY_OTHER = 0xC0000364;
864pub const FAILED_DRIVER_ENTRY = 0xC0000365;
865pub const DEVICE_ENUMERATION_ERROR = 0xC0000366;
866pub const MOUNT_POINT_NOT_RESOLVED = 0xC0000368;
867pub const INVALID_DEVICE_OBJECT_PARAMETER = 0xC0000369;
868pub const MCA_OCCURED = 0xC000036A;
869pub const DRIVER_BLOCKED_CRITICAL = 0xC000036B;
870pub const DRIVER_BLOCKED = 0xC000036C;
871pub const DRIVER_DATABASE_ERROR = 0xC000036D;
872pub const SYSTEM_HIVE_TOO_LARGE = 0xC000036E;
873pub const INVALID_IMPORT_OF_NON_DLL = 0xC000036F;
874pub const NO_SECRETS = 0xC0000371;
875pub const ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY = 0xC0000372;
876pub const FAILED_STACK_SWITCH = 0xC0000373;
877pub const HEAP_CORRUPTION = 0xC0000374;
878pub const SMARTCARD_WRONG_PIN = 0xC0000380;
879pub const SMARTCARD_CARD_BLOCKED = 0xC0000381;
880pub const SMARTCARD_CARD_NOT_AUTHENTICATED = 0xC0000382;
881pub const SMARTCARD_NO_CARD = 0xC0000383;
882pub const SMARTCARD_NO_KEY_CONTAINER = 0xC0000384;
883pub const SMARTCARD_NO_CERTIFICATE = 0xC0000385;
884pub const SMARTCARD_NO_KEYSET = 0xC0000386;
885pub const SMARTCARD_IO_ERROR = 0xC0000387;
886pub const DOWNGRADE_DETECTED = 0xC0000388;
887pub const SMARTCARD_CERT_REVOKED = 0xC0000389;
888pub const ISSUING_CA_UNTRUSTED = 0xC000038A;
889pub const REVOCATION_OFFLINE_C = 0xC000038B;
890pub const PKINIT_CLIENT_FAILURE = 0xC000038C;
891pub const SMARTCARD_CERT_EXPIRED = 0xC000038D;
892pub const DRIVER_FAILED_PRIOR_UNLOAD = 0xC000038E;
893pub const SMARTCARD_SILENT_CONTEXT = 0xC000038F;
894pub const PER_USER_TRUST_QUOTA_EXCEEDED = 0xC0000401;
895pub const ALL_USER_TRUST_QUOTA_EXCEEDED = 0xC0000402;
896pub const USER_DELETE_TRUST_QUOTA_EXCEEDED = 0xC0000403;
897pub const DS_NAME_NOT_UNIQUE = 0xC0000404;
898pub const DS_DUPLICATE_ID_FOUND = 0xC0000405;
899pub const DS_GROUP_CONVERSION_ERROR = 0xC0000406;
900pub const VOLSNAP_PREPARE_HIBERNATE = 0xC0000407;
901pub const USER2USER_REQUIRED = 0xC0000408;
902pub const STACK_BUFFER_OVERRUN = 0xC0000409;
903pub const NO_S4U_PROT_SUPPORT = 0xC000040A;
904pub const CROSSREALM_DELEGATION_FAILURE = 0xC000040B;
905pub const REVOCATION_OFFLINE_KDC = 0xC000040C;
906pub const ISSUING_CA_UNTRUSTED_KDC = 0xC000040D;
907pub const KDC_CERT_EXPIRED = 0xC000040E;
908pub const KDC_CERT_REVOKED = 0xC000040F;
909pub const PARAMETER_QUOTA_EXCEEDED = 0xC0000410;
910pub const HIBERNATION_FAILURE = 0xC0000411;
911pub const DELAY_LOAD_FAILED = 0xC0000412;
912pub const AUTHENTICATION_FIREWALL_FAILED = 0xC0000413;
913pub const VDM_DISALLOWED = 0xC0000414;
914pub const HUNG_DISPLAY_DRIVER_THREAD = 0xC0000415;
915pub const INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE = 0xC0000416;
916pub const INVALID_CRUNTIME_PARAMETER = 0xC0000417;
917pub const NTLM_BLOCKED = 0xC0000418;
918pub const DS_SRC_SID_EXISTS_IN_FOREST = 0xC0000419;
919pub const DS_DOMAIN_NAME_EXISTS_IN_FOREST = 0xC000041A;
920pub const DS_FLAT_NAME_EXISTS_IN_FOREST = 0xC000041B;
921pub const INVALID_USER_PRINCIPAL_NAME = 0xC000041C;
922pub const ASSERTION_FAILURE = 0xC0000420;
923pub const VERIFIER_STOP = 0xC0000421;
924pub const CALLBACK_POP_STACK = 0xC0000423;
925pub const INCOMPATIBLE_DRIVER_BLOCKED = 0xC0000424;
926pub const HIVE_UNLOADED = 0xC0000425;
927pub const COMPRESSION_DISABLED = 0xC0000426;
928pub const FILE_SYSTEM_LIMITATION = 0xC0000427;
929pub const INVALID_IMAGE_HASH = 0xC0000428;
930pub const NOT_CAPABLE = 0xC0000429;
931pub const REQUEST_OUT_OF_SEQUENCE = 0xC000042A;
932pub const IMPLEMENTATION_LIMIT = 0xC000042B;
933pub const ELEVATION_REQUIRED = 0xC000042C;
934pub const NO_SECURITY_CONTEXT = 0xC000042D;
935pub const PKU2U_CERT_FAILURE = 0xC000042E;
936pub const BEYOND_VDL = 0xC0000432;
937pub const ENCOUNTERED_WRITE_IN_PROGRESS = 0xC0000433;
938pub const PTE_CHANGED = 0xC0000434;
939pub const PURGE_FAILED = 0xC0000435;
940pub const CRED_REQUIRES_CONFIRMATION = 0xC0000440;
941pub const CS_ENCRYPTION_INVALID_SERVER_RESPONSE = 0xC0000441;
942pub const CS_ENCRYPTION_UNSUPPORTED_SERVER = 0xC0000442;
943pub const CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE = 0xC0000443;
944pub const CS_ENCRYPTION_NEW_ENCRYPTED_FILE = 0xC0000444;
945pub const CS_ENCRYPTION_FILE_NOT_CSE = 0xC0000445;
946pub const INVALID_LABEL = 0xC0000446;
947pub const DRIVER_PROCESS_TERMINATED = 0xC0000450;
948pub const AMBIGUOUS_SYSTEM_DEVICE = 0xC0000451;
949pub const SYSTEM_DEVICE_NOT_FOUND = 0xC0000452;
950pub const RESTART_BOOT_APPLICATION = 0xC0000453;
951pub const INSUFFICIENT_NVRAM_RESOURCES = 0xC0000454;
952pub const INVALID_TASK_NAME = 0xC0000500;
953pub const INVALID_TASK_INDEX = 0xC0000501;
954pub const THREAD_ALREADY_IN_TASK = 0xC0000502;
955pub const CALLBACK_BYPASS = 0xC0000503;
956pub const FAIL_FAST_EXCEPTION = 0xC0000602;
957pub const IMAGE_CERT_REVOKED = 0xC0000603;
958pub const PORT_CLOSED = 0xC0000700;
959pub const MESSAGE_LOST = 0xC0000701;
960pub const INVALID_MESSAGE = 0xC0000702;
961pub const REQUEST_CANCELED = 0xC0000703;
962pub const RECURSIVE_DISPATCH = 0xC0000704;
963pub const LPC_RECEIVE_BUFFER_EXPECTED = 0xC0000705;
964pub const LPC_INVALID_CONNECTION_USAGE = 0xC0000706;
965pub const LPC_REQUESTS_NOT_ALLOWED = 0xC0000707;
966pub const RESOURCE_IN_USE = 0xC0000708;
967pub const HARDWARE_MEMORY_ERROR = 0xC0000709;
968pub const THREADPOOL_HANDLE_EXCEPTION = 0xC000070A;
969pub const THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED = 0xC000070B;
970pub const THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED = 0xC000070C;
971pub const THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED = 0xC000070D;
972pub const THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED = 0xC000070E;
973pub const THREADPOOL_RELEASED_DURING_OPERATION = 0xC000070F;
974pub const CALLBACK_RETURNED_WHILE_IMPERSONATING = 0xC0000710;
975pub const APC_RETURNED_WHILE_IMPERSONATING = 0xC0000711;
976pub const PROCESS_IS_PROTECTED = 0xC0000712;
977pub const MCA_EXCEPTION = 0xC0000713;
978pub const CERTIFICATE_MAPPING_NOT_UNIQUE = 0xC0000714;
979pub const SYMLINK_CLASS_DISABLED = 0xC0000715;
980pub const INVALID_IDN_NORMALIZATION = 0xC0000716;
981pub const NO_UNICODE_TRANSLATION = 0xC0000717;
982pub const ALREADY_REGISTERED = 0xC0000718;
983pub const CONTEXT_MISMATCH = 0xC0000719;
984pub const PORT_ALREADY_HAS_COMPLETION_LIST = 0xC000071A;
985pub const CALLBACK_RETURNED_THREAD_PRIORITY = 0xC000071B;
986pub const INVALID_THREAD = 0xC000071C;
987pub const CALLBACK_RETURNED_TRANSACTION = 0xC000071D;
988pub const CALLBACK_RETURNED_LDR_LOCK = 0xC000071E;
989pub const CALLBACK_RETURNED_LANG = 0xC000071F;
990pub const CALLBACK_RETURNED_PRI_BACK = 0xC0000720;
991pub const DISK_REPAIR_DISABLED = 0xC0000800;
992pub const DS_DOMAIN_RENAME_IN_PROGRESS = 0xC0000801;
993pub const DISK_QUOTA_EXCEEDED = 0xC0000802;
994pub const CONTENT_BLOCKED = 0xC0000804;
995pub const BAD_CLUSTERS = 0xC0000805;
996pub const VOLUME_DIRTY = 0xC0000806;
997pub const FILE_CHECKED_OUT = 0xC0000901;
998pub const CHECKOUT_REQUIRED = 0xC0000902;
999pub const BAD_FILE_TYPE = 0xC0000903;
1000pub const FILE_TOO_LARGE = 0xC0000904;
1001pub const FORMS_AUTH_REQUIRED = 0xC0000905;
1002pub const VIRUS_INFECTED = 0xC0000906;
1003pub const VIRUS_DELETED = 0xC0000907;
1004pub const BAD_MCFG_TABLE = 0xC0000908;
1005pub const CANNOT_BREAK_OPLOCK = 0xC0000909;
1006pub const WOW_ASSERTION = 0xC0009898;
1007pub const INVALID_SIGNATURE = 0xC000A000;
1008pub const HMAC_NOT_SUPPORTED = 0xC000A001;
1009pub const IPSEC_QUEUE_OVERFLOW = 0xC000A010;
1010pub const ND_QUEUE_OVERFLOW = 0xC000A011;
1011pub const HOPLIMIT_EXCEEDED = 0xC000A012;
1012pub const PROTOCOL_NOT_SUPPORTED = 0xC000A013;
1013pub const LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED = 0xC000A080;
1014pub const LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR = 0xC000A081;
1015pub const LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR = 0xC000A082;
1016pub const XML_PARSE_ERROR = 0xC000A083;
1017pub const XMLDSIG_ERROR = 0xC000A084;
1018pub const WRONG_COMPARTMENT = 0xC000A085;
1019pub const AUTHIP_FAILURE = 0xC000A086;
1020pub const DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS = 0xC000A087;
1021pub const DS_OID_NOT_FOUND = 0xC000A088;
1022pub const HASH_NOT_SUPPORTED = 0xC000A100;
1023pub const HASH_NOT_PRESENT = 0xC000A101;
1024pub const PNP_BAD_MPS_TABLE = 0xC0040035;
1025pub const PNP_TRANSLATION_FAILED = 0xC0040036;
1026pub const PNP_IRQ_TRANSLATION_FAILED = 0xC0040037;
1027pub const PNP_INVALID_ID = 0xC0040038;
1028pub const IO_REISSUE_AS_CACHED = 0xC0040039;
1029pub const CTX_WINSTATION_NAME_INVALID = 0xC00A0001;
1030pub const CTX_INVALID_PD = 0xC00A0002;
1031pub const CTX_PD_NOT_FOUND = 0xC00A0003;
1032pub const CTX_CLOSE_PENDING = 0xC00A0006;
1033pub const CTX_NO_OUTBUF = 0xC00A0007;
1034pub const CTX_MODEM_INF_NOT_FOUND = 0xC00A0008;
1035pub const CTX_INVALID_MODEMNAME = 0xC00A0009;
1036pub const CTX_RESPONSE_ERROR = 0xC00A000A;
1037pub const CTX_MODEM_RESPONSE_TIMEOUT = 0xC00A000B;
1038pub const CTX_MODEM_RESPONSE_NO_CARRIER = 0xC00A000C;
1039pub const CTX_MODEM_RESPONSE_NO_DIALTONE = 0xC00A000D;
1040pub const CTX_MODEM_RESPONSE_BUSY = 0xC00A000E;
1041pub const CTX_MODEM_RESPONSE_VOICE = 0xC00A000F;
1042pub const CTX_TD_ERROR = 0xC00A0010;
1043pub const CTX_LICENSE_CLIENT_INVALID = 0xC00A0012;
1044pub const CTX_LICENSE_NOT_AVAILABLE = 0xC00A0013;
1045pub const CTX_LICENSE_EXPIRED = 0xC00A0014;
1046pub const CTX_WINSTATION_NOT_FOUND = 0xC00A0015;
1047pub const CTX_WINSTATION_NAME_COLLISION = 0xC00A0016;
1048pub const CTX_WINSTATION_BUSY = 0xC00A0017;
1049pub const CTX_BAD_VIDEO_MODE = 0xC00A0018;
1050pub const CTX_GRAPHICS_INVALID = 0xC00A0022;
1051pub const CTX_NOT_CONSOLE = 0xC00A0024;
1052pub const CTX_CLIENT_QUERY_TIMEOUT = 0xC00A0026;
1053pub const CTX_CONSOLE_DISCONNECT = 0xC00A0027;
1054pub const CTX_CONSOLE_CONNECT = 0xC00A0028;
1055pub const CTX_SHADOW_DENIED = 0xC00A002A;
1056pub const CTX_WINSTATION_ACCESS_DENIED = 0xC00A002B;
1057pub const CTX_INVALID_WD = 0xC00A002E;
1058pub const CTX_WD_NOT_FOUND = 0xC00A002F;
1059pub const CTX_SHADOW_INVALID = 0xC00A0030;
1060pub const CTX_SHADOW_DISABLED = 0xC00A0031;
1061pub const RDP_PROTOCOL_ERROR = 0xC00A0032;
1062pub const CTX_CLIENT_LICENSE_NOT_SET = 0xC00A0033;
1063pub const CTX_CLIENT_LICENSE_IN_USE = 0xC00A0034;
1064pub const CTX_SHADOW_ENDED_BY_MODE_CHANGE = 0xC00A0035;
1065pub const CTX_SHADOW_NOT_RUNNING = 0xC00A0036;
1066pub const CTX_LOGON_DISABLED = 0xC00A0037;
1067pub const CTX_SECURITY_LAYER_ERROR = 0xC00A0038;
1068pub const TS_INCOMPATIBLE_SESSIONS = 0xC00A0039;
1069pub const MUI_FILE_NOT_FOUND = 0xC00B0001;
1070pub const MUI_INVALID_FILE = 0xC00B0002;
1071pub const MUI_INVALID_RC_CONFIG = 0xC00B0003;
1072pub const MUI_INVALID_LOCALE_NAME = 0xC00B0004;
1073pub const MUI_INVALID_ULTIMATEFALLBACK_NAME = 0xC00B0005;
1074pub const MUI_FILE_NOT_LOADED = 0xC00B0006;
1075pub const RESOURCE_ENUM_USER_STOP = 0xC00B0007;
1076pub const CLUSTER_INVALID_NODE = 0xC0130001;
1077pub const CLUSTER_NODE_EXISTS = 0xC0130002;
1078pub const CLUSTER_JOIN_IN_PROGRESS = 0xC0130003;
1079pub const CLUSTER_NODE_NOT_FOUND = 0xC0130004;
1080pub const CLUSTER_LOCAL_NODE_NOT_FOUND = 0xC0130005;
1081pub const CLUSTER_NETWORK_EXISTS = 0xC0130006;
1082pub const CLUSTER_NETWORK_NOT_FOUND = 0xC0130007;
1083pub const CLUSTER_NETINTERFACE_EXISTS = 0xC0130008;
1084pub const CLUSTER_NETINTERFACE_NOT_FOUND = 0xC0130009;
1085pub const CLUSTER_INVALID_REQUEST = 0xC013000A;
1086pub const CLUSTER_INVALID_NETWORK_PROVIDER = 0xC013000B;
1087pub const CLUSTER_NODE_DOWN = 0xC013000C;
1088pub const CLUSTER_NODE_UNREACHABLE = 0xC013000D;
1089pub const CLUSTER_NODE_NOT_MEMBER = 0xC013000E;
1090pub const CLUSTER_JOIN_NOT_IN_PROGRESS = 0xC013000F;
1091pub const CLUSTER_INVALID_NETWORK = 0xC0130010;
1092pub const CLUSTER_NO_NET_ADAPTERS = 0xC0130011;
1093pub const CLUSTER_NODE_UP = 0xC0130012;
1094pub const CLUSTER_NODE_PAUSED = 0xC0130013;
1095pub const CLUSTER_NODE_NOT_PAUSED = 0xC0130014;
1096pub const CLUSTER_NO_SECURITY_CONTEXT = 0xC0130015;
1097pub const CLUSTER_NETWORK_NOT_INTERNAL = 0xC0130016;
1098pub const CLUSTER_POISONED = 0xC0130017;
1099pub const ACPI_INVALID_OPCODE = 0xC0140001;
1100pub const ACPI_STACK_OVERFLOW = 0xC0140002;
1101pub const ACPI_ASSERT_FAILED = 0xC0140003;
1102pub const ACPI_INVALID_INDEX = 0xC0140004;
1103pub const ACPI_INVALID_ARGUMENT = 0xC0140005;
1104pub const ACPI_FATAL = 0xC0140006;
1105pub const ACPI_INVALID_SUPERNAME = 0xC0140007;
1106pub const ACPI_INVALID_ARGTYPE = 0xC0140008;
1107pub const ACPI_INVALID_OBJTYPE = 0xC0140009;
1108pub const ACPI_INVALID_TARGETTYPE = 0xC014000A;
1109pub const ACPI_INCORRECT_ARGUMENT_COUNT = 0xC014000B;
1110pub const ACPI_ADDRESS_NOT_MAPPED = 0xC014000C;
1111pub const ACPI_INVALID_EVENTTYPE = 0xC014000D;
1112pub const ACPI_HANDLER_COLLISION = 0xC014000E;
1113pub const ACPI_INVALID_DATA = 0xC014000F;
1114pub const ACPI_INVALID_REGION = 0xC0140010;
1115pub const ACPI_INVALID_ACCESS_SIZE = 0xC0140011;
1116pub const ACPI_ACQUIRE_GLOBAL_LOCK = 0xC0140012;
1117pub const ACPI_ALREADY_INITIALIZED = 0xC0140013;
1118pub const ACPI_NOT_INITIALIZED = 0xC0140014;
1119pub const ACPI_INVALID_MUTEX_LEVEL = 0xC0140015;
1120pub const ACPI_MUTEX_NOT_OWNED = 0xC0140016;
1121pub const ACPI_MUTEX_NOT_OWNER = 0xC0140017;
1122pub const ACPI_RS_ACCESS = 0xC0140018;
1123pub const ACPI_INVALID_TABLE = 0xC0140019;
1124pub const ACPI_REG_HANDLER_FAILED = 0xC0140020;
1125pub const ACPI_POWER_REQUEST_FAILED = 0xC0140021;
1126pub const SXS_SECTION_NOT_FOUND = 0xC0150001;
1127pub const SXS_CANT_GEN_ACTCTX = 0xC0150002;
1128pub const SXS_INVALID_ACTCTXDATA_FORMAT = 0xC0150003;
1129pub const SXS_ASSEMBLY_NOT_FOUND = 0xC0150004;
1130pub const SXS_MANIFEST_FORMAT_ERROR = 0xC0150005;
1131pub const SXS_MANIFEST_PARSE_ERROR = 0xC0150006;
1132pub const SXS_ACTIVATION_CONTEXT_DISABLED = 0xC0150007;
1133pub const SXS_KEY_NOT_FOUND = 0xC0150008;
1134pub const SXS_VERSION_CONFLICT = 0xC0150009;
1135pub const SXS_WRONG_SECTION_TYPE = 0xC015000A;
1136pub const SXS_THREAD_QUERIES_DISABLED = 0xC015000B;
1137pub const SXS_ASSEMBLY_MISSING = 0xC015000C;
1138pub const SXS_PROCESS_DEFAULT_ALREADY_SET = 0xC015000E;
1139pub const SXS_EARLY_DEACTIVATION = 0xC015000F;
1140pub const SXS_INVALID_DEACTIVATION = 0xC0150010;
1141pub const SXS_MULTIPLE_DEACTIVATION = 0xC0150011;
1142pub const SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY = 0xC0150012;
1143pub const SXS_PROCESS_TERMINATION_REQUESTED = 0xC0150013;
1144pub const SXS_CORRUPT_ACTIVATION_STACK = 0xC0150014;
1145pub const SXS_CORRUPTION = 0xC0150015;
1146pub const SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE = 0xC0150016;
1147pub const SXS_INVALID_IDENTITY_ATTRIBUTE_NAME = 0xC0150017;
1148pub const SXS_IDENTITY_DUPLICATE_ATTRIBUTE = 0xC0150018;
1149pub const SXS_IDENTITY_PARSE_ERROR = 0xC0150019;
1150pub const SXS_COMPONENT_STORE_CORRUPT = 0xC015001A;
1151pub const SXS_FILE_HASH_MISMATCH = 0xC015001B;
1152pub const SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT = 0xC015001C;
1153pub const SXS_IDENTITIES_DIFFERENT = 0xC015001D;
1154pub const SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT = 0xC015001E;
1155pub const SXS_FILE_NOT_PART_OF_ASSEMBLY = 0xC015001F;
1156pub const ADVANCED_INSTALLER_FAILED = 0xC0150020;
1157pub const XML_ENCODING_MISMATCH = 0xC0150021;
1158pub const SXS_MANIFEST_TOO_BIG = 0xC0150022;
1159pub const SXS_SETTING_NOT_REGISTERED = 0xC0150023;
1160pub const SXS_TRANSACTION_CLOSURE_INCOMPLETE = 0xC0150024;
1161pub const SMI_PRIMITIVE_INSTALLER_FAILED = 0xC0150025;
1162pub const GENERIC_COMMAND_FAILED = 0xC0150026;
1163pub const SXS_FILE_HASH_MISSING = 0xC0150027;
1164pub const TRANSACTIONAL_CONFLICT = 0xC0190001;
1165pub const INVALID_TRANSACTION = 0xC0190002;
1166pub const TRANSACTION_NOT_ACTIVE = 0xC0190003;
1167pub const TM_INITIALIZATION_FAILED = 0xC0190004;
1168pub const RM_NOT_ACTIVE = 0xC0190005;
1169pub const RM_METADATA_CORRUPT = 0xC0190006;
1170pub const TRANSACTION_NOT_JOINED = 0xC0190007;
1171pub const DIRECTORY_NOT_RM = 0xC0190008;
1172pub const TRANSACTIONS_UNSUPPORTED_REMOTE = 0xC019000A;
1173pub const LOG_RESIZE_INVALID_SIZE = 0xC019000B;
1174pub const REMOTE_FILE_VERSION_MISMATCH = 0xC019000C;
1175pub const CRM_PROTOCOL_ALREADY_EXISTS = 0xC019000F;
1176pub const TRANSACTION_PROPAGATION_FAILED = 0xC0190010;
1177pub const CRM_PROTOCOL_NOT_FOUND = 0xC0190011;
1178pub const TRANSACTION_SUPERIOR_EXISTS = 0xC0190012;
1179pub const TRANSACTION_REQUEST_NOT_VALID = 0xC0190013;
1180pub const TRANSACTION_NOT_REQUESTED = 0xC0190014;
1181pub const TRANSACTION_ALREADY_ABORTED = 0xC0190015;
1182pub const TRANSACTION_ALREADY_COMMITTED = 0xC0190016;
1183pub const TRANSACTION_INVALID_MARSHALL_BUFFER = 0xC0190017;
1184pub const CURRENT_TRANSACTION_NOT_VALID = 0xC0190018;
1185pub const LOG_GROWTH_FAILED = 0xC0190019;
1186pub const OBJECT_NO_LONGER_EXISTS = 0xC0190021;
1187pub const STREAM_MINIVERSION_NOT_FOUND = 0xC0190022;
1188pub const STREAM_MINIVERSION_NOT_VALID = 0xC0190023;
1189pub const MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION = 0xC0190024;
1190pub const CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT = 0xC0190025;
1191pub const CANT_CREATE_MORE_STREAM_MINIVERSIONS = 0xC0190026;
1192pub const HANDLE_NO_LONGER_VALID = 0xC0190028;
1193pub const LOG_CORRUPTION_DETECTED = 0xC0190030;
1194pub const RM_DISCONNECTED = 0xC0190032;
1195pub const ENLISTMENT_NOT_SUPERIOR = 0xC0190033;
1196pub const FILE_IDENTITY_NOT_PERSISTENT = 0xC0190036;
1197pub const CANT_BREAK_TRANSACTIONAL_DEPENDENCY = 0xC0190037;
1198pub const CANT_CROSS_RM_BOUNDARY = 0xC0190038;
1199pub const TXF_DIR_NOT_EMPTY = 0xC0190039;
1200pub const INDOUBT_TRANSACTIONS_EXIST = 0xC019003A;
1201pub const TM_VOLATILE = 0xC019003B;
1202pub const ROLLBACK_TIMER_EXPIRED = 0xC019003C;
1203pub const TXF_ATTRIBUTE_CORRUPT = 0xC019003D;
1204pub const EFS_NOT_ALLOWED_IN_TRANSACTION = 0xC019003E;
1205pub const TRANSACTIONAL_OPEN_NOT_ALLOWED = 0xC019003F;
1206pub const TRANSACTED_MAPPING_UNSUPPORTED_REMOTE = 0xC0190040;
1207pub const TRANSACTION_REQUIRED_PROMOTION = 0xC0190043;
1208pub const CANNOT_EXECUTE_FILE_IN_TRANSACTION = 0xC0190044;
1209pub const TRANSACTIONS_NOT_FROZEN = 0xC0190045;
1210pub const TRANSACTION_FREEZE_IN_PROGRESS = 0xC0190046;
1211pub const NOT_SNAPSHOT_VOLUME = 0xC0190047;
1212pub const NO_SAVEPOINT_WITH_OPEN_FILES = 0xC0190048;
1213pub const SPARSE_NOT_ALLOWED_IN_TRANSACTION = 0xC0190049;
1214pub const TM_IDENTITY_MISMATCH = 0xC019004A;
1215pub const FLOATED_SECTION = 0xC019004B;
1216pub const CANNOT_ACCEPT_TRANSACTED_WORK = 0xC019004C;
1217pub const CANNOT_ABORT_TRANSACTIONS = 0xC019004D;
1218pub const TRANSACTION_NOT_FOUND = 0xC019004E;
1219pub const RESOURCEMANAGER_NOT_FOUND = 0xC019004F;
1220pub const ENLISTMENT_NOT_FOUND = 0xC0190050;
1221pub const TRANSACTIONMANAGER_NOT_FOUND = 0xC0190051;
1222pub const TRANSACTIONMANAGER_NOT_ONLINE = 0xC0190052;
1223pub const TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION = 0xC0190053;
1224pub const TRANSACTION_NOT_ROOT = 0xC0190054;
1225pub const TRANSACTION_OBJECT_EXPIRED = 0xC0190055;
1226pub const COMPRESSION_NOT_ALLOWED_IN_TRANSACTION = 0xC0190056;
1227pub const TRANSACTION_RESPONSE_NOT_ENLISTED = 0xC0190057;
1228pub const TRANSACTION_RECORD_TOO_LONG = 0xC0190058;
1229pub const NO_LINK_TRACKING_IN_TRANSACTION = 0xC0190059;
1230pub const OPERATION_NOT_SUPPORTED_IN_TRANSACTION = 0xC019005A;
1231pub const TRANSACTION_INTEGRITY_VIOLATED = 0xC019005B;
1232pub const EXPIRED_HANDLE = 0xC0190060;
1233pub const TRANSACTION_NOT_ENLISTED = 0xC0190061;
1234pub const LOG_SECTOR_INVALID = 0xC01A0001;
1235pub const LOG_SECTOR_PARITY_INVALID = 0xC01A0002;
1236pub const LOG_SECTOR_REMAPPED = 0xC01A0003;
1237pub const LOG_BLOCK_INCOMPLETE = 0xC01A0004;
1238pub const LOG_INVALID_RANGE = 0xC01A0005;
1239pub const LOG_BLOCKS_EXHAUSTED = 0xC01A0006;
1240pub const LOG_READ_CONTEXT_INVALID = 0xC01A0007;
1241pub const LOG_RESTART_INVALID = 0xC01A0008;
1242pub const LOG_BLOCK_VERSION = 0xC01A0009;
1243pub const LOG_BLOCK_INVALID = 0xC01A000A;
1244pub const LOG_READ_MODE_INVALID = 0xC01A000B;
1245pub const LOG_METADATA_CORRUPT = 0xC01A000D;
1246pub const LOG_METADATA_INVALID = 0xC01A000E;
1247pub const LOG_METADATA_INCONSISTENT = 0xC01A000F;
1248pub const LOG_RESERVATION_INVALID = 0xC01A0010;
1249pub const LOG_CANT_DELETE = 0xC01A0011;
1250pub const LOG_CONTAINER_LIMIT_EXCEEDED = 0xC01A0012;
1251pub const LOG_START_OF_LOG = 0xC01A0013;
1252pub const LOG_POLICY_ALREADY_INSTALLED = 0xC01A0014;
1253pub const LOG_POLICY_NOT_INSTALLED = 0xC01A0015;
1254pub const LOG_POLICY_INVALID = 0xC01A0016;
1255pub const LOG_POLICY_CONFLICT = 0xC01A0017;
1256pub const LOG_PINNED_ARCHIVE_TAIL = 0xC01A0018;
1257pub const LOG_RECORD_NONEXISTENT = 0xC01A0019;
1258pub const LOG_RECORDS_RESERVED_INVALID = 0xC01A001A;
1259pub const LOG_SPACE_RESERVED_INVALID = 0xC01A001B;
1260pub const LOG_TAIL_INVALID = 0xC01A001C;
1261pub const LOG_FULL = 0xC01A001D;
1262pub const LOG_MULTIPLEXED = 0xC01A001E;
1263pub const LOG_DEDICATED = 0xC01A001F;
1264pub const LOG_ARCHIVE_NOT_IN_PROGRESS = 0xC01A0020;
1265pub const LOG_ARCHIVE_IN_PROGRESS = 0xC01A0021;
1266pub const LOG_EPHEMERAL = 0xC01A0022;
1267pub const LOG_NOT_ENOUGH_CONTAINERS = 0xC01A0023;
1268pub const LOG_CLIENT_ALREADY_REGISTERED = 0xC01A0024;
1269pub const LOG_CLIENT_NOT_REGISTERED = 0xC01A0025;
1270pub const LOG_FULL_HANDLER_IN_PROGRESS = 0xC01A0026;
1271pub const LOG_CONTAINER_READ_FAILED = 0xC01A0027;
1272pub const LOG_CONTAINER_WRITE_FAILED = 0xC01A0028;
1273pub const LOG_CONTAINER_OPEN_FAILED = 0xC01A0029;
1274pub const LOG_CONTAINER_STATE_INVALID = 0xC01A002A;
1275pub const LOG_STATE_INVALID = 0xC01A002B;
1276pub const LOG_PINNED = 0xC01A002C;
1277pub const LOG_METADATA_FLUSH_FAILED = 0xC01A002D;
1278pub const LOG_INCONSISTENT_SECURITY = 0xC01A002E;
1279pub const LOG_APPENDED_FLUSH_FAILED = 0xC01A002F;
1280pub const LOG_PINNED_RESERVATION = 0xC01A0030;
1281pub const VIDEO_HUNG_DISPLAY_DRIVER_THREAD = 0xC01B00EA;
1282pub const FLT_NO_HANDLER_DEFINED = 0xC01C0001;
1283pub const FLT_CONTEXT_ALREADY_DEFINED = 0xC01C0002;
1284pub const FLT_INVALID_ASYNCHRONOUS_REQUEST = 0xC01C0003;
1285pub const FLT_DISALLOW_FAST_IO = 0xC01C0004;
1286pub const FLT_INVALID_NAME_REQUEST = 0xC01C0005;
1287pub const FLT_NOT_SAFE_TO_POST_OPERATION = 0xC01C0006;
1288pub const FLT_NOT_INITIALIZED = 0xC01C0007;
1289pub const FLT_FILTER_NOT_READY = 0xC01C0008;
1290pub const FLT_POST_OPERATION_CLEANUP = 0xC01C0009;
1291pub const FLT_INTERNAL_ERROR = 0xC01C000A;
1292pub const FLT_DELETING_OBJECT = 0xC01C000B;
1293pub const FLT_MUST_BE_NONPAGED_POOL = 0xC01C000C;
1294pub const FLT_DUPLICATE_ENTRY = 0xC01C000D;
1295pub const FLT_CBDQ_DISABLED = 0xC01C000E;
1296pub const FLT_DO_NOT_ATTACH = 0xC01C000F;
1297pub const FLT_DO_NOT_DETACH = 0xC01C0010;
1298pub const FLT_INSTANCE_ALTITUDE_COLLISION = 0xC01C0011;
1299pub const FLT_INSTANCE_NAME_COLLISION = 0xC01C0012;
1300pub const FLT_FILTER_NOT_FOUND = 0xC01C0013;
1301pub const FLT_VOLUME_NOT_FOUND = 0xC01C0014;
1302pub const FLT_INSTANCE_NOT_FOUND = 0xC01C0015;
1303pub const FLT_CONTEXT_ALLOCATION_NOT_FOUND = 0xC01C0016;
1304pub const FLT_INVALID_CONTEXT_REGISTRATION = 0xC01C0017;
1305pub const FLT_NAME_CACHE_MISS = 0xC01C0018;
1306pub const FLT_NO_DEVICE_OBJECT = 0xC01C0019;
1307pub const FLT_VOLUME_ALREADY_MOUNTED = 0xC01C001A;
1308pub const FLT_ALREADY_ENLISTED = 0xC01C001B;
1309pub const FLT_CONTEXT_ALREADY_LINKED = 0xC01C001C;
1310pub const FLT_NO_WAITER_FOR_REPLY = 0xC01C0020;
1311pub const MONITOR_NO_DESCRIPTOR = 0xC01D0001;
1312pub const MONITOR_UNKNOWN_DESCRIPTOR_FORMAT = 0xC01D0002;
1313pub const MONITOR_INVALID_DESCRIPTOR_CHECKSUM = 0xC01D0003;
1314pub const MONITOR_INVALID_STANDARD_TIMING_BLOCK = 0xC01D0004;
1315pub const MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED = 0xC01D0005;
1316pub const MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK = 0xC01D0006;
1317pub const MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK = 0xC01D0007;
1318pub const MONITOR_NO_MORE_DESCRIPTOR_DATA = 0xC01D0008;
1319pub const MONITOR_INVALID_DETAILED_TIMING_BLOCK = 0xC01D0009;
1320pub const MONITOR_INVALID_MANUFACTURE_DATE = 0xC01D000A;
1321pub const GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER = 0xC01E0000;
1322pub const GRAPHICS_INSUFFICIENT_DMA_BUFFER = 0xC01E0001;
1323pub const GRAPHICS_INVALID_DISPLAY_ADAPTER = 0xC01E0002;
1324pub const GRAPHICS_ADAPTER_WAS_RESET = 0xC01E0003;
1325pub const GRAPHICS_INVALID_DRIVER_MODEL = 0xC01E0004;
1326pub const GRAPHICS_PRESENT_MODE_CHANGED = 0xC01E0005;
1327pub const GRAPHICS_PRESENT_OCCLUDED = 0xC01E0006;
1328pub const GRAPHICS_PRESENT_DENIED = 0xC01E0007;
1329pub const GRAPHICS_CANNOTCOLORCONVERT = 0xC01E0008;
1330pub const GRAPHICS_PRESENT_REDIRECTION_DISABLED = 0xC01E000B;
1331pub const GRAPHICS_PRESENT_UNOCCLUDED = 0xC01E000C;
1332pub const GRAPHICS_NO_VIDEO_MEMORY = 0xC01E0100;
1333pub const GRAPHICS_CANT_LOCK_MEMORY = 0xC01E0101;
1334pub const GRAPHICS_ALLOCATION_BUSY = 0xC01E0102;
1335pub const GRAPHICS_TOO_MANY_REFERENCES = 0xC01E0103;
1336pub const GRAPHICS_TRY_AGAIN_LATER = 0xC01E0104;
1337pub const GRAPHICS_TRY_AGAIN_NOW = 0xC01E0105;
1338pub const GRAPHICS_ALLOCATION_INVALID = 0xC01E0106;
1339pub const GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE = 0xC01E0107;
1340pub const GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED = 0xC01E0108;
1341pub const GRAPHICS_CANT_EVICT_PINNED_ALLOCATION = 0xC01E0109;
1342pub const GRAPHICS_INVALID_ALLOCATION_USAGE = 0xC01E0110;
1343pub const GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION = 0xC01E0111;
1344pub const GRAPHICS_ALLOCATION_CLOSED = 0xC01E0112;
1345pub const GRAPHICS_INVALID_ALLOCATION_INSTANCE = 0xC01E0113;
1346pub const GRAPHICS_INVALID_ALLOCATION_HANDLE = 0xC01E0114;
1347pub const GRAPHICS_WRONG_ALLOCATION_DEVICE = 0xC01E0115;
1348pub const GRAPHICS_ALLOCATION_CONTENT_LOST = 0xC01E0116;
1349pub const GRAPHICS_GPU_EXCEPTION_ON_DEVICE = 0xC01E0200;
1350pub const GRAPHICS_INVALID_VIDPN_TOPOLOGY = 0xC01E0300;
1351pub const GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED = 0xC01E0301;
1352pub const GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED = 0xC01E0302;
1353pub const GRAPHICS_INVALID_VIDPN = 0xC01E0303;
1354pub const GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE = 0xC01E0304;
1355pub const GRAPHICS_INVALID_VIDEO_PRESENT_TARGET = 0xC01E0305;
1356pub const GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED = 0xC01E0306;
1357pub const GRAPHICS_INVALID_VIDPN_SOURCEMODESET = 0xC01E0308;
1358pub const GRAPHICS_INVALID_VIDPN_TARGETMODESET = 0xC01E0309;
1359pub const GRAPHICS_INVALID_FREQUENCY = 0xC01E030A;
1360pub const GRAPHICS_INVALID_ACTIVE_REGION = 0xC01E030B;
1361pub const GRAPHICS_INVALID_TOTAL_REGION = 0xC01E030C;
1362pub const GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE = 0xC01E0310;
1363pub const GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE = 0xC01E0311;
1364pub const GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET = 0xC01E0312;
1365pub const GRAPHICS_PATH_ALREADY_IN_TOPOLOGY = 0xC01E0313;
1366pub const GRAPHICS_MODE_ALREADY_IN_MODESET = 0xC01E0314;
1367pub const GRAPHICS_INVALID_VIDEOPRESENTSOURCESET = 0xC01E0315;
1368pub const GRAPHICS_INVALID_VIDEOPRESENTTARGETSET = 0xC01E0316;
1369pub const GRAPHICS_SOURCE_ALREADY_IN_SET = 0xC01E0317;
1370pub const GRAPHICS_TARGET_ALREADY_IN_SET = 0xC01E0318;
1371pub const GRAPHICS_INVALID_VIDPN_PRESENT_PATH = 0xC01E0319;
1372pub const GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY = 0xC01E031A;
1373pub const GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET = 0xC01E031B;
1374pub const GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE = 0xC01E031C;
1375pub const GRAPHICS_FREQUENCYRANGE_NOT_IN_SET = 0xC01E031D;
1376pub const GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET = 0xC01E031F;
1377pub const GRAPHICS_STALE_MODESET = 0xC01E0320;
1378pub const GRAPHICS_INVALID_MONITOR_SOURCEMODESET = 0xC01E0321;
1379pub const GRAPHICS_INVALID_MONITOR_SOURCE_MODE = 0xC01E0322;
1380pub const GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN = 0xC01E0323;
1381pub const GRAPHICS_MODE_ID_MUST_BE_UNIQUE = 0xC01E0324;
1382pub const GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION = 0xC01E0325;
1383pub const GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES = 0xC01E0326;
1384pub const GRAPHICS_PATH_NOT_IN_TOPOLOGY = 0xC01E0327;
1385pub const GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE = 0xC01E0328;
1386pub const GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET = 0xC01E0329;
1387pub const GRAPHICS_INVALID_MONITORDESCRIPTORSET = 0xC01E032A;
1388pub const GRAPHICS_INVALID_MONITORDESCRIPTOR = 0xC01E032B;
1389pub const GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET = 0xC01E032C;
1390pub const GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET = 0xC01E032D;
1391pub const GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE = 0xC01E032E;
1392pub const GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE = 0xC01E032F;
1393pub const GRAPHICS_RESOURCES_NOT_RELATED = 0xC01E0330;
1394pub const GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE = 0xC01E0331;
1395pub const GRAPHICS_TARGET_ID_MUST_BE_UNIQUE = 0xC01E0332;
1396pub const GRAPHICS_NO_AVAILABLE_VIDPN_TARGET = 0xC01E0333;
1397pub const GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER = 0xC01E0334;
1398pub const GRAPHICS_NO_VIDPNMGR = 0xC01E0335;
1399pub const GRAPHICS_NO_ACTIVE_VIDPN = 0xC01E0336;
1400pub const GRAPHICS_STALE_VIDPN_TOPOLOGY = 0xC01E0337;
1401pub const GRAPHICS_MONITOR_NOT_CONNECTED = 0xC01E0338;
1402pub const GRAPHICS_SOURCE_NOT_IN_TOPOLOGY = 0xC01E0339;
1403pub const GRAPHICS_INVALID_PRIMARYSURFACE_SIZE = 0xC01E033A;
1404pub const GRAPHICS_INVALID_VISIBLEREGION_SIZE = 0xC01E033B;
1405pub const GRAPHICS_INVALID_STRIDE = 0xC01E033C;
1406pub const GRAPHICS_INVALID_PIXELFORMAT = 0xC01E033D;
1407pub const GRAPHICS_INVALID_COLORBASIS = 0xC01E033E;
1408pub const GRAPHICS_INVALID_PIXELVALUEACCESSMODE = 0xC01E033F;
1409pub const GRAPHICS_TARGET_NOT_IN_TOPOLOGY = 0xC01E0340;
1410pub const GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT = 0xC01E0341;
1411pub const GRAPHICS_VIDPN_SOURCE_IN_USE = 0xC01E0342;
1412pub const GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN = 0xC01E0343;
1413pub const GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL = 0xC01E0344;
1414pub const GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION = 0xC01E0345;
1415pub const GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED = 0xC01E0346;
1416pub const GRAPHICS_INVALID_GAMMA_RAMP = 0xC01E0347;
1417pub const GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED = 0xC01E0348;
1418pub const GRAPHICS_MULTISAMPLING_NOT_SUPPORTED = 0xC01E0349;
1419pub const GRAPHICS_MODE_NOT_IN_MODESET = 0xC01E034A;
1420pub const GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON = 0xC01E034D;
1421pub const GRAPHICS_INVALID_PATH_CONTENT_TYPE = 0xC01E034E;
1422pub const GRAPHICS_INVALID_COPYPROTECTION_TYPE = 0xC01E034F;
1423pub const GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS = 0xC01E0350;
1424pub const GRAPHICS_INVALID_SCANLINE_ORDERING = 0xC01E0352;
1425pub const GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED = 0xC01E0353;
1426pub const GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS = 0xC01E0354;
1427pub const GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT = 0xC01E0355;
1428pub const GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM = 0xC01E0356;
1429pub const GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN = 0xC01E0357;
1430pub const GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT = 0xC01E0358;
1431pub const GRAPHICS_MAX_NUM_PATHS_REACHED = 0xC01E0359;
1432pub const GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION = 0xC01E035A;
1433pub const GRAPHICS_INVALID_CLIENT_TYPE = 0xC01E035B;
1434pub const GRAPHICS_CLIENTVIDPN_NOT_SET = 0xC01E035C;
1435pub const GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED = 0xC01E0400;
1436pub const GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED = 0xC01E0401;
1437pub const GRAPHICS_NOT_A_LINKED_ADAPTER = 0xC01E0430;
1438pub const GRAPHICS_LEADLINK_NOT_ENUMERATED = 0xC01E0431;
1439pub const GRAPHICS_CHAINLINKS_NOT_ENUMERATED = 0xC01E0432;
1440pub const GRAPHICS_ADAPTER_CHAIN_NOT_READY = 0xC01E0433;
1441pub const GRAPHICS_CHAINLINKS_NOT_STARTED = 0xC01E0434;
1442pub const GRAPHICS_CHAINLINKS_NOT_POWERED_ON = 0xC01E0435;
1443pub const GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE = 0xC01E0436;
1444pub const GRAPHICS_NOT_POST_DEVICE_DRIVER = 0xC01E0438;
1445pub const GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED = 0xC01E043B;
1446pub const GRAPHICS_OPM_NOT_SUPPORTED = 0xC01E0500;
1447pub const GRAPHICS_COPP_NOT_SUPPORTED = 0xC01E0501;
1448pub const GRAPHICS_UAB_NOT_SUPPORTED = 0xC01E0502;
1449pub const GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS = 0xC01E0503;
1450pub const GRAPHICS_OPM_PARAMETER_ARRAY_TOO_SMALL = 0xC01E0504;
1451pub const GRAPHICS_OPM_NO_PROTECTED_OUTPUTS_EXIST = 0xC01E0505;
1452pub const GRAPHICS_PVP_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME = 0xC01E0506;
1453pub const GRAPHICS_PVP_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP = 0xC01E0507;
1454pub const GRAPHICS_PVP_MIRRORING_DEVICES_NOT_SUPPORTED = 0xC01E0508;
1455pub const GRAPHICS_OPM_INVALID_POINTER = 0xC01E050A;
1456pub const GRAPHICS_OPM_INTERNAL_ERROR = 0xC01E050B;
1457pub const GRAPHICS_OPM_INVALID_HANDLE = 0xC01E050C;
1458pub const GRAPHICS_PVP_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE = 0xC01E050D;
1459pub const GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH = 0xC01E050E;
1460pub const GRAPHICS_OPM_SPANNING_MODE_ENABLED = 0xC01E050F;
1461pub const GRAPHICS_OPM_THEATER_MODE_ENABLED = 0xC01E0510;
1462pub const GRAPHICS_PVP_HFS_FAILED = 0xC01E0511;
1463pub const GRAPHICS_OPM_INVALID_SRM = 0xC01E0512;
1464pub const GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP = 0xC01E0513;
1465pub const GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP = 0xC01E0514;
1466pub const GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA = 0xC01E0515;
1467pub const GRAPHICS_OPM_HDCP_SRM_NEVER_SET = 0xC01E0516;
1468pub const GRAPHICS_OPM_RESOLUTION_TOO_HIGH = 0xC01E0517;
1469pub const GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE = 0xC01E0518;
1470pub const GRAPHICS_OPM_PROTECTED_OUTPUT_NO_LONGER_EXISTS = 0xC01E051A;
1471pub const GRAPHICS_OPM_SESSION_TYPE_CHANGE_IN_PROGRESS = 0xC01E051B;
1472pub const GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS = 0xC01E051C;
1473pub const GRAPHICS_OPM_INVALID_INFORMATION_REQUEST = 0xC01E051D;
1474pub const GRAPHICS_OPM_DRIVER_INTERNAL_ERROR = 0xC01E051E;
1475pub const GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS = 0xC01E051F;
1476pub const GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED = 0xC01E0520;
1477pub const GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST = 0xC01E0521;
1478pub const GRAPHICS_I2C_NOT_SUPPORTED = 0xC01E0580;
1479pub const GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST = 0xC01E0581;
1480pub const GRAPHICS_I2C_ERROR_TRANSMITTING_DATA = 0xC01E0582;
1481pub const GRAPHICS_I2C_ERROR_RECEIVING_DATA = 0xC01E0583;
1482pub const GRAPHICS_DDCCI_VCP_NOT_SUPPORTED = 0xC01E0584;
1483pub const GRAPHICS_DDCCI_INVALID_DATA = 0xC01E0585;
1484pub const GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE = 0xC01E0586;
1485pub const GRAPHICS_DDCCI_INVALID_CAPABILITIES_STRING = 0xC01E0587;
1486pub const GRAPHICS_MCA_INTERNAL_ERROR = 0xC01E0588;
1487pub const GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND = 0xC01E0589;
1488pub const GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH = 0xC01E058A;
1489pub const GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM = 0xC01E058B;
1490pub const GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE = 0xC01E058C;
1491pub const GRAPHICS_MONITOR_NO_LONGER_EXISTS = 0xC01E058D;
1492pub const GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED = 0xC01E05E0;
1493pub const GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME = 0xC01E05E1;
1494pub const GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP = 0xC01E05E2;
1495pub const GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED = 0xC01E05E3;
1496pub const GRAPHICS_INVALID_POINTER = 0xC01E05E4;
1497pub const GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE = 0xC01E05E5;
1498pub const GRAPHICS_PARAMETER_ARRAY_TOO_SMALL = 0xC01E05E6;
1499pub const GRAPHICS_INTERNAL_ERROR = 0xC01E05E7;
1500pub const GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS = 0xC01E05E8;
1501pub const FVE_LOCKED_VOLUME = 0xC0210000;
1502pub const FVE_NOT_ENCRYPTED = 0xC0210001;
1503pub const FVE_BAD_INFORMATION = 0xC0210002;
1504pub const FVE_TOO_SMALL = 0xC0210003;
1505pub const FVE_FAILED_WRONG_FS = 0xC0210004;
1506pub const FVE_FAILED_BAD_FS = 0xC0210005;
1507pub const FVE_FS_NOT_EXTENDED = 0xC0210006;
1508pub const FVE_FS_MOUNTED = 0xC0210007;
1509pub const FVE_NO_LICENSE = 0xC0210008;
1510pub const FVE_ACTION_NOT_ALLOWED = 0xC0210009;
1511pub const FVE_BAD_DATA = 0xC021000A;
1512pub const FVE_VOLUME_NOT_BOUND = 0xC021000B;
1513pub const FVE_NOT_DATA_VOLUME = 0xC021000C;
1514pub const FVE_CONV_READ_ERROR = 0xC021000D;
1515pub const FVE_CONV_WRITE_ERROR = 0xC021000E;
1516pub const FVE_OVERLAPPED_UPDATE = 0xC021000F;
1517pub const FVE_FAILED_SECTOR_SIZE = 0xC0210010;
1518pub const FVE_FAILED_AUTHENTICATION = 0xC0210011;
1519pub const FVE_NOT_OS_VOLUME = 0xC0210012;
1520pub const FVE_KEYFILE_NOT_FOUND = 0xC0210013;
1521pub const FVE_KEYFILE_INVALID = 0xC0210014;
1522pub const FVE_KEYFILE_NO_VMK = 0xC0210015;
1523pub const FVE_TPM_DISABLED = 0xC0210016;
1524pub const FVE_TPM_SRK_AUTH_NOT_ZERO = 0xC0210017;
1525pub const FVE_TPM_INVALID_PCR = 0xC0210018;
1526pub const FVE_TPM_NO_VMK = 0xC0210019;
1527pub const FVE_PIN_INVALID = 0xC021001A;
1528pub const FVE_AUTH_INVALID_APPLICATION = 0xC021001B;
1529pub const FVE_AUTH_INVALID_CONFIG = 0xC021001C;
1530pub const FVE_DEBUGGER_ENABLED = 0xC021001D;
1531pub const FVE_DRY_RUN_FAILED = 0xC021001E;
1532pub const FVE_BAD_METADATA_POINTER = 0xC021001F;
1533pub const FVE_OLD_METADATA_COPY = 0xC0210020;
1534pub const FVE_REBOOT_REQUIRED = 0xC0210021;
1535pub const FVE_RAW_ACCESS = 0xC0210022;
1536pub const FVE_RAW_BLOCKED = 0xC0210023;
1537pub const FVE_NO_FEATURE_LICENSE = 0xC0210026;
1538pub const FVE_POLICY_USER_DISABLE_RDV_NOT_ALLOWED = 0xC0210027;
1539pub const FVE_CONV_RECOVERY_FAILED = 0xC0210028;
1540pub const FVE_VIRTUALIZED_SPACE_TOO_BIG = 0xC0210029;
1541pub const FVE_VOLUME_TOO_SMALL = 0xC0210030;
1542pub const FWP_CALLOUT_NOT_FOUND = 0xC0220001;
1543pub const FWP_CONDITION_NOT_FOUND = 0xC0220002;
1544pub const FWP_FILTER_NOT_FOUND = 0xC0220003;
1545pub const FWP_LAYER_NOT_FOUND = 0xC0220004;
1546pub const FWP_PROVIDER_NOT_FOUND = 0xC0220005;
1547pub const FWP_PROVIDER_CONTEXT_NOT_FOUND = 0xC0220006;
1548pub const FWP_SUBLAYER_NOT_FOUND = 0xC0220007;
1549pub const FWP_NOT_FOUND = 0xC0220008;
1550pub const FWP_ALREADY_EXISTS = 0xC0220009;
1551pub const FWP_IN_USE = 0xC022000A;
1552pub const FWP_DYNAMIC_SESSION_IN_PROGRESS = 0xC022000B;
1553pub const FWP_WRONG_SESSION = 0xC022000C;
1554pub const FWP_NO_TXN_IN_PROGRESS = 0xC022000D;
1555pub const FWP_TXN_IN_PROGRESS = 0xC022000E;
1556pub const FWP_TXN_ABORTED = 0xC022000F;
1557pub const FWP_SESSION_ABORTED = 0xC0220010;
1558pub const FWP_INCOMPATIBLE_TXN = 0xC0220011;
1559pub const FWP_TIMEOUT = 0xC0220012;
1560pub const FWP_NET_EVENTS_DISABLED = 0xC0220013;
1561pub const FWP_INCOMPATIBLE_LAYER = 0xC0220014;
1562pub const FWP_KM_CLIENTS_ONLY = 0xC0220015;
1563pub const FWP_LIFETIME_MISMATCH = 0xC0220016;
1564pub const FWP_BUILTIN_OBJECT = 0xC0220017;
1565pub const FWP_TOO_MANY_BOOTTIME_FILTERS = 0xC0220018;
1566pub const FWP_TOO_MANY_CALLOUTS = 0xC0220018;
1567pub const FWP_NOTIFICATION_DROPPED = 0xC0220019;
1568pub const FWP_TRAFFIC_MISMATCH = 0xC022001A;
1569pub const FWP_INCOMPATIBLE_SA_STATE = 0xC022001B;
1570pub const FWP_NULL_POINTER = 0xC022001C;
1571pub const FWP_INVALID_ENUMERATOR = 0xC022001D;
1572pub const FWP_INVALID_FLAGS = 0xC022001E;
1573pub const FWP_INVALID_NET_MASK = 0xC022001F;
1574pub const FWP_INVALID_RANGE = 0xC0220020;
1575pub const FWP_INVALID_INTERVAL = 0xC0220021;
1576pub const FWP_ZERO_LENGTH_ARRAY = 0xC0220022;
1577pub const FWP_NULL_DISPLAY_NAME = 0xC0220023;
1578pub const FWP_INVALID_ACTION_TYPE = 0xC0220024;
1579pub const FWP_INVALID_WEIGHT = 0xC0220025;
1580pub const FWP_MATCH_TYPE_MISMATCH = 0xC0220026;
1581pub const FWP_TYPE_MISMATCH = 0xC0220027;
1582pub const FWP_OUT_OF_BOUNDS = 0xC0220028;
1583pub const FWP_RESERVED = 0xC0220029;
1584pub const FWP_DUPLICATE_CONDITION = 0xC022002A;
1585pub const FWP_DUPLICATE_KEYMOD = 0xC022002B;
1586pub const FWP_ACTION_INCOMPATIBLE_WITH_LAYER = 0xC022002C;
1587pub const FWP_ACTION_INCOMPATIBLE_WITH_SUBLAYER = 0xC022002D;
1588pub const FWP_CONTEXT_INCOMPATIBLE_WITH_LAYER = 0xC022002E;
1589pub const FWP_CONTEXT_INCOMPATIBLE_WITH_CALLOUT = 0xC022002F;
1590pub const FWP_INCOMPATIBLE_AUTH_METHOD = 0xC0220030;
1591pub const FWP_INCOMPATIBLE_DH_GROUP = 0xC0220031;
1592pub const FWP_EM_NOT_SUPPORTED = 0xC0220032;
1593pub const FWP_NEVER_MATCH = 0xC0220033;
1594pub const FWP_PROVIDER_CONTEXT_MISMATCH = 0xC0220034;
1595pub const FWP_INVALID_PARAMETER = 0xC0220035;
1596pub const FWP_TOO_MANY_SUBLAYERS = 0xC0220036;
1597pub const FWP_CALLOUT_NOTIFICATION_FAILED = 0xC0220037;
1598pub const FWP_INCOMPATIBLE_AUTH_CONFIG = 0xC0220038;
1599pub const FWP_INCOMPATIBLE_CIPHER_CONFIG = 0xC0220039;
1600pub const FWP_DUPLICATE_AUTH_METHOD = 0xC022003C;
1601pub const FWP_TCPIP_NOT_READY = 0xC0220100;
1602pub const FWP_INJECT_HANDLE_CLOSING = 0xC0220101;
1603pub const FWP_INJECT_HANDLE_STALE = 0xC0220102;
1604pub const FWP_CANNOT_PEND = 0xC0220103;
1605pub const NDIS_CLOSING = 0xC0230002;
1606pub const NDIS_BAD_VERSION = 0xC0230004;
1607pub const NDIS_BAD_CHARACTERISTICS = 0xC0230005;
1608pub const NDIS_ADAPTER_NOT_FOUND = 0xC0230006;
1609pub const NDIS_OPEN_FAILED = 0xC0230007;
1610pub const NDIS_DEVICE_FAILED = 0xC0230008;
1611pub const NDIS_MULTICAST_FULL = 0xC0230009;
1612pub const NDIS_MULTICAST_EXISTS = 0xC023000A;
1613pub const NDIS_MULTICAST_NOT_FOUND = 0xC023000B;
1614pub const NDIS_REQUEST_ABORTED = 0xC023000C;
1615pub const NDIS_RESET_IN_PROGRESS = 0xC023000D;
1616pub const NDIS_INVALID_PACKET = 0xC023000F;
1617pub const NDIS_INVALID_DEVICE_REQUEST = 0xC0230010;
1618pub const NDIS_ADAPTER_NOT_READY = 0xC0230011;
1619pub const NDIS_INVALID_LENGTH = 0xC0230014;
1620pub const NDIS_INVALID_DATA = 0xC0230015;
1621pub const NDIS_BUFFER_TOO_SHORT = 0xC0230016;
1622pub const NDIS_INVALID_OID = 0xC0230017;
1623pub const NDIS_ADAPTER_REMOVED = 0xC0230018;
1624pub const NDIS_UNSUPPORTED_MEDIA = 0xC0230019;
1625pub const NDIS_GROUP_ADDRESS_IN_USE = 0xC023001A;
1626pub const NDIS_FILE_NOT_FOUND = 0xC023001B;
1627pub const NDIS_ERROR_READING_FILE = 0xC023001C;
1628pub const NDIS_ALREADY_MAPPED = 0xC023001D;
1629pub const NDIS_RESOURCE_CONFLICT = 0xC023001E;
1630pub const NDIS_MEDIA_DISCONNECTED = 0xC023001F;
1631pub const NDIS_INVALID_ADDRESS = 0xC0230022;
1632pub const NDIS_PAUSED = 0xC023002A;
1633pub const NDIS_INTERFACE_NOT_FOUND = 0xC023002B;
1634pub const NDIS_UNSUPPORTED_REVISION = 0xC023002C;
1635pub const NDIS_INVALID_PORT = 0xC023002D;
1636pub const NDIS_INVALID_PORT_STATE = 0xC023002E;
1637pub const NDIS_LOW_POWER_STATE = 0xC023002F;
1638pub const NDIS_NOT_SUPPORTED = 0xC02300BB;
1639pub const NDIS_OFFLOAD_POLICY = 0xC023100F;
1640pub const NDIS_OFFLOAD_CONNECTION_REJECTED = 0xC0231012;
1641pub const NDIS_OFFLOAD_PATH_REJECTED = 0xC0231013;
1642pub const NDIS_DOT11_AUTO_CONFIG_ENABLED = 0xC0232000;
1643pub const NDIS_DOT11_MEDIA_IN_USE = 0xC0232001;
1644pub const NDIS_DOT11_POWER_STATE_INVALID = 0xC0232002;
1645pub const NDIS_PM_WOL_PATTERN_LIST_FULL = 0xC0232003;
1646pub const NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL = 0xC0232004;
1647pub const IPSEC_BAD_SPI = 0xC0360001;
1648pub const IPSEC_SA_LIFETIME_EXPIRED = 0xC0360002;
1649pub const IPSEC_WRONG_SA = 0xC0360003;
1650pub const IPSEC_REPLAY_CHECK_FAILED = 0xC0360004;
1651pub const IPSEC_INVALID_PACKET = 0xC0360005;
1652pub const IPSEC_INTEGRITY_CHECK_FAILED = 0xC0360006;
1653pub const IPSEC_CLEAR_TEXT_DROP = 0xC0360007;
1654pub const IPSEC_AUTH_FIREWALL_DROP = 0xC0360008;
1655pub const IPSEC_THROTTLE_DROP = 0xC0360009;
1656pub const IPSEC_DOSP_BLOCK = 0xC0368000;
1657pub const IPSEC_DOSP_RECEIVED_MULTICAST = 0xC0368001;
1658pub const IPSEC_DOSP_INVALID_PACKET = 0xC0368002;
1659pub const IPSEC_DOSP_STATE_LOOKUP_FAILED = 0xC0368003;
1660pub const IPSEC_DOSP_MAX_ENTRIES = 0xC0368004;
1661pub const IPSEC_DOSP_KEYMOD_NOT_ALLOWED = 0xC0368005;
1662pub const IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES = 0xC0368006;
1663pub const VOLMGR_MIRROR_NOT_SUPPORTED = 0xC038005B;
1664pub const VOLMGR_RAID5_NOT_SUPPORTED = 0xC038005C;
1665pub const VIRTDISK_PROVIDER_NOT_FOUND = 0xC03A0014;
1666pub const VIRTDISK_NOT_VIRTUAL_DISK = 0xC03A0015;
1667pub const VHD_PARENT_VHD_ACCESS_DENIED = 0xC03A0016;
1668pub const VHD_CHILD_PARENT_SIZE_MISMATCH = 0xC03A0017;
1669pub const VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED = 0xC03A0018;
1670pub const VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT = 0xC03A0019;
lib/std/os/windows/win32error.zig created+3696
...@@ -0,0 +1,3696 @@
1// Codes are from https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/18d8fbe8-a967-4f1c-ae50-99ca8e491d2d
2pub const Win32Error = extern enum(u16) {
3 /// The operation completed successfully.
4 SUCCESS = 0,
5
6 /// Incorrect function.
7 INVALID_FUNCTION = 1,
8
9 /// The system cannot find the file specified.
10 FILE_NOT_FOUND = 2,
11
12 /// The system cannot find the path specified.
13 PATH_NOT_FOUND = 3,
14
15 /// The system cannot open the file.
16 TOO_MANY_OPEN_FILES = 4,
17
18 /// Access is denied.
19 ACCESS_DENIED = 5,
20
21 /// The handle is invalid.
22 INVALID_HANDLE = 6,
23
24 /// The storage control blocks were destroyed.
25 ARENA_TRASHED = 7,
26
27 /// Not enough storage is available to process this command.
28 NOT_ENOUGH_MEMORY = 8,
29
30 /// The storage control block address is invalid.
31 INVALID_BLOCK = 9,
32
33 /// The environment is incorrect.
34 BAD_ENVIRONMENT = 10,
35
36 /// An attempt was made to load a program with an incorrect format.
37 BAD_FORMAT = 11,
38
39 /// The access code is invalid.
40 INVALID_ACCESS = 12,
41
42 /// The data is invalid.
43 INVALID_DATA = 13,
44
45 /// Not enough storage is available to complete this operation.
46 OUTOFMEMORY = 14,
47
48 /// The system cannot find the drive specified.
49 INVALID_DRIVE = 15,
50
51 /// The directory cannot be removed.
52 CURRENT_DIRECTORY = 16,
53
54 /// The system cannot move the file to a different disk drive.
55 NOT_SAME_DEVICE = 17,
56
57 /// There are no more files.
58 NO_MORE_FILES = 18,
59
60 /// The media is write protected.
61 WRITE_PROTECT = 19,
62
63 /// The system cannot find the device specified.
64 BAD_UNIT = 20,
65
66 /// The device is not ready.
67 NOT_READY = 21,
68
69 /// The device does not recognize the command.
70 BAD_COMMAND = 22,
71
72 /// Data error (cyclic redundancy check).
73 CRC = 23,
74
75 /// The program issued a command but the command length is incorrect.
76 BAD_LENGTH = 24,
77
78 /// The drive cannot locate a specific area or track on the disk.
79 SEEK = 25,
80
81 /// The specified disk or diskette cannot be accessed.
82 NOT_DOS_DISK = 26,
83
84 /// The drive cannot find the sector requested.
85 SECTOR_NOT_FOUND = 27,
86
87 /// The printer is out of paper.
88 OUT_OF_PAPER = 28,
89
90 /// The system cannot write to the specified device.
91 WRITE_FAULT = 29,
92
93 /// The system cannot read from the specified device.
94 READ_FAULT = 30,
95
96 /// A device attached to the system is not functioning.
97 GEN_FAILURE = 31,
98
99 /// The process cannot access the file because it is being used by another process.
100 SHARING_VIOLATION = 32,
101
102 /// The process cannot access the file because another process has locked a portion of the file.
103 LOCK_VIOLATION = 33,
104
105 /// The wrong diskette is in the drive.
106 /// Insert %2 (Volume Serial Number: %3) into drive %1.
107 WRONG_DISK = 34,
108
109 /// Too many files opened for sharing.
110 SHARING_BUFFER_EXCEEDED = 36,
111
112 /// Reached the end of the file.
113 HANDLE_EOF = 38,
114
115 /// The disk is full.
116 HANDLE_DISK_FULL = 39,
117
118 /// The request is not supported.
119 NOT_SUPPORTED = 50,
120
121 /// Windows cannot find the network path.
122 /// Verify that the network path is correct and the destination computer is not busy or turned off.
123 /// If Windows still cannot find the network path, contact your network administrator.
124 REM_NOT_LIST = 51,
125
126 /// You were not connected because a duplicate name exists on the network.
127 /// If joining a domain, go to System in Control Panel to change the computer name and try again.
128 /// If joining a workgroup, choose another workgroup name.
129 DUP_NAME = 52,
130
131 /// The network path was not found.
132 BAD_NETPATH = 53,
133
134 /// The network is busy.
135 NETWORK_BUSY = 54,
136
137 /// The specified network resource or device is no longer available.
138 DEV_NOT_EXIST = 55,
139
140 /// The network BIOS command limit has been reached.
141 TOO_MANY_CMDS = 56,
142
143 /// A network adapter hardware error occurred.
144 ADAP_HDW_ERR = 57,
145
146 /// The specified server cannot perform the requested operation.
147 BAD_NET_RESP = 58,
148
149 /// An unexpected network error occurred.
150 UNEXP_NET_ERR = 59,
151
152 /// The remote adapter is not compatible.
153 BAD_REM_ADAP = 60,
154
155 /// The printer queue is full.
156 PRINTQ_FULL = 61,
157
158 /// Space to store the file waiting to be printed is not available on the server.
159 NO_SPOOL_SPACE = 62,
160
161 /// Your file waiting to be printed was deleted.
162 PRINT_CANCELLED = 63,
163
164 /// The specified network name is no longer available.
165 NETNAME_DELETED = 64,
166
167 /// Network access is denied.
168 NETWORK_ACCESS_DENIED = 65,
169
170 /// The network resource type is not correct.
171 BAD_DEV_TYPE = 66,
172
173 /// The network name cannot be found.
174 BAD_NET_NAME = 67,
175
176 /// The name limit for the local computer network adapter card was exceeded.
177 TOO_MANY_NAMES = 68,
178
179 /// The network BIOS session limit was exceeded.
180 TOO_MANY_SESS = 69,
181
182 /// The remote server has been paused or is in the process of being started.
183 SHARING_PAUSED = 70,
184
185 /// No more connections can be made to this remote computer at this time because there are already as many connections as the computer can accept.
186 REQ_NOT_ACCEP = 71,
187
188 /// The specified printer or disk device has been paused.
189 REDIR_PAUSED = 72,
190
191 /// The file exists.
192 FILE_EXISTS = 80,
193
194 /// The directory or file cannot be created.
195 CANNOT_MAKE = 82,
196
197 /// Fail on INT 24.
198 FAIL_I24 = 83,
199
200 /// Storage to process this request is not available.
201 OUT_OF_STRUCTURES = 84,
202
203 /// The local device name is already in use.
204 ALREADY_ASSIGNED = 85,
205
206 /// The specified network password is not correct.
207 INVALID_PASSWORD = 86,
208
209 /// The parameter is incorrect.
210 INVALID_PARAMETER = 87,
211
212 /// A write fault occurred on the network.
213 NET_WRITE_FAULT = 88,
214
215 /// The system cannot start another process at this time.
216 NO_PROC_SLOTS = 89,
217
218 /// Cannot create another system semaphore.
219 TOO_MANY_SEMAPHORES = 100,
220
221 /// The exclusive semaphore is owned by another process.
222 EXCL_SEM_ALREADY_OWNED = 101,
223
224 /// The semaphore is set and cannot be closed.
225 SEM_IS_SET = 102,
226
227 /// The semaphore cannot be set again.
228 TOO_MANY_SEM_REQUESTS = 103,
229
230 /// Cannot request exclusive semaphores at interrupt time.
231 INVALID_AT_INTERRUPT_TIME = 104,
232
233 /// The previous ownership of this semaphore has ended.
234 SEM_OWNER_DIED = 105,
235
236 /// Insert the diskette for drive %1.
237 SEM_USER_LIMIT = 106,
238
239 /// The program stopped because an alternate diskette was not inserted.
240 DISK_CHANGE = 107,
241
242 /// The disk is in use or locked by another process.
243 DRIVE_LOCKED = 108,
244
245 /// The pipe has been ended.
246 BROKEN_PIPE = 109,
247
248 /// The system cannot open the device or file specified.
249 OPEN_FAILED = 110,
250
251 /// The file name is too long.
252 BUFFER_OVERFLOW = 111,
253
254 /// There is not enough space on the disk.
255 DISK_FULL = 112,
256
257 /// No more internal file identifiers available.
258 NO_MORE_SEARCH_HANDLES = 113,
259
260 /// The target internal file identifier is incorrect.
261 INVALID_TARGET_HANDLE = 114,
262
263 /// The IOCTL call made by the application program is not correct.
264 INVALID_CATEGORY = 117,
265
266 /// The verify-on-write switch parameter value is not correct.
267 INVALID_VERIFY_SWITCH = 118,
268
269 /// The system does not support the command requested.
270 BAD_DRIVER_LEVEL = 119,
271
272 /// This function is not supported on this system.
273 CALL_NOT_IMPLEMENTED = 120,
274
275 /// The semaphore timeout period has expired.
276 SEM_TIMEOUT = 121,
277
278 /// The data area passed to a system call is too small.
279 INSUFFICIENT_BUFFER = 122,
280
281 /// The filename, directory name, or volume label syntax is incorrect.
282 INVALID_NAME = 123,
283
284 /// The system call level is not correct.
285 INVALID_LEVEL = 124,
286
287 /// The disk has no volume label.
288 NO_VOLUME_LABEL = 125,
289
290 /// The specified module could not be found.
291 MOD_NOT_FOUND = 126,
292
293 /// The specified procedure could not be found.
294 PROC_NOT_FOUND = 127,
295
296 /// There are no child processes to wait for.
297 WAIT_NO_CHILDREN = 128,
298
299 /// The %1 application cannot be run in Win32 mode.
300 CHILD_NOT_COMPLETE = 129,
301
302 /// Attempt to use a file handle to an open disk partition for an operation other than raw disk I/O.
303 DIRECT_ACCESS_HANDLE = 130,
304
305 /// An attempt was made to move the file pointer before the beginning of the file.
306 NEGATIVE_SEEK = 131,
307
308 /// The file pointer cannot be set on the specified device or file.
309 SEEK_ON_DEVICE = 132,
310
311 /// A JOIN or SUBST command cannot be used for a drive that contains previously joined drives.
312 IS_JOIN_TARGET = 133,
313
314 /// An attempt was made to use a JOIN or SUBST command on a drive that has already been joined.
315 IS_JOINED = 134,
316
317 /// An attempt was made to use a JOIN or SUBST command on a drive that has already been substituted.
318 IS_SUBSTED = 135,
319
320 /// The system tried to delete the JOIN of a drive that is not joined.
321 NOT_JOINED = 136,
322
323 /// The system tried to delete the substitution of a drive that is not substituted.
324 NOT_SUBSTED = 137,
325
326 /// The system tried to join a drive to a directory on a joined drive.
327 JOIN_TO_JOIN = 138,
328
329 /// The system tried to substitute a drive to a directory on a substituted drive.
330 SUBST_TO_SUBST = 139,
331
332 /// The system tried to join a drive to a directory on a substituted drive.
333 JOIN_TO_SUBST = 140,
334
335 /// The system tried to SUBST a drive to a directory on a joined drive.
336 SUBST_TO_JOIN = 141,
337
338 /// The system cannot perform a JOIN or SUBST at this time.
339 BUSY_DRIVE = 142,
340
341 /// The system cannot join or substitute a drive to or for a directory on the same drive.
342 SAME_DRIVE = 143,
343
344 /// The directory is not a subdirectory of the root directory.
345 DIR_NOT_ROOT = 144,
346
347 /// The directory is not empty.
348 DIR_NOT_EMPTY = 145,
349
350 /// The path specified is being used in a substitute.
351 IS_SUBST_PATH = 146,
352
353 /// Not enough resources are available to process this command.
354 IS_JOIN_PATH = 147,
355
356 /// The path specified cannot be used at this time.
357 PATH_BUSY = 148,
358
359 /// An attempt was made to join or substitute a drive for which a directory on the drive is the target of a previous substitute.
360 IS_SUBST_TARGET = 149,
361
362 /// System trace information was not specified in your CONFIG.SYS file, or tracing is disallowed.
363 SYSTEM_TRACE = 150,
364
365 /// The number of specified semaphore events for DosMuxSemWait is not correct.
366 INVALID_EVENT_COUNT = 151,
367
368 /// DosMuxSemWait did not execute; too many semaphores are already set.
369 TOO_MANY_MUXWAITERS = 152,
370
371 /// The DosMuxSemWait list is not correct.
372 INVALID_LIST_FORMAT = 153,
373
374 /// The volume label you entered exceeds the label character limit of the target file system.
375 LABEL_TOO_LONG = 154,
376
377 /// Cannot create another thread.
378 TOO_MANY_TCBS = 155,
379
380 /// The recipient process has refused the signal.
381 SIGNAL_REFUSED = 156,
382
383 /// The segment is already discarded and cannot be locked.
384 DISCARDED = 157,
385
386 /// The segment is already unlocked.
387 NOT_LOCKED = 158,
388
389 /// The address for the thread ID is not correct.
390 BAD_THREADID_ADDR = 159,
391
392 /// One or more arguments are not correct.
393 BAD_ARGUMENTS = 160,
394
395 /// The specified path is invalid.
396 BAD_PATHNAME = 161,
397
398 /// A signal is already pending.
399 SIGNAL_PENDING = 162,
400
401 /// No more threads can be created in the system.
402 MAX_THRDS_REACHED = 164,
403
404 /// Unable to lock a region of a file.
405 LOCK_FAILED = 167,
406
407 /// The requested resource is in use.
408 BUSY = 170,
409
410 /// Device's command support detection is in progress.
411 DEVICE_SUPPORT_IN_PROGRESS = 171,
412
413 /// A lock request was not outstanding for the supplied cancel region.
414 CANCEL_VIOLATION = 173,
415
416 /// The file system does not support atomic changes to the lock type.
417 ATOMIC_LOCKS_NOT_SUPPORTED = 174,
418
419 /// The system detected a segment number that was not correct.
420 INVALID_SEGMENT_NUMBER = 180,
421
422 /// The operating system cannot run %1.
423 INVALID_ORDINAL = 182,
424
425 /// Cannot create a file when that file already exists.
426 ALREADY_EXISTS = 183,
427
428 /// The flag passed is not correct.
429 INVALID_FLAG_NUMBER = 186,
430
431 /// The specified system semaphore name was not found.
432 SEM_NOT_FOUND = 187,
433
434 /// The operating system cannot run %1.
435 INVALID_STARTING_CODESEG = 188,
436
437 /// The operating system cannot run %1.
438 INVALID_STACKSEG = 189,
439
440 /// The operating system cannot run %1.
441 INVALID_MODULETYPE = 190,
442
443 /// Cannot run %1 in Win32 mode.
444 INVALID_EXE_SIGNATURE = 191,
445
446 /// The operating system cannot run %1.
447 EXE_MARKED_INVALID = 192,
448
449 /// %1 is not a valid Win32 application.
450 BAD_EXE_FORMAT = 193,
451
452 /// The operating system cannot run %1.
453 ITERATED_DATA_EXCEEDS_64k = 194,
454
455 /// The operating system cannot run %1.
456 INVALID_MINALLOCSIZE = 195,
457
458 /// The operating system cannot run this application program.
459 DYNLINK_FROM_INVALID_RING = 196,
460
461 /// The operating system is not presently configured to run this application.
462 IOPL_NOT_ENABLED = 197,
463
464 /// The operating system cannot run %1.
465 INVALID_SEGDPL = 198,
466
467 /// The operating system cannot run this application program.
468 AUTODATASEG_EXCEEDS_64k = 199,
469
470 /// The code segment cannot be greater than or equal to 64K.
471 RING2SEG_MUST_BE_MOVABLE = 200,
472
473 /// The operating system cannot run %1.
474 RELOC_CHAIN_XEEDS_SEGLIM = 201,
475
476 /// The operating system cannot run %1.
477 INFLOOP_IN_RELOC_CHAIN = 202,
478
479 /// The system could not find the environment option that was entered.
480 ENVVAR_NOT_FOUND = 203,
481
482 /// No process in the command subtree has a signal handler.
483 NO_SIGNAL_SENT = 205,
484
485 /// The filename or extension is too long.
486 FILENAME_EXCED_RANGE = 206,
487
488 /// The ring 2 stack is in use.
489 RING2_STACK_IN_USE = 207,
490
491 /// The global filename characters, * or ?, are entered incorrectly or too many global filename characters are specified.
492 META_EXPANSION_TOO_LONG = 208,
493
494 /// The signal being posted is not correct.
495 INVALID_SIGNAL_NUMBER = 209,
496
497 /// The signal handler cannot be set.
498 THREAD_1_INACTIVE = 210,
499
500 /// The segment is locked and cannot be reallocated.
501 LOCKED = 212,
502
503 /// Too many dynamic-link modules are attached to this program or dynamic-link module.
504 TOO_MANY_MODULES = 214,
505
506 /// Cannot nest calls to LoadModule.
507 NESTING_NOT_ALLOWED = 215,
508
509 /// This version of %1 is not compatible with the version of Windows you're running.
510 /// Check your computer's system information and then contact the software publisher.
511 EXE_MACHINE_TYPE_MISMATCH = 216,
512
513 /// The image file %1 is signed, unable to modify.
514 EXE_CANNOT_MODIFY_SIGNED_BINARY = 217,
515
516 /// The image file %1 is strong signed, unable to modify.
517 EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY = 218,
518
519 /// This file is checked out or locked for editing by another user.
520 FILE_CHECKED_OUT = 220,
521
522 /// The file must be checked out before saving changes.
523 CHECKOUT_REQUIRED = 221,
524
525 /// The file type being saved or retrieved has been blocked.
526 BAD_FILE_TYPE = 222,
527
528 /// The file size exceeds the limit allowed and cannot be saved.
529 FILE_TOO_LARGE = 223,
530
531 /// Access Denied. Before opening files in this location, you must first add the web site to your trusted sites list, browse to the web site, and select the option to login automatically.
532 FORMS_AUTH_REQUIRED = 224,
533
534 /// Operation did not complete successfully because the file contains a virus or potentially unwanted software.
535 VIRUS_INFECTED = 225,
536
537 /// This file contains a virus or potentially unwanted software and cannot be opened.
538 /// Due to the nature of this virus or potentially unwanted software, the file has been removed from this location.
539 VIRUS_DELETED = 226,
540
541 /// The pipe is local.
542 PIPE_LOCAL = 229,
543
544 /// The pipe state is invalid.
545 BAD_PIPE = 230,
546
547 /// All pipe instances are busy.
548 PIPE_BUSY = 231,
549
550 /// The pipe is being closed.
551 NO_DATA = 232,
552
553 /// No process is on the other end of the pipe.
554 PIPE_NOT_CONNECTED = 233,
555
556 /// More data is available.
557 MORE_DATA = 234,
558
559 /// The session was canceled.
560 VC_DISCONNECTED = 240,
561
562 /// The specified extended attribute name was invalid.
563 INVALID_EA_NAME = 254,
564
565 /// The extended attributes are inconsistent.
566 EA_LIST_INCONSISTENT = 255,
567
568 /// The wait operation timed out.
569 IMEOUT = 258,
570
571 /// No more data is available.
572 NO_MORE_ITEMS = 259,
573
574 /// The copy functions cannot be used.
575 CANNOT_COPY = 266,
576
577 /// The directory name is invalid.
578 DIRECTORY = 267,
579
580 /// The extended attributes did not fit in the buffer.
581 EAS_DIDNT_FIT = 275,
582
583 /// The extended attribute file on the mounted file system is corrupt.
584 EA_FILE_CORRUPT = 276,
585
586 /// The extended attribute table file is full.
587 EA_TABLE_FULL = 277,
588
589 /// The specified extended attribute handle is invalid.
590 INVALID_EA_HANDLE = 278,
591
592 /// The mounted file system does not support extended attributes.
593 EAS_NOT_SUPPORTED = 282,
594
595 /// Attempt to release mutex not owned by caller.
596 NOT_OWNER = 288,
597
598 /// Too many posts were made to a semaphore.
599 TOO_MANY_POSTS = 298,
600
601 /// Only part of a ReadProcessMemory or WriteProcessMemory request was completed.
602 PARTIAL_COPY = 299,
603
604 /// The oplock request is denied.
605 OPLOCK_NOT_GRANTED = 300,
606
607 /// An invalid oplock acknowledgment was received by the system.
608 INVALID_OPLOCK_PROTOCOL = 301,
609
610 /// The volume is too fragmented to complete this operation.
611 DISK_TOO_FRAGMENTED = 302,
612
613 /// The file cannot be opened because it is in the process of being deleted.
614 DELETE_PENDING = 303,
615
616 /// Short name settings may not be changed on this volume due to the global registry setting.
617 INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING = 304,
618
619 /// Short names are not enabled on this volume.
620 SHORT_NAMES_NOT_ENABLED_ON_VOLUME = 305,
621
622 /// The security stream for the given volume is in an inconsistent state. Please run CHKDSK on the volume.
623 SECURITY_STREAM_IS_INCONSISTENT = 306,
624
625 /// A requested file lock operation cannot be processed due to an invalid byte range.
626 INVALID_LOCK_RANGE = 307,
627
628 /// The subsystem needed to support the image type is not present.
629 IMAGE_SUBSYSTEM_NOT_PRESENT = 308,
630
631 /// The specified file already has a notification GUID associated with it.
632 NOTIFICATION_GUID_ALREADY_DEFINED = 309,
633
634 /// An invalid exception handler routine has been detected.
635 INVALID_EXCEPTION_HANDLER = 310,
636
637 /// Duplicate privileges were specified for the token.
638 DUPLICATE_PRIVILEGES = 311,
639
640 /// No ranges for the specified operation were able to be processed.
641 NO_RANGES_PROCESSED = 312,
642
643 /// Operation is not allowed on a file system internal file.
644 NOT_ALLOWED_ON_SYSTEM_FILE = 313,
645
646 /// The physical resources of this disk have been exhausted.
647 DISK_RESOURCES_EXHAUSTED = 314,
648
649 /// The token representing the data is invalid.
650 INVALID_TOKEN = 315,
651
652 /// The device does not support the command feature.
653 DEVICE_FEATURE_NOT_SUPPORTED = 316,
654
655 /// The system cannot find message text for message number 0x%1 in the message file for %2.
656 MR_MID_NOT_FOUND = 317,
657
658 /// The scope specified was not found.
659 SCOPE_NOT_FOUND = 318,
660
661 /// The Central Access Policy specified is not defined on the target machine.
662 UNDEFINED_SCOPE = 319,
663
664 /// The Central Access Policy obtained from Active Directory is invalid.
665 INVALID_CAP = 320,
666
667 /// The device is unreachable.
668 DEVICE_UNREACHABLE = 321,
669
670 /// The target device has insufficient resources to complete the operation.
671 DEVICE_NO_RESOURCES = 322,
672
673 /// A data integrity checksum error occurred. Data in the file stream is corrupt.
674 DATA_CHECKSUM_ERROR = 323,
675
676 /// An attempt was made to modify both a KERNEL and normal Extended Attribute (EA) in the same operation.
677 INTERMIXED_KERNEL_EA_OPERATION = 324,
678
679 /// Device does not support file-level TRIM.
680 FILE_LEVEL_TRIM_NOT_SUPPORTED = 326,
681
682 /// The command specified a data offset that does not align to the device's granularity/alignment.
683 OFFSET_ALIGNMENT_VIOLATION = 327,
684
685 /// The command specified an invalid field in its parameter list.
686 INVALID_FIELD_IN_PARAMETER_LIST = 328,
687
688 /// An operation is currently in progress with the device.
689 OPERATION_IN_PROGRESS = 329,
690
691 /// An attempt was made to send down the command via an invalid path to the target device.
692 BAD_DEVICE_PATH = 330,
693
694 /// The command specified a number of descriptors that exceeded the maximum supported by the device.
695 TOO_MANY_DESCRIPTORS = 331,
696
697 /// Scrub is disabled on the specified file.
698 SCRUB_DATA_DISABLED = 332,
699
700 /// The storage device does not provide redundancy.
701 NOT_REDUNDANT_STORAGE = 333,
702
703 /// An operation is not supported on a resident file.
704 RESIDENT_FILE_NOT_SUPPORTED = 334,
705
706 /// An operation is not supported on a compressed file.
707 COMPRESSED_FILE_NOT_SUPPORTED = 335,
708
709 /// An operation is not supported on a directory.
710 DIRECTORY_NOT_SUPPORTED = 336,
711
712 /// The specified copy of the requested data could not be read.
713 NOT_READ_FROM_COPY = 337,
714
715 /// No action was taken as a system reboot is required.
716 FAIL_NOACTION_REBOOT = 350,
717
718 /// The shutdown operation failed.
719 FAIL_SHUTDOWN = 351,
720
721 /// The restart operation failed.
722 FAIL_RESTART = 352,
723
724 /// The maximum number of sessions has been reached.
725 MAX_SESSIONS_REACHED = 353,
726
727 /// The thread is already in background processing mode.
728 THREAD_MODE_ALREADY_BACKGROUND = 400,
729
730 /// The thread is not in background processing mode.
731 THREAD_MODE_NOT_BACKGROUND = 401,
732
733 /// The process is already in background processing mode.
734 PROCESS_MODE_ALREADY_BACKGROUND = 402,
735
736 /// The process is not in background processing mode.
737 PROCESS_MODE_NOT_BACKGROUND = 403,
738
739 /// Attempt to access invalid address.
740 INVALID_ADDRESS = 487,
741
742 /// User profile cannot be loaded.
743 USER_PROFILE_LOAD = 500,
744
745 /// Arithmetic result exceeded 32 bits.
746 ARITHMETIC_OVERFLOW = 534,
747
748 /// There is a process on other end of the pipe.
749 PIPE_CONNECTED = 535,
750
751 /// Waiting for a process to open the other end of the pipe.
752 PIPE_LISTENING = 536,
753
754 /// Application verifier has found an error in the current process.
755 VERIFIER_STOP = 537,
756
757 /// An error occurred in the ABIOS subsystem.
758 ABIOS_ERROR = 538,
759
760 /// A warning occurred in the WX86 subsystem.
761 WX86_WARNING = 539,
762
763 /// An error occurred in the WX86 subsystem.
764 WX86_ERROR = 540,
765
766 /// An attempt was made to cancel or set a timer that has an associated APC and the subject thread is not the thread that originally set the timer with an associated APC routine.
767 TIMER_NOT_CANCELED = 541,
768
769 /// Unwind exception code.
770 UNWIND = 542,
771
772 /// An invalid or unaligned stack was encountered during an unwind operation.
773 BAD_STACK = 543,
774
775 /// An invalid unwind target was encountered during an unwind operation.
776 INVALID_UNWIND_TARGET = 544,
777
778 /// Invalid Object Attributes specified to NtCreatePort or invalid Port Attributes specified to NtConnectPort
779 INVALID_PORT_ATTRIBUTES = 545,
780
781 /// Length of message passed to NtRequestPort or NtRequestWaitReplyPort was longer than the maximum message allowed by the port.
782 PORT_MESSAGE_TOO_LONG = 546,
783
784 /// An attempt was made to lower a quota limit below the current usage.
785 INVALID_QUOTA_LOWER = 547,
786
787 /// An attempt was made to attach to a device that was already attached to another device.
788 DEVICE_ALREADY_ATTACHED = 548,
789
790 /// An attempt was made to execute an instruction at an unaligned address and the host system does not support unaligned instruction references.
791 INSTRUCTION_MISALIGNMENT = 549,
792
793 /// Profiling not started.
794 PROFILING_NOT_STARTED = 550,
795
796 /// Profiling not stopped.
797 PROFILING_NOT_STOPPED = 551,
798
799 /// The passed ACL did not contain the minimum required information.
800 COULD_NOT_INTERPRET = 552,
801
802 /// The number of active profiling objects is at the maximum and no more may be started.
803 PROFILING_AT_LIMIT = 553,
804
805 /// Used to indicate that an operation cannot continue without blocking for I/O.
806 CANT_WAIT = 554,
807
808 /// Indicates that a thread attempted to terminate itself by default (called NtTerminateThread with NULL) and it was the last thread in the current process.
809 CANT_TERMINATE_SELF = 555,
810
811 /// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter.
812 /// In this case information is lost, however, the filter correctly handles the exception.
813 UNEXPECTED_MM_CREATE_ERR = 556,
814
815 /// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter.
816 /// In this case information is lost, however, the filter correctly handles the exception.
817 UNEXPECTED_MM_MAP_ERROR = 557,
818
819 /// If an MM error is returned which is not defined in the standard FsRtl filter, it is converted to one of the following errors which is guaranteed to be in the filter.
820 /// In this case information is lost, however, the filter correctly handles the exception.
821 UNEXPECTED_MM_EXTEND_ERR = 558,
822
823 /// A malformed function table was encountered during an unwind operation.
824 BAD_FUNCTION_TABLE = 559,
825
826 /// Indicates that an attempt was made to assign protection to a file system file or directory and one of the SIDs in the security descriptor could not be translated into a GUID that could be stored by the file system.
827 /// This causes the protection attempt to fail, which may cause a file creation attempt to fail.
828 NO_GUID_TRANSLATION = 560,
829
830 /// Indicates that an attempt was made to grow an LDT by setting its size, or that the size was not an even number of selectors.
831 INVALID_LDT_SIZE = 561,
832
833 /// Indicates that the starting value for the LDT information was not an integral multiple of the selector size.
834 INVALID_LDT_OFFSET = 563,
835
836 /// Indicates that the user supplied an invalid descriptor when trying to set up Ldt descriptors.
837 INVALID_LDT_DESCRIPTOR = 564,
838
839 /// Indicates a process has too many threads to perform the requested action.
840 /// For example, assignment of a primary token may only be performed when a process has zero or one threads.
841 TOO_MANY_THREADS = 565,
842
843 /// An attempt was made to operate on a thread within a specific process, but the thread specified is not in the process specified.
844 THREAD_NOT_IN_PROCESS = 566,
845
846 /// Page file quota was exceeded.
847 PAGEFILE_QUOTA_EXCEEDED = 567,
848
849 /// The Netlogon service cannot start because another Netlogon service running in the domain conflicts with the specified role.
850 LOGON_SERVER_CONFLICT = 568,
851
852 /// The SAM database on a Windows Server is significantly out of synchronization with the copy on the Domain Controller. A complete synchronization is required.
853 SYNCHRONIZATION_REQUIRED = 569,
854
855 /// The NtCreateFile API failed. This error should never be returned to an application, it is a place holder for the Windows Lan Manager Redirector to use in its internal error mapping routines.
856 NET_OPEN_FAILED = 570,
857
858 /// {Privilege Failed} The I/O permissions for the process could not be changed.
859 IO_PRIVILEGE_FAILED = 571,
860
861 /// {Application Exit by CTRL+C} The application terminated as a result of a CTRL+C.
862 CONTROL_C_EXIT = 572,
863
864 /// {Missing System File} The required system file %hs is bad or missing.
865 MISSING_SYSTEMFILE = 573,
866
867 /// {Application Error} The exception %s (0x%08lx) occurred in the application at location 0x%08lx.
868 UNHANDLED_EXCEPTION = 574,
869
870 /// {Application Error} The application was unable to start correctly (0x%lx). Click OK to close the application.
871 APP_INIT_FAILURE = 575,
872
873 /// {Unable to Create Paging File} The creation of the paging file %hs failed (%lx). The requested size was %ld.
874 PAGEFILE_CREATE_FAILED = 576,
875
876 /// Windows cannot verify the digital signature for this file.
877 /// A recent hardware or software change might have installed a file that is signed incorrectly or damaged, or that might be malicious software from an unknown source.
878 INVALID_IMAGE_HASH = 577,
879
880 /// {No Paging File Specified} No paging file was specified in the system configuration.
881 NO_PAGEFILE = 578,
882
883 /// {EXCEPTION} A real-mode application issued a floating-point instruction and floating-point hardware is not present.
884 ILLEGAL_FLOAT_CONTEXT = 579,
885
886 /// An event pair synchronization operation was performed using the thread specific client/server event pair object, but no event pair object was associated with the thread.
887 NO_EVENT_PAIR = 580,
888
889 /// A Windows Server has an incorrect configuration.
890 DOMAIN_CTRLR_CONFIG_ERROR = 581,
891
892 /// An illegal character was encountered.
893 /// For a multi-byte character set this includes a lead byte without a succeeding trail byte.
894 /// For the Unicode character set this includes the characters 0xFFFF and 0xFFFE.
895 ILLEGAL_CHARACTER = 582,
896
897 /// The Unicode character is not defined in the Unicode character set installed on the system.
898 UNDEFINED_CHARACTER = 583,
899
900 /// The paging file cannot be created on a floppy diskette.
901 FLOPPY_VOLUME = 584,
902
903 /// The system BIOS failed to connect a system interrupt to the device or bus for which the device is connected.
904 BIOS_FAILED_TO_CONNECT_INTERRUPT = 585,
905
906 /// This operation is only allowed for the Primary Domain Controller of the domain.
907 BACKUP_CONTROLLER = 586,
908
909 /// An attempt was made to acquire a mutant such that its maximum count would have been exceeded.
910 MUTANT_LIMIT_EXCEEDED = 587,
911
912 /// A volume has been accessed for which a file system driver is required that has not yet been loaded.
913 FS_DRIVER_REQUIRED = 588,
914
915 /// {Registry File Failure} The registry cannot load the hive (file): %hs or its log or alternate. It is corrupt, absent, or not writable.
916 CANNOT_LOAD_REGISTRY_FILE = 589,
917
918 /// {Unexpected Failure in DebugActiveProcess} An unexpected failure occurred while processing a DebugActiveProcess API request.
919 /// You may choose OK to terminate the process, or Cancel to ignore the error.
920 DEBUG_ATTACH_FAILED = 590,
921
922 /// {Fatal System Error} The %hs system process terminated unexpectedly with a status of 0x%08x (0x%08x 0x%08x). The system has been shut down.
923 SYSTEM_PROCESS_TERMINATED = 591,
924
925 /// {Data Not Accepted} The TDI client could not handle the data received during an indication.
926 DATA_NOT_ACCEPTED = 592,
927
928 /// NTVDM encountered a hard error.
929 VDM_HARD_ERROR = 593,
930
931 /// {Cancel Timeout} The driver %hs failed to complete a cancelled I/O request in the allotted time.
932 DRIVER_CANCEL_TIMEOUT = 594,
933
934 /// {Reply Message Mismatch} An attempt was made to reply to an LPC message, but the thread specified by the client ID in the message was not waiting on that message.
935 REPLY_MESSAGE_MISMATCH = 595,
936
937 /// {Delayed Write Failed} Windows was unable to save all the data for the file %hs. The data has been lost.
938 /// This error may be caused by a failure of your computer hardware or network connection. Please try to save this file elsewhere.
939 LOST_WRITEBEHIND_DATA = 596,
940
941 /// The parameter(s) passed to the server in the client/server shared memory window were invalid.
942 /// Too much data may have been put in the shared memory window.
943 CLIENT_SERVER_PARAMETERS_INVALID = 597,
944
945 /// The stream is not a tiny stream.
946 NOT_TINY_STREAM = 598,
947
948 /// The request must be handled by the stack overflow code.
949 STACK_OVERFLOW_READ = 599,
950
951 /// Internal OFS status codes indicating how an allocation operation is handled.
952 /// Either it is retried after the containing onode is moved or the extent stream is converted to a large stream.
953 CONVERT_TO_LARGE = 600,
954
955 /// The attempt to find the object found an object matching by ID on the volume but it is out of the scope of the handle used for the operation.
956 FOUND_OUT_OF_SCOPE = 601,
957
958 /// The bucket array must be grown. Retry transaction after doing so.
959 ALLOCATE_BUCKET = 602,
960
961 /// The user/kernel marshalling buffer has overflowed.
962 MARSHALL_OVERFLOW = 603,
963
964 /// The supplied variant structure contains invalid data.
965 INVALID_VARIANT = 604,
966
967 /// The specified buffer contains ill-formed data.
968 BAD_COMPRESSION_BUFFER = 605,
969
970 /// {Audit Failed} An attempt to generate a security audit failed.
971 AUDIT_FAILED = 606,
972
973 /// The timer resolution was not previously set by the current process.
974 TIMER_RESOLUTION_NOT_SET = 607,
975
976 /// There is insufficient account information to log you on.
977 INSUFFICIENT_LOGON_INFO = 608,
978
979 /// {Invalid DLL Entrypoint} The dynamic link library %hs is not written correctly.
980 /// The stack pointer has been left in an inconsistent state.
981 /// The entrypoint should be declared as WINAPI or STDCALL.
982 /// Select YES to fail the DLL load. Select NO to continue execution.
983 /// Selecting NO may cause the application to operate incorrectly.
984 BAD_DLL_ENTRYPOINT = 609,
985
986 /// {Invalid Service Callback Entrypoint} The %hs service is not written correctly.
987 /// The stack pointer has been left in an inconsistent state.
988 /// The callback entrypoint should be declared as WINAPI or STDCALL.
989 /// Selecting OK will cause the service to continue operation.
990 /// However, the service process may operate incorrectly.
991 BAD_SERVICE_ENTRYPOINT = 610,
992
993 /// There is an IP address conflict with another system on the network.
994 IP_ADDRESS_CONFLICT1 = 611,
995
996 /// There is an IP address conflict with another system on the network.
997 IP_ADDRESS_CONFLICT2 = 612,
998
999 /// {Low On Registry Space} The system has reached the maximum size allowed for the system part of the registry. Additional storage requests will be ignored.
1000 REGISTRY_QUOTA_LIMIT = 613,
1001
1002 /// A callback return system service cannot be executed when no callback is active.
1003 NO_CALLBACK_ACTIVE = 614,
1004
1005 /// The password provided is too short to meet the policy of your user account. Please choose a longer password.
1006 PWD_TOO_SHORT = 615,
1007
1008 /// The policy of your user account does not allow you to change passwords too frequently.
1009 /// This is done to prevent users from changing back to a familiar, but potentially discovered, password.
1010 /// If you feel your password has been compromised then please contact your administrator immediately to have a new one assigned.
1011 PWD_TOO_RECENT = 616,
1012
1013 /// You have attempted to change your password to one that you have used in the past.
1014 /// The policy of your user account does not allow this.
1015 /// Please select a password that you have not previously used.
1016 PWD_HISTORY_CONFLICT = 617,
1017
1018 /// The specified compression format is unsupported.
1019 UNSUPPORTED_COMPRESSION = 618,
1020
1021 /// The specified hardware profile configuration is invalid.
1022 INVALID_HW_PROFILE = 619,
1023
1024 /// The specified Plug and Play registry device path is invalid.
1025 INVALID_PLUGPLAY_DEVICE_PATH = 620,
1026
1027 /// The specified quota list is internally inconsistent with its descriptor.
1028 QUOTA_LIST_INCONSISTENT = 621,
1029
1030 /// {Windows Evaluation Notification} The evaluation period for this installation of Windows has expired. This system will shutdown in 1 hour.
1031 /// To restore access to this installation of Windows, please upgrade this installation using a licensed distribution of this product.
1032 EVALUATION_EXPIRATION = 622,
1033
1034 /// {Illegal System DLL Relocation} The system DLL %hs was relocated in memory. The application will not run properly.
1035 /// The relocation occurred because the DLL %hs occupied an address range reserved for Windows system DLLs.
1036 /// The vendor supplying the DLL should be contacted for a new DLL.
1037 ILLEGAL_DLL_RELOCATION = 623,
1038
1039 /// {DLL Initialization Failed} The application failed to initialize because the window station is shutting down.
1040 DLL_INIT_FAILED_LOGOFF = 624,
1041
1042 /// The validation process needs to continue on to the next step.
1043 VALIDATE_CONTINUE = 625,
1044
1045 /// There are no more matches for the current index enumeration.
1046 NO_MORE_MATCHES = 626,
1047
1048 /// The range could not be added to the range list because of a conflict.
1049 RANGE_LIST_CONFLICT = 627,
1050
1051 /// The server process is running under a SID different than that required by client.
1052 SERVER_SID_MISMATCH = 628,
1053
1054 /// A group marked use for deny only cannot be enabled.
1055 CANT_ENABLE_DENY_ONLY = 629,
1056
1057 /// {EXCEPTION} Multiple floating point faults.
1058 FLOAT_MULTIPLE_FAULTS = 630,
1059
1060 /// {EXCEPTION} Multiple floating point traps.
1061 FLOAT_MULTIPLE_TRAPS = 631,
1062
1063 /// The requested interface is not supported.
1064 NOINTERFACE = 632,
1065
1066 /// {System Standby Failed} The driver %hs does not support standby mode.
1067 /// Updating this driver may allow the system to go to standby mode.
1068 DRIVER_FAILED_SLEEP = 633,
1069
1070 /// The system file %1 has become corrupt and has been replaced.
1071 CORRUPT_SYSTEM_FILE = 634,
1072
1073 /// {Virtual Memory Minimum Too Low} Your system is low on virtual memory.
1074 /// Windows is increasing the size of your virtual memory paging file.
1075 /// During this process, memory requests for some applications may be denied. For more information, see Help.
1076 COMMITMENT_MINIMUM = 635,
1077
1078 /// A device was removed so enumeration must be restarted.
1079 PNP_RESTART_ENUMERATION = 636,
1080
1081 /// {Fatal System Error} The system image %s is not properly signed.
1082 /// The file has been replaced with the signed file. The system has been shut down.
1083 SYSTEM_IMAGE_BAD_SIGNATURE = 637,
1084
1085 /// Device will not start without a reboot.
1086 PNP_REBOOT_REQUIRED = 638,
1087
1088 /// There is not enough power to complete the requested operation.
1089 INSUFFICIENT_POWER = 639,
1090
1091 /// ERROR_MULTIPLE_FAULT_VIOLATION
1092 MULTIPLE_FAULT_VIOLATION = 640,
1093
1094 /// The system is in the process of shutting down.
1095 SYSTEM_SHUTDOWN = 641,
1096
1097 /// An attempt to remove a processes DebugPort was made, but a port was not already associated with the process.
1098 PORT_NOT_SET = 642,
1099
1100 /// This version of Windows is not compatible with the behavior version of directory forest, domain or domain controller.
1101 DS_VERSION_CHECK_FAILURE = 643,
1102
1103 /// The specified range could not be found in the range list.
1104 RANGE_NOT_FOUND = 644,
1105
1106 /// The driver was not loaded because the system is booting into safe mode.
1107 NOT_SAFE_MODE_DRIVER = 646,
1108
1109 /// The driver was not loaded because it failed its initialization call.
1110 FAILED_DRIVER_ENTRY = 647,
1111
1112 /// The "%hs" encountered an error while applying power or reading the device configuration.
1113 /// This may be caused by a failure of your hardware or by a poor connection.
1114 DEVICE_ENUMERATION_ERROR = 648,
1115
1116 /// The create operation failed because the name contained at least one mount point which resolves to a volume to which the specified device object is not attached.
1117 MOUNT_POINT_NOT_RESOLVED = 649,
1118
1119 /// The device object parameter is either not a valid device object or is not attached to the volume specified by the file name.
1120 INVALID_DEVICE_OBJECT_PARAMETER = 650,
1121
1122 /// A Machine Check Error has occurred.
1123 /// Please check the system eventlog for additional information.
1124 MCA_OCCURED = 651,
1125
1126 /// There was error [%2] processing the driver database.
1127 DRIVER_DATABASE_ERROR = 652,
1128
1129 /// System hive size has exceeded its limit.
1130 SYSTEM_HIVE_TOO_LARGE = 653,
1131
1132 /// The driver could not be loaded because a previous version of the driver is still in memory.
1133 DRIVER_FAILED_PRIOR_UNLOAD = 654,
1134
1135 /// {Volume Shadow Copy Service} Please wait while the Volume Shadow Copy Service prepares volume %hs for hibernation.
1136 VOLSNAP_PREPARE_HIBERNATE = 655,
1137
1138 /// The system has failed to hibernate (The error code is %hs).
1139 /// Hibernation will be disabled until the system is restarted.
1140 HIBERNATION_FAILURE = 656,
1141
1142 /// The password provided is too long to meet the policy of your user account. Please choose a shorter password.
1143 PWD_TOO_LONG = 657,
1144
1145 /// The requested operation could not be completed due to a file system limitation.
1146 FILE_SYSTEM_LIMITATION = 665,
1147
1148 /// An assertion failure has occurred.
1149 ASSERTION_FAILURE = 668,
1150
1151 /// An error occurred in the ACPI subsystem.
1152 ACPI_ERROR = 669,
1153
1154 /// WOW Assertion Error.
1155 WOW_ASSERTION = 670,
1156
1157 /// A device is missing in the system BIOS MPS table. This device will not be used.
1158 /// Please contact your system vendor for system BIOS update.
1159 PNP_BAD_MPS_TABLE = 671,
1160
1161 /// A translator failed to translate resources.
1162 PNP_TRANSLATION_FAILED = 672,
1163
1164 /// A IRQ translator failed to translate resources.
1165 PNP_IRQ_TRANSLATION_FAILED = 673,
1166
1167 /// Driver %2 returned invalid ID for a child device (%3).
1168 PNP_INVALID_ID = 674,
1169
1170 /// {Kernel Debugger Awakened} the system debugger was awakened by an interrupt.
1171 WAKE_SYSTEM_DEBUGGER = 675,
1172
1173 /// {Handles Closed} Handles to objects have been automatically closed as a result of the requested operation.
1174 HANDLES_CLOSED = 676,
1175
1176 /// {Too Much Information} The specified access control list (ACL) contained more information than was expected.
1177 EXTRANEOUS_INFORMATION = 677,
1178
1179 /// This warning level status indicates that the transaction state already exists for the registry sub-tree, but that a transaction commit was previously aborted.
1180 /// The commit has NOT been completed, but has not been rolled back either (so it may still be committed if desired).
1181 RXACT_COMMIT_NECESSARY = 678,
1182
1183 /// {Media Changed} The media may have changed.
1184 MEDIA_CHECK = 679,
1185
1186 /// {GUID Substitution} During the translation of a global identifier (GUID) to a Windows security ID (SID), no administratively-defined GUID prefix was found.
1187 /// A substitute prefix was used, which will not compromise system security.
1188 /// However, this may provide a more restrictive access than intended.
1189 GUID_SUBSTITUTION_MADE = 680,
1190
1191 /// The create operation stopped after reaching a symbolic link.
1192 STOPPED_ON_SYMLINK = 681,
1193
1194 /// A long jump has been executed.
1195 LONGJUMP = 682,
1196
1197 /// The Plug and Play query operation was not successful.
1198 PLUGPLAY_QUERY_VETOED = 683,
1199
1200 /// A frame consolidation has been executed.
1201 UNWIND_CONSOLIDATE = 684,
1202
1203 /// {Registry Hive Recovered} Registry hive (file): %hs was corrupted and it has been recovered. Some data might have been lost.
1204 REGISTRY_HIVE_RECOVERED = 685,
1205
1206 /// The application is attempting to run executable code from the module %hs. This may be insecure.
1207 /// An alternative, %hs, is available. Should the application use the secure module %hs?
1208 DLL_MIGHT_BE_INSECURE = 686,
1209
1210 /// The application is loading executable code from the module %hs.
1211 /// This is secure, but may be incompatible with previous releases of the operating system.
1212 /// An alternative, %hs, is available. Should the application use the secure module %hs?
1213 DLL_MIGHT_BE_INCOMPATIBLE = 687,
1214
1215 /// Debugger did not handle the exception.
1216 DBG_EXCEPTION_NOT_HANDLED = 688,
1217
1218 /// Debugger will reply later.
1219 DBG_REPLY_LATER = 689,
1220
1221 /// Debugger cannot provide handle.
1222 DBG_UNABLE_TO_PROVIDE_HANDLE = 690,
1223
1224 /// Debugger terminated thread.
1225 DBG_TERMINATE_THREAD = 691,
1226
1227 /// Debugger terminated process.
1228 DBG_TERMINATE_PROCESS = 692,
1229
1230 /// Debugger got control C.
1231 DBG_CONTROL_C = 693,
1232
1233 /// Debugger printed exception on control C.
1234 DBG_PRINTEXCEPTION_C = 694,
1235
1236 /// Debugger received RIP exception.
1237 DBG_RIPEXCEPTION = 695,
1238
1239 /// Debugger received control break.
1240 DBG_CONTROL_BREAK = 696,
1241
1242 /// Debugger command communication exception.
1243 DBG_COMMAND_EXCEPTION = 697,
1244
1245 /// {Object Exists} An attempt was made to create an object and the object name already existed.
1246 OBJECT_NAME_EXISTS = 698,
1247
1248 /// {Thread Suspended} A thread termination occurred while the thread was suspended.
1249 /// The thread was resumed, and termination proceeded.
1250 THREAD_WAS_SUSPENDED = 699,
1251
1252 /// {Image Relocated} An image file could not be mapped at the address specified in the image file. Local fixups must be performed on this image.
1253 IMAGE_NOT_AT_BASE = 700,
1254
1255 /// This informational level status indicates that a specified registry sub-tree transaction state did not yet exist and had to be created.
1256 RXACT_STATE_CREATED = 701,
1257
1258 /// {Segment Load} A virtual DOS machine (VDM) is loading, unloading, or moving an MS-DOS or Win16 program segment image.
1259 /// An exception is raised so a debugger can load, unload or track symbols and breakpoints within these 16-bit segments.
1260 SEGMENT_NOTIFICATION = 702,
1261
1262 /// {Invalid Current Directory} The process cannot switch to the startup current directory %hs.
1263 /// Select OK to set current directory to %hs, or select CANCEL to exit.
1264 BAD_CURRENT_DIRECTORY = 703,
1265
1266 /// {Redundant Read} To satisfy a read request, the NT fault-tolerant file system successfully read the requested data from a redundant copy.
1267 /// This was done because the file system encountered a failure on a member of the fault-tolerant volume, but was unable to reassign the failing area of the device.
1268 FT_READ_RECOVERY_FROM_BACKUP = 704,
1269
1270 /// {Redundant Write} To satisfy a write request, the NT fault-tolerant file system successfully wrote a redundant copy of the information.
1271 /// This was done because the file system encountered a failure on a member of the fault-tolerant volume, but was not able to reassign the failing area of the device.
1272 FT_WRITE_RECOVERY = 705,
1273
1274 /// {Machine Type Mismatch} The image file %hs is valid, but is for a machine type other than the current machine.
1275 /// Select OK to continue, or CANCEL to fail the DLL load.
1276 IMAGE_MACHINE_TYPE_MISMATCH = 706,
1277
1278 /// {Partial Data Received} The network transport returned partial data to its client. The remaining data will be sent later.
1279 RECEIVE_PARTIAL = 707,
1280
1281 /// {Expedited Data Received} The network transport returned data to its client that was marked as expedited by the remote system.
1282 RECEIVE_EXPEDITED = 708,
1283
1284 /// {Partial Expedited Data Received} The network transport returned partial data to its client and this data was marked as expedited by the remote system. The remaining data will be sent later.
1285 RECEIVE_PARTIAL_EXPEDITED = 709,
1286
1287 /// {TDI Event Done} The TDI indication has completed successfully.
1288 EVENT_DONE = 710,
1289
1290 /// {TDI Event Pending} The TDI indication has entered the pending state.
1291 EVENT_PENDING = 711,
1292
1293 /// Checking file system on %wZ.
1294 CHECKING_FILE_SYSTEM = 712,
1295
1296 /// {Fatal Application Exit} %hs.
1297 FATAL_APP_EXIT = 713,
1298
1299 /// The specified registry key is referenced by a predefined handle.
1300 PREDEFINED_HANDLE = 714,
1301
1302 /// {Page Unlocked} The page protection of a locked page was changed to 'No Access' and the page was unlocked from memory and from the process.
1303 WAS_UNLOCKED = 715,
1304
1305 /// %hs
1306 SERVICE_NOTIFICATION = 716,
1307
1308 /// {Page Locked} One of the pages to lock was already locked.
1309 WAS_LOCKED = 717,
1310
1311 /// Application popup: %1 : %2
1312 LOG_HARD_ERROR = 718,
1313
1314 /// ERROR_ALREADY_WIN32
1315 ALREADY_WIN32 = 719,
1316
1317 /// {Machine Type Mismatch} The image file %hs is valid, but is for a machine type other than the current machine.
1318 IMAGE_MACHINE_TYPE_MISMATCH_EXE = 720,
1319
1320 /// A yield execution was performed and no thread was available to run.
1321 NO_YIELD_PERFORMED = 721,
1322
1323 /// The resumable flag to a timer API was ignored.
1324 TIMER_RESUME_IGNORED = 722,
1325
1326 /// The arbiter has deferred arbitration of these resources to its parent.
1327 ARBITRATION_UNHANDLED = 723,
1328
1329 /// The inserted CardBus device cannot be started because of a configuration error on "%hs".
1330 CARDBUS_NOT_SUPPORTED = 724,
1331
1332 /// The CPUs in this multiprocessor system are not all the same revision level.
1333 /// To use all processors the operating system restricts itself to the features of the least capable processor in the system.
1334 /// Should problems occur with this system, contact the CPU manufacturer to see if this mix of processors is supported.
1335 MP_PROCESSOR_MISMATCH = 725,
1336
1337 /// The system was put into hibernation.
1338 HIBERNATED = 726,
1339
1340 /// The system was resumed from hibernation.
1341 RESUME_HIBERNATION = 727,
1342
1343 /// Windows has detected that the system firmware (BIOS) was updated [previous firmware date = %2, current firmware date %3].
1344 FIRMWARE_UPDATED = 728,
1345
1346 /// A device driver is leaking locked I/O pages causing system degradation.
1347 /// The system has automatically enabled tracking code in order to try and catch the culprit.
1348 DRIVERS_LEAKING_LOCKED_PAGES = 729,
1349
1350 /// The system has awoken.
1351 WAKE_SYSTEM = 730,
1352
1353 /// ERROR_WAIT_1
1354 WAIT_1 = 731,
1355
1356 /// ERROR_WAIT_2
1357 WAIT_2 = 732,
1358
1359 /// ERROR_WAIT_3
1360 WAIT_3 = 733,
1361
1362 /// ERROR_WAIT_63
1363 WAIT_63 = 734,
1364
1365 /// ERROR_ABANDONED_WAIT_0
1366 ABANDONED_WAIT_0 = 735,
1367
1368 /// ERROR_ABANDONED_WAIT_63
1369 ABANDONED_WAIT_63 = 736,
1370
1371 /// ERROR_USER_APC
1372 USER_APC = 737,
1373
1374 /// ERROR_KERNEL_APC
1375 KERNEL_APC = 738,
1376
1377 /// ERROR_ALERTED
1378 ALERTED = 739,
1379
1380 /// The requested operation requires elevation.
1381 ELEVATION_REQUIRED = 740,
1382
1383 /// A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link.
1384 REPARSE = 741,
1385
1386 /// An open/create operation completed while an oplock break is underway.
1387 OPLOCK_BREAK_IN_PROGRESS = 742,
1388
1389 /// A new volume has been mounted by a file system.
1390 VOLUME_MOUNTED = 743,
1391
1392 /// This success level status indicates that the transaction state already exists for the registry sub-tree, but that a transaction commit was previously aborted. The commit has now been completed.
1393 RXACT_COMMITTED = 744,
1394
1395 /// This indicates that a notify change request has been completed due to closing the handle which made the notify change request.
1396 NOTIFY_CLEANUP = 745,
1397
1398 /// {Connect Failure on Primary Transport} An attempt was made to connect to the remote server %hs on the primary transport, but the connection failed.
1399 /// The computer WAS able to connect on a secondary transport.
1400 PRIMARY_TRANSPORT_CONNECT_FAILED = 746,
1401
1402 /// Page fault was a transition fault.
1403 PAGE_FAULT_TRANSITION = 747,
1404
1405 /// Page fault was a demand zero fault.
1406 PAGE_FAULT_DEMAND_ZERO = 748,
1407
1408 /// Page fault was a demand zero fault.
1409 PAGE_FAULT_COPY_ON_WRITE = 749,
1410
1411 /// Page fault was a demand zero fault.
1412 PAGE_FAULT_GUARD_PAGE = 750,
1413
1414 /// Page fault was satisfied by reading from a secondary storage device.
1415 PAGE_FAULT_PAGING_FILE = 751,
1416
1417 /// Cached page was locked during operation.
1418 CACHE_PAGE_LOCKED = 752,
1419
1420 /// Crash dump exists in paging file.
1421 CRASH_DUMP = 753,
1422
1423 /// Specified buffer contains all zeros.
1424 BUFFER_ALL_ZEROS = 754,
1425
1426 /// A reparse should be performed by the Object Manager since the name of the file resulted in a symbolic link.
1427 REPARSE_OBJECT = 755,
1428
1429 /// The device has succeeded a query-stop and its resource requirements have changed.
1430 RESOURCE_REQUIREMENTS_CHANGED = 756,
1431
1432 /// The translator has translated these resources into the global space and no further translations should be performed.
1433 TRANSLATION_COMPLETE = 757,
1434
1435 /// A process being terminated has no threads to terminate.
1436 NOTHING_TO_TERMINATE = 758,
1437
1438 /// The specified process is not part of a job.
1439 PROCESS_NOT_IN_JOB = 759,
1440
1441 /// The specified process is part of a job.
1442 PROCESS_IN_JOB = 760,
1443
1444 /// {Volume Shadow Copy Service} The system is now ready for hibernation.
1445 VOLSNAP_HIBERNATE_READY = 761,
1446
1447 /// A file system or file system filter driver has successfully completed an FsFilter operation.
1448 FSFILTER_OP_COMPLETED_SUCCESSFULLY = 762,
1449
1450 /// The specified interrupt vector was already connected.
1451 INTERRUPT_VECTOR_ALREADY_CONNECTED = 763,
1452
1453 /// The specified interrupt vector is still connected.
1454 INTERRUPT_STILL_CONNECTED = 764,
1455
1456 /// An operation is blocked waiting for an oplock.
1457 WAIT_FOR_OPLOCK = 765,
1458
1459 /// Debugger handled exception.
1460 DBG_EXCEPTION_HANDLED = 766,
1461
1462 /// Debugger continued.
1463 DBG_CONTINUE = 767,
1464
1465 /// An exception occurred in a user mode callback and the kernel callback frame should be removed.
1466 CALLBACK_POP_STACK = 768,
1467
1468 /// Compression is disabled for this volume.
1469 COMPRESSION_DISABLED = 769,
1470
1471 /// The data provider cannot fetch backwards through a result set.
1472 CANTFETCHBACKWARDS = 770,
1473
1474 /// The data provider cannot scroll backwards through a result set.
1475 CANTSCROLLBACKWARDS = 771,
1476
1477 /// The data provider requires that previously fetched data is released before asking for more data.
1478 ROWSNOTRELEASED = 772,
1479
1480 /// The data provider was not able to interpret the flags set for a column binding in an accessor.
1481 BAD_ACCESSOR_FLAGS = 773,
1482
1483 /// One or more errors occurred while processing the request.
1484 ERRORS_ENCOUNTERED = 774,
1485
1486 /// The implementation is not capable of performing the request.
1487 NOT_CAPABLE = 775,
1488
1489 /// The client of a component requested an operation which is not valid given the state of the component instance.
1490 REQUEST_OUT_OF_SEQUENCE = 776,
1491
1492 /// A version number could not be parsed.
1493 VERSION_PARSE_ERROR = 777,
1494
1495 /// The iterator's start position is invalid.
1496 BADSTARTPOSITION = 778,
1497
1498 /// The hardware has reported an uncorrectable memory error.
1499 MEMORY_HARDWARE = 779,
1500
1501 /// The attempted operation required self healing to be enabled.
1502 DISK_REPAIR_DISABLED = 780,
1503
1504 /// The Desktop heap encountered an error while allocating session memory.
1505 /// There is more information in the system event log.
1506 INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE = 781,
1507
1508 /// The system power state is transitioning from %2 to %3.
1509 SYSTEM_POWERSTATE_TRANSITION = 782,
1510
1511 /// The system power state is transitioning from %2 to %3 but could enter %4.
1512 SYSTEM_POWERSTATE_COMPLEX_TRANSITION = 783,
1513
1514 /// A thread is getting dispatched with MCA EXCEPTION because of MCA.
1515 MCA_EXCEPTION = 784,
1516
1517 /// Access to %1 is monitored by policy rule %2.
1518 ACCESS_AUDIT_BY_POLICY = 785,
1519
1520 /// Access to %1 has been restricted by your Administrator by policy rule %2.
1521 ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY = 786,
1522
1523 /// A valid hibernation file has been invalidated and should be abandoned.
1524 ABANDON_HIBERFILE = 787,
1525
1526 /// {Delayed Write Failed} Windows was unable to save all the data for the file %hs; the data has been lost.
1527 /// This error may be caused by network connectivity issues. Please try to save this file elsewhere.
1528 LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED = 788,
1529
1530 /// {Delayed Write Failed} Windows was unable to save all the data for the file %hs; the data has been lost.
1531 /// This error was returned by the server on which the file exists. Please try to save this file elsewhere.
1532 LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR = 789,
1533
1534 /// {Delayed Write Failed} Windows was unable to save all the data for the file %hs; the data has been lost.
1535 /// This error may be caused if the device has been removed or the media is write-protected.
1536 LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR = 790,
1537
1538 /// The resources required for this device conflict with the MCFG table.
1539 BAD_MCFG_TABLE = 791,
1540
1541 /// The volume repair could not be performed while it is online.
1542 /// Please schedule to take the volume offline so that it can be repaired.
1543 DISK_REPAIR_REDIRECTED = 792,
1544
1545 /// The volume repair was not successful.
1546 DISK_REPAIR_UNSUCCESSFUL = 793,
1547
1548 /// One of the volume corruption logs is full.
1549 /// Further corruptions that may be detected won't be logged.
1550 CORRUPT_LOG_OVERFULL = 794,
1551
1552 /// One of the volume corruption logs is internally corrupted and needs to be recreated.
1553 /// The volume may contain undetected corruptions and must be scanned.
1554 CORRUPT_LOG_CORRUPTED = 795,
1555
1556 /// One of the volume corruption logs is unavailable for being operated on.
1557 CORRUPT_LOG_UNAVAILABLE = 796,
1558
1559 /// One of the volume corruption logs was deleted while still having corruption records in them.
1560 /// The volume contains detected corruptions and must be scanned.
1561 CORRUPT_LOG_DELETED_FULL = 797,
1562
1563 /// One of the volume corruption logs was cleared by chkdsk and no longer contains real corruptions.
1564 CORRUPT_LOG_CLEARED = 798,
1565
1566 /// Orphaned files exist on the volume but could not be recovered because no more new names could be created in the recovery directory. Files must be moved from the recovery directory.
1567 ORPHAN_NAME_EXHAUSTED = 799,
1568
1569 /// The oplock that was associated with this handle is now associated with a different handle.
1570 OPLOCK_SWITCHED_TO_NEW_HANDLE = 800,
1571
1572 /// An oplock of the requested level cannot be granted. An oplock of a lower level may be available.
1573 CANNOT_GRANT_REQUESTED_OPLOCK = 801,
1574
1575 /// The operation did not complete successfully because it would cause an oplock to be broken.
1576 /// The caller has requested that existing oplocks not be broken.
1577 CANNOT_BREAK_OPLOCK = 802,
1578
1579 /// The handle with which this oplock was associated has been closed. The oplock is now broken.
1580 OPLOCK_HANDLE_CLOSED = 803,
1581
1582 /// The specified access control entry (ACE) does not contain a condition.
1583 NO_ACE_CONDITION = 804,
1584
1585 /// The specified access control entry (ACE) contains an invalid condition.
1586 INVALID_ACE_CONDITION = 805,
1587
1588 /// Access to the specified file handle has been revoked.
1589 FILE_HANDLE_REVOKED = 806,
1590
1591 /// An image file was mapped at a different address from the one specified in the image file but fixups will still be automatically performed on the image.
1592 IMAGE_AT_DIFFERENT_BASE = 807,
1593
1594 /// Access to the extended attribute was denied.
1595 EA_ACCESS_DENIED = 994,
1596
1597 /// The I/O operation has been aborted because of either a thread exit or an application request.
1598 OPERATION_ABORTED = 995,
1599
1600 /// Overlapped I/O event is not in a signaled state.
1601 IO_INCOMPLETE = 996,
1602
1603 /// Overlapped I/O operation is in progress.
1604 IO_PENDING = 997,
1605
1606 /// Invalid access to memory location.
1607 NOACCESS = 998,
1608
1609 /// Error performing inpage operation.
1610 SWAPERROR = 999,
1611
1612 /// Recursion too deep; the stack overflowed.
1613 STACK_OVERFLOW = 1001,
1614
1615 /// The window cannot act on the sent message.
1616 INVALID_MESSAGE = 1002,
1617
1618 /// Cannot complete this function.
1619 CAN_NOT_COMPLETE = 1003,
1620
1621 /// Invalid flags.
1622 INVALID_FLAGS = 1004,
1623
1624 /// The volume does not contain a recognized file system.
1625 /// Please make sure that all required file system drivers are loaded and that the volume is not corrupted.
1626 UNRECOGNIZED_VOLUME = 1005,
1627
1628 /// The volume for a file has been externally altered so that the opened file is no longer valid.
1629 FILE_INVALID = 1006,
1630
1631 /// The requested operation cannot be performed in full-screen mode.
1632 FULLSCREEN_MODE = 1007,
1633
1634 /// An attempt was made to reference a token that does not exist.
1635 NO_TOKEN = 1008,
1636
1637 /// The configuration registry database is corrupt.
1638 BADDB = 1009,
1639
1640 /// The configuration registry key is invalid.
1641 BADKEY = 1010,
1642
1643 /// The configuration registry key could not be opened.
1644 CANTOPEN = 1011,
1645
1646 /// The configuration registry key could not be read.
1647 CANTREAD = 1012,
1648
1649 /// The configuration registry key could not be written.
1650 CANTWRITE = 1013,
1651
1652 /// One of the files in the registry database had to be recovered by use of a log or alternate copy. The recovery was successful.
1653 REGISTRY_RECOVERED = 1014,
1654
1655 /// The registry is corrupted. The structure of one of the files containing registry data is corrupted, or the system's memory image of the file is corrupted, or the file could not be recovered because the alternate copy or log was absent or corrupted.
1656 REGISTRY_CORRUPT = 1015,
1657
1658 /// An I/O operation initiated by the registry failed unrecoverably.
1659 /// The registry could not read in, or write out, or flush, one of the files that contain the system's image of the registry.
1660 REGISTRY_IO_FAILED = 1016,
1661
1662 /// The system has attempted to load or restore a file into the registry, but the specified file is not in a registry file format.
1663 NOT_REGISTRY_FILE = 1017,
1664
1665 /// Illegal operation attempted on a registry key that has been marked for deletion.
1666 KEY_DELETED = 1018,
1667
1668 /// System could not allocate the required space in a registry log.
1669 NO_LOG_SPACE = 1019,
1670
1671 /// Cannot create a symbolic link in a registry key that already has subkeys or values.
1672 KEY_HAS_CHILDREN = 1020,
1673
1674 /// Cannot create a stable subkey under a volatile parent key.
1675 CHILD_MUST_BE_VOLATILE = 1021,
1676
1677 /// A notify change request is being completed and the information is not being returned in the caller's buffer.
1678 /// The caller now needs to enumerate the files to find the changes.
1679 NOTIFY_ENUM_DIR = 1022,
1680
1681 /// A stop control has been sent to a service that other running services are dependent on.
1682 DEPENDENT_SERVICES_RUNNING = 1051,
1683
1684 /// The requested control is not valid for this service.
1685 INVALID_SERVICE_CONTROL = 1052,
1686
1687 /// The service did not respond to the start or control request in a timely fashion.
1688 SERVICE_REQUEST_TIMEOUT = 1053,
1689
1690 /// A thread could not be created for the service.
1691 SERVICE_NO_THREAD = 1054,
1692
1693 /// The service database is locked.
1694 SERVICE_DATABASE_LOCKED = 1055,
1695
1696 /// An instance of the service is already running.
1697 SERVICE_ALREADY_RUNNING = 1056,
1698
1699 /// The account name is invalid or does not exist, or the password is invalid for the account name specified.
1700 INVALID_SERVICE_ACCOUNT = 1057,
1701
1702 /// The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
1703 SERVICE_DISABLED = 1058,
1704
1705 /// Circular service dependency was specified.
1706 CIRCULAR_DEPENDENCY = 1059,
1707
1708 /// The specified service does not exist as an installed service.
1709 SERVICE_DOES_NOT_EXIST = 1060,
1710
1711 /// The service cannot accept control messages at this time.
1712 SERVICE_CANNOT_ACCEPT_CTRL = 1061,
1713
1714 /// The service has not been started.
1715 SERVICE_NOT_ACTIVE = 1062,
1716
1717 /// The service process could not connect to the service controller.
1718 FAILED_SERVICE_CONTROLLER_CONNECT = 1063,
1719
1720 /// An exception occurred in the service when handling the control request.
1721 EXCEPTION_IN_SERVICE = 1064,
1722
1723 /// The database specified does not exist.
1724 DATABASE_DOES_NOT_EXIST = 1065,
1725
1726 /// The service has returned a service-specific error code.
1727 SERVICE_SPECIFIC_ERROR = 1066,
1728
1729 /// The process terminated unexpectedly.
1730 PROCESS_ABORTED = 1067,
1731
1732 /// The dependency service or group failed to start.
1733 SERVICE_DEPENDENCY_FAIL = 1068,
1734
1735 /// The service did not start due to a logon failure.
1736 SERVICE_LOGON_FAILED = 1069,
1737
1738 /// After starting, the service hung in a start-pending state.
1739 SERVICE_START_HANG = 1070,
1740
1741 /// The specified service database lock is invalid.
1742 INVALID_SERVICE_LOCK = 1071,
1743
1744 /// The specified service has been marked for deletion.
1745 SERVICE_MARKED_FOR_DELETE = 1072,
1746
1747 /// The specified service already exists.
1748 SERVICE_EXISTS = 1073,
1749
1750 /// The system is currently running with the last-known-good configuration.
1751 ALREADY_RUNNING_LKG = 1074,
1752
1753 /// The dependency service does not exist or has been marked for deletion.
1754 SERVICE_DEPENDENCY_DELETED = 1075,
1755
1756 /// The current boot has already been accepted for use as the last-known-good control set.
1757 BOOT_ALREADY_ACCEPTED = 1076,
1758
1759 /// No attempts to start the service have been made since the last boot.
1760 SERVICE_NEVER_STARTED = 1077,
1761
1762 /// The name is already in use as either a service name or a service display name.
1763 DUPLICATE_SERVICE_NAME = 1078,
1764
1765 /// The account specified for this service is different from the account specified for other services running in the same process.
1766 DIFFERENT_SERVICE_ACCOUNT = 1079,
1767
1768 /// Failure actions can only be set for Win32 services, not for drivers.
1769 CANNOT_DETECT_DRIVER_FAILURE = 1080,
1770
1771 /// This service runs in the same process as the service control manager.
1772 /// Therefore, the service control manager cannot take action if this service's process terminates unexpectedly.
1773 CANNOT_DETECT_PROCESS_ABORT = 1081,
1774
1775 /// No recovery program has been configured for this service.
1776 NO_RECOVERY_PROGRAM = 1082,
1777
1778 /// The executable program that this service is configured to run in does not implement the service.
1779 SERVICE_NOT_IN_EXE = 1083,
1780
1781 /// This service cannot be started in Safe Mode.
1782 NOT_SAFEBOOT_SERVICE = 1084,
1783
1784 /// The physical end of the tape has been reached.
1785 END_OF_MEDIA = 1100,
1786
1787 /// A tape access reached a filemark.
1788 FILEMARK_DETECTED = 1101,
1789
1790 /// The beginning of the tape or a partition was encountered.
1791 BEGINNING_OF_MEDIA = 1102,
1792
1793 /// A tape access reached the end of a set of files.
1794 SETMARK_DETECTED = 1103,
1795
1796 /// No more data is on the tape.
1797 NO_DATA_DETECTED = 1104,
1798
1799 /// Tape could not be partitioned.
1800 PARTITION_FAILURE = 1105,
1801
1802 /// When accessing a new tape of a multivolume partition, the current block size is incorrect.
1803 INVALID_BLOCK_LENGTH = 1106,
1804
1805 /// Tape partition information could not be found when loading a tape.
1806 DEVICE_NOT_PARTITIONED = 1107,
1807
1808 /// Unable to lock the media eject mechanism.
1809 UNABLE_TO_LOCK_MEDIA = 1108,
1810
1811 /// Unable to unload the media.
1812 UNABLE_TO_UNLOAD_MEDIA = 1109,
1813
1814 /// The media in the drive may have changed.
1815 MEDIA_CHANGED = 1110,
1816
1817 /// The I/O bus was reset.
1818 BUS_RESET = 1111,
1819
1820 /// No media in drive.
1821 NO_MEDIA_IN_DRIVE = 1112,
1822
1823 /// No mapping for the Unicode character exists in the target multi-byte code page.
1824 NO_UNICODE_TRANSLATION = 1113,
1825
1826 /// A dynamic link library (DLL) initialization routine failed.
1827 DLL_INIT_FAILED = 1114,
1828
1829 /// A system shutdown is in progress.
1830 SHUTDOWN_IN_PROGRESS = 1115,
1831
1832 /// Unable to abort the system shutdown because no shutdown was in progress.
1833 NO_SHUTDOWN_IN_PROGRESS = 1116,
1834
1835 /// The request could not be performed because of an I/O device error.
1836 IO_DEVICE = 1117,
1837
1838 /// No serial device was successfully initialized. The serial driver will unload.
1839 SERIAL_NO_DEVICE = 1118,
1840
1841 /// Unable to open a device that was sharing an interrupt request (IRQ) with other devices.
1842 /// At least one other device that uses that IRQ was already opened.
1843 IRQ_BUSY = 1119,
1844
1845 /// A serial I/O operation was completed by another write to the serial port. The IOCTL_SERIAL_XOFF_COUNTER reached zero.)
1846 MORE_WRITES = 1120,
1847
1848 /// A serial I/O operation completed because the timeout period expired.
1849 /// The IOCTL_SERIAL_XOFF_COUNTER did not reach zero.)
1850 COUNTER_TIMEOUT = 1121,
1851
1852 /// No ID address mark was found on the floppy disk.
1853 FLOPPY_ID_MARK_NOT_FOUND = 1122,
1854
1855 /// Mismatch between the floppy disk sector ID field and the floppy disk controller track address.
1856 FLOPPY_WRONG_CYLINDER = 1123,
1857
1858 /// The floppy disk controller reported an error that is not recognized by the floppy disk driver.
1859 FLOPPY_UNKNOWN_ERROR = 1124,
1860
1861 /// The floppy disk controller returned inconsistent results in its registers.
1862 FLOPPY_BAD_REGISTERS = 1125,
1863
1864 /// While accessing the hard disk, a recalibrate operation failed, even after retries.
1865 DISK_RECALIBRATE_FAILED = 1126,
1866
1867 /// While accessing the hard disk, a disk operation failed even after retries.
1868 DISK_OPERATION_FAILED = 1127,
1869
1870 /// While accessing the hard disk, a disk controller reset was needed, but even that failed.
1871 DISK_RESET_FAILED = 1128,
1872
1873 /// Physical end of tape encountered.
1874 EOM_OVERFLOW = 1129,
1875
1876 /// Not enough server storage is available to process this command.
1877 NOT_ENOUGH_SERVER_MEMORY = 1130,
1878
1879 /// A potential deadlock condition has been detected.
1880 POSSIBLE_DEADLOCK = 1131,
1881
1882 /// The base address or the file offset specified does not have the proper alignment.
1883 MAPPED_ALIGNMENT = 1132,
1884
1885 /// An attempt to change the system power state was vetoed by another application or driver.
1886 SET_POWER_STATE_VETOED = 1140,
1887
1888 /// The system BIOS failed an attempt to change the system power state.
1889 SET_POWER_STATE_FAILED = 1141,
1890
1891 /// An attempt was made to create more links on a file than the file system supports.
1892 TOO_MANY_LINKS = 1142,
1893
1894 /// The specified program requires a newer version of Windows.
1895 OLD_WIN_VERSION = 1150,
1896
1897 /// The specified program is not a Windows or MS-DOS program.
1898 APP_WRONG_OS = 1151,
1899
1900 /// Cannot start more than one instance of the specified program.
1901 SINGLE_INSTANCE_APP = 1152,
1902
1903 /// The specified program was written for an earlier version of Windows.
1904 RMODE_APP = 1153,
1905
1906 /// One of the library files needed to run this application is damaged.
1907 INVALID_DLL = 1154,
1908
1909 /// No application is associated with the specified file for this operation.
1910 NO_ASSOCIATION = 1155,
1911
1912 /// An error occurred in sending the command to the application.
1913 DDE_FAIL = 1156,
1914
1915 /// One of the library files needed to run this application cannot be found.
1916 DLL_NOT_FOUND = 1157,
1917
1918 /// The current process has used all of its system allowance of handles for Window Manager objects.
1919 NO_MORE_USER_HANDLES = 1158,
1920
1921 /// The message can be used only with synchronous operations.
1922 MESSAGE_SYNC_ONLY = 1159,
1923
1924 /// The indicated source element has no media.
1925 SOURCE_ELEMENT_EMPTY = 1160,
1926
1927 /// The indicated destination element already contains media.
1928 DESTINATION_ELEMENT_FULL = 1161,
1929
1930 /// The indicated element does not exist.
1931 ILLEGAL_ELEMENT_ADDRESS = 1162,
1932
1933 /// The indicated element is part of a magazine that is not present.
1934 MAGAZINE_NOT_PRESENT = 1163,
1935
1936 /// The indicated device requires reinitialization due to hardware errors.
1937 DEVICE_REINITIALIZATION_NEEDED = 1164,
1938
1939 /// The device has indicated that cleaning is required before further operations are attempted.
1940 DEVICE_REQUIRES_CLEANING = 1165,
1941
1942 /// The device has indicated that its door is open.
1943 DEVICE_DOOR_OPEN = 1166,
1944
1945 /// The device is not connected.
1946 DEVICE_NOT_CONNECTED = 1167,
1947
1948 /// Element not found.
1949 NOT_FOUND = 1168,
1950
1951 /// There was no match for the specified key in the index.
1952 NO_MATCH = 1169,
1953
1954 /// The property set specified does not exist on the object.
1955 SET_NOT_FOUND = 1170,
1956
1957 /// The point passed to GetMouseMovePoints is not in the buffer.
1958 POINT_NOT_FOUND = 1171,
1959
1960 /// The tracking (workstation) service is not running.
1961 NO_TRACKING_SERVICE = 1172,
1962
1963 /// The Volume ID could not be found.
1964 NO_VOLUME_ID = 1173,
1965
1966 /// Unable to remove the file to be replaced.
1967 UNABLE_TO_REMOVE_REPLACED = 1175,
1968
1969 /// Unable to move the replacement file to the file to be replaced.
1970 /// The file to be replaced has retained its original name.
1971 UNABLE_TO_MOVE_REPLACEMENT = 1176,
1972
1973 /// Unable to move the replacement file to the file to be replaced.
1974 /// The file to be replaced has been renamed using the backup name.
1975 UNABLE_TO_MOVE_REPLACEMENT_2 = 1177,
1976
1977 /// The volume change journal is being deleted.
1978 JOURNAL_DELETE_IN_PROGRESS = 1178,
1979
1980 /// The volume change journal is not active.
1981 JOURNAL_NOT_ACTIVE = 1179,
1982
1983 /// A file was found, but it may not be the correct file.
1984 POTENTIAL_FILE_FOUND = 1180,
1985
1986 /// The journal entry has been deleted from the journal.
1987 JOURNAL_ENTRY_DELETED = 1181,
1988
1989 /// A system shutdown has already been scheduled.
1990 SHUTDOWN_IS_SCHEDULED = 1190,
1991
1992 /// The system shutdown cannot be initiated because there are other users logged on to the computer.
1993 SHUTDOWN_USERS_LOGGED_ON = 1191,
1994
1995 /// The specified device name is invalid.
1996 BAD_DEVICE = 1200,
1997
1998 /// The device is not currently connected but it is a remembered connection.
1999 CONNECTION_UNAVAIL = 1201,
2000
2001 /// The local device name has a remembered connection to another network resource.
2002 DEVICE_ALREADY_REMEMBERED = 1202,
2003
2004 /// The network path was either typed incorrectly, does not exist, or the network provider is not currently available.
2005 /// Please try retyping the path or contact your network administrator.
2006 NO_NET_OR_BAD_PATH = 1203,
2007
2008 /// The specified network provider name is invalid.
2009 BAD_PROVIDER = 1204,
2010
2011 /// Unable to open the network connection profile.
2012 CANNOT_OPEN_PROFILE = 1205,
2013
2014 /// The network connection profile is corrupted.
2015 BAD_PROFILE = 1206,
2016
2017 /// Cannot enumerate a noncontainer.
2018 NOT_CONTAINER = 1207,
2019
2020 /// An extended error has occurred.
2021 EXTENDED_ERROR = 1208,
2022
2023 /// The format of the specified group name is invalid.
2024 INVALID_GROUPNAME = 1209,
2025
2026 /// The format of the specified computer name is invalid.
2027 INVALID_COMPUTERNAME = 1210,
2028
2029 /// The format of the specified event name is invalid.
2030 INVALID_EVENTNAME = 1211,
2031
2032 /// The format of the specified domain name is invalid.
2033 INVALID_DOMAINNAME = 1212,
2034
2035 /// The format of the specified service name is invalid.
2036 INVALID_SERVICENAME = 1213,
2037
2038 /// The format of the specified network name is invalid.
2039 INVALID_NETNAME = 1214,
2040
2041 /// The format of the specified share name is invalid.
2042 INVALID_SHARENAME = 1215,
2043
2044 /// The format of the specified password is invalid.
2045 INVALID_PASSWORDNAME = 1216,
2046
2047 /// The format of the specified message name is invalid.
2048 INVALID_MESSAGENAME = 1217,
2049
2050 /// The format of the specified message destination is invalid.
2051 INVALID_MESSAGEDEST = 1218,
2052
2053 /// Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed.
2054 /// Disconnect all previous connections to the server or shared resource and try again.
2055 SESSION_CREDENTIAL_CONFLICT = 1219,
2056
2057 /// An attempt was made to establish a session to a network server, but there are already too many sessions established to that server.
2058 REMOTE_SESSION_LIMIT_EXCEEDED = 1220,
2059
2060 /// The workgroup or domain name is already in use by another computer on the network.
2061 DUP_DOMAINNAME = 1221,
2062
2063 /// The network is not present or not started.
2064 NO_NETWORK = 1222,
2065
2066 /// The operation was canceled by the user.
2067 CANCELLED = 1223,
2068
2069 /// The requested operation cannot be performed on a file with a user-mapped section open.
2070 USER_MAPPED_FILE = 1224,
2071
2072 /// The remote computer refused the network connection.
2073 CONNECTION_REFUSED = 1225,
2074
2075 /// The network connection was gracefully closed.
2076 GRACEFUL_DISCONNECT = 1226,
2077
2078 /// The network transport endpoint already has an address associated with it.
2079 ADDRESS_ALREADY_ASSOCIATED = 1227,
2080
2081 /// An address has not yet been associated with the network endpoint.
2082 ADDRESS_NOT_ASSOCIATED = 1228,
2083
2084 /// An operation was attempted on a nonexistent network connection.
2085 CONNECTION_INVALID = 1229,
2086
2087 /// An invalid operation was attempted on an active network connection.
2088 CONNECTION_ACTIVE = 1230,
2089
2090 /// The network location cannot be reached.
2091 /// For information about network troubleshooting, see Windows Help.
2092 NETWORK_UNREACHABLE = 1231,
2093
2094 /// The network location cannot be reached.
2095 /// For information about network troubleshooting, see Windows Help.
2096 HOST_UNREACHABLE = 1232,
2097
2098 /// The network location cannot be reached.
2099 /// For information about network troubleshooting, see Windows Help.
2100 PROTOCOL_UNREACHABLE = 1233,
2101
2102 /// No service is operating at the destination network endpoint on the remote system.
2103 PORT_UNREACHABLE = 1234,
2104
2105 /// The request was aborted.
2106 REQUEST_ABORTED = 1235,
2107
2108 /// The network connection was aborted by the local system.
2109 CONNECTION_ABORTED = 1236,
2110
2111 /// The operation could not be completed. A retry should be performed.
2112 RETRY = 1237,
2113
2114 /// A connection to the server could not be made because the limit on the number of concurrent connections for this account has been reached.
2115 CONNECTION_COUNT_LIMIT = 1238,
2116
2117 /// Attempting to log in during an unauthorized time of day for this account.
2118 LOGIN_TIME_RESTRICTION = 1239,
2119
2120 /// The account is not authorized to log in from this station.
2121 LOGIN_WKSTA_RESTRICTION = 1240,
2122
2123 /// The network address could not be used for the operation requested.
2124 INCORRECT_ADDRESS = 1241,
2125
2126 /// The service is already registered.
2127 ALREADY_REGISTERED = 1242,
2128
2129 /// The specified service does not exist.
2130 SERVICE_NOT_FOUND = 1243,
2131
2132 /// The operation being requested was not performed because the user has not been authenticated.
2133 NOT_AUTHENTICATED = 1244,
2134
2135 /// The operation being requested was not performed because the user has not logged on to the network. The specified service does not exist.
2136 NOT_LOGGED_ON = 1245,
2137
2138 /// Continue with work in progress.
2139 CONTINUE = 1246,
2140
2141 /// An attempt was made to perform an initialization operation when initialization has already been completed.
2142 ALREADY_INITIALIZED = 1247,
2143
2144 /// No more local devices.
2145 NO_MORE_DEVICES = 1248,
2146
2147 /// The specified site does not exist.
2148 NO_SUCH_SITE = 1249,
2149
2150 /// A domain controller with the specified name already exists.
2151 DOMAIN_CONTROLLER_EXISTS = 1250,
2152
2153 /// This operation is supported only when you are connected to the server.
2154 ONLY_IF_CONNECTED = 1251,
2155
2156 /// The group policy framework should call the extension even if there are no changes.
2157 OVERRIDE_NOCHANGES = 1252,
2158
2159 /// The specified user does not have a valid profile.
2160 BAD_USER_PROFILE = 1253,
2161
2162 /// This operation is not supported on a computer running Windows Server 2003 for Small Business Server.
2163 NOT_SUPPORTED_ON_SBS = 1254,
2164
2165 /// The server machine is shutting down.
2166 SERVER_SHUTDOWN_IN_PROGRESS = 1255,
2167
2168 /// The remote system is not available.
2169 /// For information about network troubleshooting, see Windows Help.
2170 HOST_DOWN = 1256,
2171
2172 /// The security identifier provided is not from an account domain.
2173 NON_ACCOUNT_SID = 1257,
2174
2175 /// The security identifier provided does not have a domain component.
2176 NON_DOMAIN_SID = 1258,
2177
2178 /// AppHelp dialog canceled thus preventing the application from starting.
2179 APPHELP_BLOCK = 1259,
2180
2181 /// This program is blocked by group policy.
2182 /// For more information, contact your system administrator.
2183 ACCESS_DISABLED_BY_POLICY = 1260,
2184
2185 /// A program attempt to use an invalid register value.
2186 /// Normally caused by an uninitialized register. This error is Itanium specific.
2187 REG_NAT_CONSUMPTION = 1261,
2188
2189 /// The share is currently offline or does not exist.
2190 CSCSHARE_OFFLINE = 1262,
2191
2192 /// The Kerberos protocol encountered an error while validating the KDC certificate during smartcard logon.
2193 /// There is more information in the system event log.
2194 PKINIT_FAILURE = 1263,
2195
2196 /// The Kerberos protocol encountered an error while attempting to utilize the smartcard subsystem.
2197 SMARTCARD_SUBSYSTEM_FAILURE = 1264,
2198
2199 /// The system cannot contact a domain controller to service the authentication request. Please try again later.
2200 DOWNGRADE_DETECTED = 1265,
2201
2202 /// The machine is locked and cannot be shut down without the force option.
2203 MACHINE_LOCKED = 1271,
2204
2205 /// An application-defined callback gave invalid data when called.
2206 CALLBACK_SUPPLIED_INVALID_DATA = 1273,
2207
2208 /// The group policy framework should call the extension in the synchronous foreground policy refresh.
2209 SYNC_FOREGROUND_REFRESH_REQUIRED = 1274,
2210
2211 /// This driver has been blocked from loading.
2212 DRIVER_BLOCKED = 1275,
2213
2214 /// A dynamic link library (DLL) referenced a module that was neither a DLL nor the process's executable image.
2215 INVALID_IMPORT_OF_NON_DLL = 1276,
2216
2217 /// Windows cannot open this program since it has been disabled.
2218 ACCESS_DISABLED_WEBBLADE = 1277,
2219
2220 /// Windows cannot open this program because the license enforcement system has been tampered with or become corrupted.
2221 ACCESS_DISABLED_WEBBLADE_TAMPER = 1278,
2222
2223 /// A transaction recover failed.
2224 RECOVERY_FAILURE = 1279,
2225
2226 /// The current thread has already been converted to a fiber.
2227 ALREADY_FIBER = 1280,
2228
2229 /// The current thread has already been converted from a fiber.
2230 ALREADY_THREAD = 1281,
2231
2232 /// The system detected an overrun of a stack-based buffer in this application.
2233 /// This overrun could potentially allow a malicious user to gain control of this application.
2234 STACK_BUFFER_OVERRUN = 1282,
2235
2236 /// Data present in one of the parameters is more than the function can operate on.
2237 PARAMETER_QUOTA_EXCEEDED = 1283,
2238
2239 /// An attempt to do an operation on a debug object failed because the object is in the process of being deleted.
2240 DEBUGGER_INACTIVE = 1284,
2241
2242 /// An attempt to delay-load a .dll or get a function address in a delay-loaded .dll failed.
2243 DELAY_LOAD_FAILED = 1285,
2244
2245 /// %1 is a 16-bit application. You do not have permissions to execute 16-bit applications.
2246 /// Check your permissions with your system administrator.
2247 VDM_DISALLOWED = 1286,
2248
2249 /// Insufficient information exists to identify the cause of failure.
2250 UNIDENTIFIED_ERROR = 1287,
2251
2252 /// The parameter passed to a C runtime function is incorrect.
2253 INVALID_CRUNTIME_PARAMETER = 1288,
2254
2255 /// The operation occurred beyond the valid data length of the file.
2256 BEYOND_VDL = 1289,
2257
2258 /// The service start failed since one or more services in the same process have an incompatible service SID type setting.
2259 /// A service with restricted service SID type can only coexist in the same process with other services with a restricted SID type.
2260 /// If the service SID type for this service was just configured, the hosting process must be restarted in order to start this service.
2261 /// On Windows Server 2003 and Windows XP, an unrestricted service cannot coexist in the same process with other services.
2262 /// The service with the unrestricted service SID type must be moved to an owned process in order to start this service.
2263 INCOMPATIBLE_SERVICE_SID_TYPE = 1290,
2264
2265 /// The process hosting the driver for this device has been terminated.
2266 DRIVER_PROCESS_TERMINATED = 1291,
2267
2268 /// An operation attempted to exceed an implementation-defined limit.
2269 IMPLEMENTATION_LIMIT = 1292,
2270
2271 /// Either the target process, or the target thread's containing process, is a protected process.
2272 PROCESS_IS_PROTECTED = 1293,
2273
2274 /// The service notification client is lagging too far behind the current state of services in the machine.
2275 SERVICE_NOTIFY_CLIENT_LAGGING = 1294,
2276
2277 /// The requested file operation failed because the storage quota was exceeded.
2278 /// To free up disk space, move files to a different location or delete unnecessary files.
2279 /// For more information, contact your system administrator.
2280 DISK_QUOTA_EXCEEDED = 1295,
2281
2282 /// The requested file operation failed because the storage policy blocks that type of file.
2283 /// For more information, contact your system administrator.
2284 CONTENT_BLOCKED = 1296,
2285
2286 /// A privilege that the service requires to function properly does not exist in the service account configuration.
2287 /// You may use the Services Microsoft Management Console (MMC) snap-in (services.msc) and the Local Security Settings MMC snap-in (secpol.msc) to view the service configuration and the account configuration.
2288 INCOMPATIBLE_SERVICE_PRIVILEGE = 1297,
2289
2290 /// A thread involved in this operation appears to be unresponsive.
2291 APP_HANG = 1298,
2292
2293 /// Indicates a particular Security ID may not be assigned as the label of an object.
2294 INVALID_LABEL = 1299,
2295
2296 /// Not all privileges or groups referenced are assigned to the caller.
2297 NOT_ALL_ASSIGNED = 1300,
2298
2299 /// Some mapping between account names and security IDs was not done.
2300 SOME_NOT_MAPPED = 1301,
2301
2302 /// No system quota limits are specifically set for this account.
2303 NO_QUOTAS_FOR_ACCOUNT = 1302,
2304
2305 /// No encryption key is available. A well-known encryption key was returned.
2306 LOCAL_USER_SESSION_KEY = 1303,
2307
2308 /// The password is too complex to be converted to a LAN Manager password.
2309 /// The LAN Manager password returned is a NULL string.
2310 NULL_LM_PASSWORD = 1304,
2311
2312 /// The revision level is unknown.
2313 UNKNOWN_REVISION = 1305,
2314
2315 /// Indicates two revision levels are incompatible.
2316 REVISION_MISMATCH = 1306,
2317
2318 /// This security ID may not be assigned as the owner of this object.
2319 INVALID_OWNER = 1307,
2320
2321 /// This security ID may not be assigned as the primary group of an object.
2322 INVALID_PRIMARY_GROUP = 1308,
2323
2324 /// An attempt has been made to operate on an impersonation token by a thread that is not currently impersonating a client.
2325 NO_IMPERSONATION_TOKEN = 1309,
2326
2327 /// The group may not be disabled.
2328 CANT_DISABLE_MANDATORY = 1310,
2329
2330 /// There are currently no logon servers available to service the logon request.
2331 NO_LOGON_SERVERS = 1311,
2332
2333 /// A specified logon session does not exist. It may already have been terminated.
2334 NO_SUCH_LOGON_SESSION = 1312,
2335
2336 /// A specified privilege does not exist.
2337 NO_SUCH_PRIVILEGE = 1313,
2338
2339 /// A required privilege is not held by the client.
2340 PRIVILEGE_NOT_HELD = 1314,
2341
2342 /// The name provided is not a properly formed account name.
2343 INVALID_ACCOUNT_NAME = 1315,
2344
2345 /// The specified account already exists.
2346 USER_EXISTS = 1316,
2347
2348 /// The specified account does not exist.
2349 NO_SUCH_USER = 1317,
2350
2351 /// The specified group already exists.
2352 GROUP_EXISTS = 1318,
2353
2354 /// The specified group does not exist.
2355 NO_SUCH_GROUP = 1319,
2356
2357 /// Either the specified user account is already a member of the specified group, or the specified group cannot be deleted because it contains a member.
2358 MEMBER_IN_GROUP = 1320,
2359
2360 /// The specified user account is not a member of the specified group account.
2361 MEMBER_NOT_IN_GROUP = 1321,
2362
2363 /// This operation is disallowed as it could result in an administration account being disabled, deleted or unable to log on.
2364 LAST_ADMIN = 1322,
2365
2366 /// Unable to update the password. The value provided as the current password is incorrect.
2367 WRONG_PASSWORD = 1323,
2368
2369 /// Unable to update the password. The value provided for the new password contains values that are not allowed in passwords.
2370 ILL_FORMED_PASSWORD = 1324,
2371
2372 /// Unable to update the password. The value provided for the new password does not meet the length, complexity, or history requirements of the domain.
2373 PASSWORD_RESTRICTION = 1325,
2374
2375 /// The user name or password is incorrect.
2376 LOGON_FAILURE = 1326,
2377
2378 /// Account restrictions are preventing this user from signing in.
2379 /// For example: blank passwords aren't allowed, sign-in times are limited, or a policy restriction has been enforced.
2380 ACCOUNT_RESTRICTION = 1327,
2381
2382 /// Your account has time restrictions that keep you from signing in right now.
2383 INVALID_LOGON_HOURS = 1328,
2384
2385 /// This user isn't allowed to sign in to this computer.
2386 INVALID_WORKSTATION = 1329,
2387
2388 /// The password for this account has expired.
2389 PASSWORD_EXPIRED = 1330,
2390
2391 /// This user can't sign in because this account is currently disabled.
2392 ACCOUNT_DISABLED = 1331,
2393
2394 /// No mapping between account names and security IDs was done.
2395 NONE_MAPPED = 1332,
2396
2397 /// Too many local user identifiers (LUIDs) were requested at one time.
2398 TOO_MANY_LUIDS_REQUESTED = 1333,
2399
2400 /// No more local user identifiers (LUIDs) are available.
2401 LUIDS_EXHAUSTED = 1334,
2402
2403 /// The subauthority part of a security ID is invalid for this particular use.
2404 INVALID_SUB_AUTHORITY = 1335,
2405
2406 /// The access control list (ACL) structure is invalid.
2407 INVALID_ACL = 1336,
2408
2409 /// The security ID structure is invalid.
2410 INVALID_SID = 1337,
2411
2412 /// The security descriptor structure is invalid.
2413 INVALID_SECURITY_DESCR = 1338,
2414
2415 /// The inherited access control list (ACL) or access control entry (ACE) could not be built.
2416 BAD_INHERITANCE_ACL = 1340,
2417
2418 /// The server is currently disabled.
2419 SERVER_DISABLED = 1341,
2420
2421 /// The server is currently enabled.
2422 SERVER_NOT_DISABLED = 1342,
2423
2424 /// The value provided was an invalid value for an identifier authority.
2425 INVALID_ID_AUTHORITY = 1343,
2426
2427 /// No more memory is available for security information updates.
2428 ALLOTTED_SPACE_EXCEEDED = 1344,
2429
2430 /// The specified attributes are invalid, or incompatible with the attributes for the group as a whole.
2431 INVALID_GROUP_ATTRIBUTES = 1345,
2432
2433 /// Either a required impersonation level was not provided, or the provided impersonation level is invalid.
2434 BAD_IMPERSONATION_LEVEL = 1346,
2435
2436 /// Cannot open an anonymous level security token.
2437 CANT_OPEN_ANONYMOUS = 1347,
2438
2439 /// The validation information class requested was invalid.
2440 BAD_VALIDATION_CLASS = 1348,
2441
2442 /// The type of the token is inappropriate for its attempted use.
2443 BAD_TOKEN_TYPE = 1349,
2444
2445 /// Unable to perform a security operation on an object that has no associated security.
2446 NO_SECURITY_ON_OBJECT = 1350,
2447
2448 /// Configuration information could not be read from the domain controller, either because the machine is unavailable, or access has been denied.
2449 CANT_ACCESS_DOMAIN_INFO = 1351,
2450
2451 /// The security account manager (SAM) or local security authority (LSA) server was in the wrong state to perform the security operation.
2452 INVALID_SERVER_STATE = 1352,
2453
2454 /// The domain was in the wrong state to perform the security operation.
2455 INVALID_DOMAIN_STATE = 1353,
2456
2457 /// This operation is only allowed for the Primary Domain Controller of the domain.
2458 INVALID_DOMAIN_ROLE = 1354,
2459
2460 /// The specified domain either does not exist or could not be contacted.
2461 NO_SUCH_DOMAIN = 1355,
2462
2463 /// The specified domain already exists.
2464 DOMAIN_EXISTS = 1356,
2465
2466 /// An attempt was made to exceed the limit on the number of domains per server.
2467 DOMAIN_LIMIT_EXCEEDED = 1357,
2468
2469 /// Unable to complete the requested operation because of either a catastrophic media failure or a data structure corruption on the disk.
2470 INTERNAL_DB_CORRUPTION = 1358,
2471
2472 /// An internal error occurred.
2473 INTERNAL_ERROR = 1359,
2474
2475 /// Generic access types were contained in an access mask which should already be mapped to nongeneric types.
2476 GENERIC_NOT_MAPPED = 1360,
2477
2478 /// A security descriptor is not in the right format (absolute or self-relative).
2479 BAD_DESCRIPTOR_FORMAT = 1361,
2480
2481 /// The requested action is restricted for use by logon processes only.
2482 /// The calling process has not registered as a logon process.
2483 NOT_LOGON_PROCESS = 1362,
2484
2485 /// Cannot start a new logon session with an ID that is already in use.
2486 LOGON_SESSION_EXISTS = 1363,
2487
2488 /// A specified authentication package is unknown.
2489 NO_SUCH_PACKAGE = 1364,
2490
2491 /// The logon session is not in a state that is consistent with the requested operation.
2492 BAD_LOGON_SESSION_STATE = 1365,
2493
2494 /// The logon session ID is already in use.
2495 LOGON_SESSION_COLLISION = 1366,
2496
2497 /// A logon request contained an invalid logon type value.
2498 INVALID_LOGON_TYPE = 1367,
2499
2500 /// Unable to impersonate using a named pipe until data has been read from that pipe.
2501 CANNOT_IMPERSONATE = 1368,
2502
2503 /// The transaction state of a registry subtree is incompatible with the requested operation.
2504 RXACT_INVALID_STATE = 1369,
2505
2506 /// An internal security database corruption has been encountered.
2507 RXACT_COMMIT_FAILURE = 1370,
2508
2509 /// Cannot perform this operation on built-in accounts.
2510 SPECIAL_ACCOUNT = 1371,
2511
2512 /// Cannot perform this operation on this built-in special group.
2513 SPECIAL_GROUP = 1372,
2514
2515 /// Cannot perform this operation on this built-in special user.
2516 SPECIAL_USER = 1373,
2517
2518 /// The user cannot be removed from a group because the group is currently the user's primary group.
2519 MEMBERS_PRIMARY_GROUP = 1374,
2520
2521 /// The token is already in use as a primary token.
2522 TOKEN_ALREADY_IN_USE = 1375,
2523
2524 /// The specified local group does not exist.
2525 NO_SUCH_ALIAS = 1376,
2526
2527 /// The specified account name is not a member of the group.
2528 MEMBER_NOT_IN_ALIAS = 1377,
2529
2530 /// The specified account name is already a member of the group.
2531 MEMBER_IN_ALIAS = 1378,
2532
2533 /// The specified local group already exists.
2534 ALIAS_EXISTS = 1379,
2535
2536 /// Logon failure: the user has not been granted the requested logon type at this computer.
2537 LOGON_NOT_GRANTED = 1380,
2538
2539 /// The maximum number of secrets that may be stored in a single system has been exceeded.
2540 TOO_MANY_SECRETS = 1381,
2541
2542 /// The length of a secret exceeds the maximum length allowed.
2543 SECRET_TOO_LONG = 1382,
2544
2545 /// The local security authority database contains an internal inconsistency.
2546 INTERNAL_DB_ERROR = 1383,
2547
2548 /// During a logon attempt, the user's security context accumulated too many security IDs.
2549 TOO_MANY_CONTEXT_IDS = 1384,
2550
2551 /// Logon failure: the user has not been granted the requested logon type at this computer.
2552 LOGON_TYPE_NOT_GRANTED = 1385,
2553
2554 /// A cross-encrypted password is necessary to change a user password.
2555 NT_CROSS_ENCRYPTION_REQUIRED = 1386,
2556
2557 /// A member could not be added to or removed from the local group because the member does not exist.
2558 NO_SUCH_MEMBER = 1387,
2559
2560 /// A new member could not be added to a local group because the member has the wrong account type.
2561 INVALID_MEMBER = 1388,
2562
2563 /// Too many security IDs have been specified.
2564 TOO_MANY_SIDS = 1389,
2565
2566 /// A cross-encrypted password is necessary to change this user password.
2567 LM_CROSS_ENCRYPTION_REQUIRED = 1390,
2568
2569 /// Indicates an ACL contains no inheritable components.
2570 NO_INHERITANCE = 1391,
2571
2572 /// The file or directory is corrupted and unreadable.
2573 FILE_CORRUPT = 1392,
2574
2575 /// The disk structure is corrupted and unreadable.
2576 DISK_CORRUPT = 1393,
2577
2578 /// There is no user session key for the specified logon session.
2579 NO_USER_SESSION_KEY = 1394,
2580
2581 /// The service being accessed is licensed for a particular number of connections.
2582 /// No more connections can be made to the service at this time because there are already as many connections as the service can accept.
2583 LICENSE_QUOTA_EXCEEDED = 1395,
2584
2585 /// The target account name is incorrect.
2586 WRONG_TARGET_NAME = 1396,
2587
2588 /// Mutual Authentication failed. The server's password is out of date at the domain controller.
2589 MUTUAL_AUTH_FAILED = 1397,
2590
2591 /// There is a time and/or date difference between the client and server.
2592 TIME_SKEW = 1398,
2593
2594 /// This operation cannot be performed on the current domain.
2595 CURRENT_DOMAIN_NOT_ALLOWED = 1399,
2596
2597 /// Invalid window handle.
2598 INVALID_WINDOW_HANDLE = 1400,
2599
2600 /// Invalid menu handle.
2601 INVALID_MENU_HANDLE = 1401,
2602
2603 /// Invalid cursor handle.
2604 INVALID_CURSOR_HANDLE = 1402,
2605
2606 /// Invalid accelerator table handle.
2607 INVALID_ACCEL_HANDLE = 1403,
2608
2609 /// Invalid hook handle.
2610 INVALID_HOOK_HANDLE = 1404,
2611
2612 /// Invalid handle to a multiple-window position structure.
2613 INVALID_DWP_HANDLE = 1405,
2614
2615 /// Cannot create a top-level child window.
2616 TLW_WITH_WSCHILD = 1406,
2617
2618 /// Cannot find window class.
2619 CANNOT_FIND_WND_CLASS = 1407,
2620
2621 /// Invalid window; it belongs to other thread.
2622 WINDOW_OF_OTHER_THREAD = 1408,
2623
2624 /// Hot key is already registered.
2625 HOTKEY_ALREADY_REGISTERED = 1409,
2626
2627 /// Class already exists.
2628 CLASS_ALREADY_EXISTS = 1410,
2629
2630 /// Class does not exist.
2631 CLASS_DOES_NOT_EXIST = 1411,
2632
2633 /// Class still has open windows.
2634 CLASS_HAS_WINDOWS = 1412,
2635
2636 /// Invalid index.
2637 INVALID_INDEX = 1413,
2638
2639 /// Invalid icon handle.
2640 INVALID_ICON_HANDLE = 1414,
2641
2642 /// Using private DIALOG window words.
2643 PRIVATE_DIALOG_INDEX = 1415,
2644
2645 /// The list box identifier was not found.
2646 LISTBOX_ID_NOT_FOUND = 1416,
2647
2648 /// No wildcards were found.
2649 NO_WILDCARD_CHARACTERS = 1417,
2650
2651 /// Thread does not have a clipboard open.
2652 CLIPBOARD_NOT_OPEN = 1418,
2653
2654 /// Hot key is not registered.
2655 HOTKEY_NOT_REGISTERED = 1419,
2656
2657 /// The window is not a valid dialog window.
2658 WINDOW_NOT_DIALOG = 1420,
2659
2660 /// Control ID not found.
2661 CONTROL_ID_NOT_FOUND = 1421,
2662
2663 /// Invalid message for a combo box because it does not have an edit control.
2664 INVALID_COMBOBOX_MESSAGE = 1422,
2665
2666 /// The window is not a combo box.
2667 WINDOW_NOT_COMBOBOX = 1423,
2668
2669 /// Height must be less than 256.
2670 INVALID_EDIT_HEIGHT = 1424,
2671
2672 /// Invalid device context (DC) handle.
2673 DC_NOT_FOUND = 1425,
2674
2675 /// Invalid hook procedure type.
2676 INVALID_HOOK_FILTER = 1426,
2677
2678 /// Invalid hook procedure.
2679 INVALID_FILTER_PROC = 1427,
2680
2681 /// Cannot set nonlocal hook without a module handle.
2682 HOOK_NEEDS_HMOD = 1428,
2683
2684 /// This hook procedure can only be set globally.
2685 GLOBAL_ONLY_HOOK = 1429,
2686
2687 /// The journal hook procedure is already installed.
2688 JOURNAL_HOOK_SET = 1430,
2689
2690 /// The hook procedure is not installed.
2691 HOOK_NOT_INSTALLED = 1431,
2692
2693 /// Invalid message for single-selection list box.
2694 INVALID_LB_MESSAGE = 1432,
2695
2696 /// LB_SETCOUNT sent to non-lazy list box.
2697 SETCOUNT_ON_BAD_LB = 1433,
2698
2699 /// This list box does not support tab stops.
2700 LB_WITHOUT_TABSTOPS = 1434,
2701
2702 /// Cannot destroy object created by another thread.
2703 DESTROY_OBJECT_OF_OTHER_THREAD = 1435,
2704
2705 /// Child windows cannot have menus.
2706 CHILD_WINDOW_MENU = 1436,
2707
2708 /// The window does not have a system menu.
2709 NO_SYSTEM_MENU = 1437,
2710
2711 /// Invalid message box style.
2712 INVALID_MSGBOX_STYLE = 1438,
2713
2714 /// Invalid system-wide (SPI_*) parameter.
2715 INVALID_SPI_VALUE = 1439,
2716
2717 /// Screen already locked.
2718 SCREEN_ALREADY_LOCKED = 1440,
2719
2720 /// All handles to windows in a multiple-window position structure must have the same parent.
2721 HWNDS_HAVE_DIFF_PARENT = 1441,
2722
2723 /// The window is not a child window.
2724 NOT_CHILD_WINDOW = 1442,
2725
2726 /// Invalid GW_* command.
2727 INVALID_GW_COMMAND = 1443,
2728
2729 /// Invalid thread identifier.
2730 INVALID_THREAD_ID = 1444,
2731
2732 /// Cannot process a message from a window that is not a multiple document interface (MDI) window.
2733 NON_MDICHILD_WINDOW = 1445,
2734
2735 /// Popup menu already active.
2736 POPUP_ALREADY_ACTIVE = 1446,
2737
2738 /// The window does not have scroll bars.
2739 NO_SCROLLBARS = 1447,
2740
2741 /// Scroll bar range cannot be greater than MAXLONG.
2742 INVALID_SCROLLBAR_RANGE = 1448,
2743
2744 /// Cannot show or remove the window in the way specified.
2745 INVALID_SHOWWIN_COMMAND = 1449,
2746
2747 /// Insufficient system resources exist to complete the requested service.
2748 NO_SYSTEM_RESOURCES = 1450,
2749
2750 /// Insufficient system resources exist to complete the requested service.
2751 NONPAGED_SYSTEM_RESOURCES = 1451,
2752
2753 /// Insufficient system resources exist to complete the requested service.
2754 PAGED_SYSTEM_RESOURCES = 1452,
2755
2756 /// Insufficient quota to complete the requested service.
2757 WORKING_SET_QUOTA = 1453,
2758
2759 /// Insufficient quota to complete the requested service.
2760 PAGEFILE_QUOTA = 1454,
2761
2762 /// The paging file is too small for this operation to complete.
2763 COMMITMENT_LIMIT = 1455,
2764
2765 /// A menu item was not found.
2766 MENU_ITEM_NOT_FOUND = 1456,
2767
2768 /// Invalid keyboard layout handle.
2769 INVALID_KEYBOARD_HANDLE = 1457,
2770
2771 /// Hook type not allowed.
2772 HOOK_TYPE_NOT_ALLOWED = 1458,
2773
2774 /// This operation requires an interactive window station.
2775 REQUIRES_INTERACTIVE_WINDOWSTATION = 1459,
2776
2777 /// This operation returned because the timeout period expired.
2778 TIMEOUT = 1460,
2779
2780 /// Invalid monitor handle.
2781 INVALID_MONITOR_HANDLE = 1461,
2782
2783 /// Incorrect size argument.
2784 INCORRECT_SIZE = 1462,
2785
2786 /// The symbolic link cannot be followed because its type is disabled.
2787 SYMLINK_CLASS_DISABLED = 1463,
2788
2789 /// This application does not support the current operation on symbolic links.
2790 SYMLINK_NOT_SUPPORTED = 1464,
2791
2792 /// Windows was unable to parse the requested XML data.
2793 XML_PARSE_ERROR = 1465,
2794
2795 /// An error was encountered while processing an XML digital signature.
2796 XMLDSIG_ERROR = 1466,
2797
2798 /// This application must be restarted.
2799 RESTART_APPLICATION = 1467,
2800
2801 /// The caller made the connection request in the wrong routing compartment.
2802 WRONG_COMPARTMENT = 1468,
2803
2804 /// There was an AuthIP failure when attempting to connect to the remote host.
2805 AUTHIP_FAILURE = 1469,
2806
2807 /// Insufficient NVRAM resources exist to complete the requested service. A reboot might be required.
2808 NO_NVRAM_RESOURCES = 1470,
2809
2810 /// Unable to finish the requested operation because the specified process is not a GUI process.
2811 NOT_GUI_PROCESS = 1471,
2812
2813 /// The event log file is corrupted.
2814 EVENTLOG_FILE_CORRUPT = 1500,
2815
2816 /// No event log file could be opened, so the event logging service did not start.
2817 EVENTLOG_CANT_START = 1501,
2818
2819 /// The event log file is full.
2820 LOG_FILE_FULL = 1502,
2821
2822 /// The event log file has changed between read operations.
2823 EVENTLOG_FILE_CHANGED = 1503,
2824
2825 /// The specified task name is invalid.
2826 INVALID_TASK_NAME = 1550,
2827
2828 /// The specified task index is invalid.
2829 INVALID_TASK_INDEX = 1551,
2830
2831 /// The specified thread is already joining a task.
2832 THREAD_ALREADY_IN_TASK = 1552,
2833
2834 /// The Windows Installer Service could not be accessed.
2835 /// This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.
2836 INSTALL_SERVICE_FAILURE = 1601,
2837
2838 /// User cancelled installation.
2839 INSTALL_USEREXIT = 1602,
2840
2841 /// Fatal error during installation.
2842 INSTALL_FAILURE = 1603,
2843
2844 /// Installation suspended, incomplete.
2845 INSTALL_SUSPEND = 1604,
2846
2847 /// This action is only valid for products that are currently installed.
2848 UNKNOWN_PRODUCT = 1605,
2849
2850 /// Feature ID not registered.
2851 UNKNOWN_FEATURE = 1606,
2852
2853 /// Component ID not registered.
2854 UNKNOWN_COMPONENT = 1607,
2855
2856 /// Unknown property.
2857 UNKNOWN_PROPERTY = 1608,
2858
2859 /// Handle is in an invalid state.
2860 INVALID_HANDLE_STATE = 1609,
2861
2862 /// The configuration data for this product is corrupt. Contact your support personnel.
2863 BAD_CONFIGURATION = 1610,
2864
2865 /// Component qualifier not present.
2866 INDEX_ABSENT = 1611,
2867
2868 /// The installation source for this product is not available.
2869 /// Verify that the source exists and that you can access it.
2870 INSTALL_SOURCE_ABSENT = 1612,
2871
2872 /// This installation package cannot be installed by the Windows Installer service.
2873 /// You must install a Windows service pack that contains a newer version of the Windows Installer service.
2874 INSTALL_PACKAGE_VERSION = 1613,
2875
2876 /// Product is uninstalled.
2877 PRODUCT_UNINSTALLED = 1614,
2878
2879 /// SQL query syntax invalid or unsupported.
2880 BAD_QUERY_SYNTAX = 1615,
2881
2882 /// Record field does not exist.
2883 INVALID_FIELD = 1616,
2884
2885 /// The device has been removed.
2886 DEVICE_REMOVED = 1617,
2887
2888 /// Another installation is already in progress.
2889 /// Complete that installation before proceeding with this install.
2890 INSTALL_ALREADY_RUNNING = 1618,
2891
2892 /// This installation package could not be opened.
2893 /// Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
2894 INSTALL_PACKAGE_OPEN_FAILED = 1619,
2895
2896 /// This installation package could not be opened.
2897 /// Contact the application vendor to verify that this is a valid Windows Installer package.
2898 INSTALL_PACKAGE_INVALID = 1620,
2899
2900 /// There was an error starting the Windows Installer service user interface. Contact your support personnel.
2901 INSTALL_UI_FAILURE = 1621,
2902
2903 /// Error opening installation log file.
2904 /// Verify that the specified log file location exists and that you can write to it.
2905 INSTALL_LOG_FAILURE = 1622,
2906
2907 /// The language of this installation package is not supported by your system.
2908 INSTALL_LANGUAGE_UNSUPPORTED = 1623,
2909
2910 /// Error applying transforms. Verify that the specified transform paths are valid.
2911 INSTALL_TRANSFORM_FAILURE = 1624,
2912
2913 /// This installation is forbidden by system policy. Contact your system administrator.
2914 INSTALL_PACKAGE_REJECTED = 1625,
2915
2916 /// Function could not be executed.
2917 FUNCTION_NOT_CALLED = 1626,
2918
2919 /// Function failed during execution.
2920 FUNCTION_FAILED = 1627,
2921
2922 /// Invalid or unknown table specified.
2923 INVALID_TABLE = 1628,
2924
2925 /// Data supplied is of wrong type.
2926 DATATYPE_MISMATCH = 1629,
2927
2928 /// Data of this type is not supported.
2929 UNSUPPORTED_TYPE = 1630,
2930
2931 /// The Windows Installer service failed to start. Contact your support personnel.
2932 CREATE_FAILED = 1631,
2933
2934 /// The Temp folder is on a drive that is full or is inaccessible.
2935 /// Free up space on the drive or verify that you have write permission on the Temp folder.
2936 INSTALL_TEMP_UNWRITABLE = 1632,
2937
2938 /// This installation package is not supported by this processor type. Contact your product vendor.
2939 INSTALL_PLATFORM_UNSUPPORTED = 1633,
2940
2941 /// Component not used on this computer.
2942 INSTALL_NOTUSED = 1634,
2943
2944 /// This update package could not be opened.
2945 /// Verify that the update package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer update package.
2946 PATCH_PACKAGE_OPEN_FAILED = 1635,
2947
2948 /// This update package could not be opened.
2949 /// Contact the application vendor to verify that this is a valid Windows Installer update package.
2950 PATCH_PACKAGE_INVALID = 1636,
2951
2952 /// This update package cannot be processed by the Windows Installer service.
2953 /// You must install a Windows service pack that contains a newer version of the Windows Installer service.
2954 PATCH_PACKAGE_UNSUPPORTED = 1637,
2955
2956 /// Another version of this product is already installed. Installation of this version cannot continue.
2957 /// To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.
2958 PRODUCT_VERSION = 1638,
2959
2960 /// Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
2961 INVALID_COMMAND_LINE = 1639,
2962
2963 /// Only administrators have permission to add, remove, or configure server software during a Terminal services remote session.
2964 /// If you want to install or configure software on the server, contact your network administrator.
2965 INSTALL_REMOTE_DISALLOWED = 1640,
2966
2967 /// The requested operation completed successfully.
2968 /// The system will be restarted so the changes can take effect.
2969 SUCCESS_REBOOT_INITIATED = 1641,
2970
2971 /// The upgrade cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade may update a different version of the program.
2972 /// Verify that the program to be upgraded exists on your computer and that you have the correct upgrade.
2973 PATCH_TARGET_NOT_FOUND = 1642,
2974
2975 /// The update package is not permitted by software restriction policy.
2976 PATCH_PACKAGE_REJECTED = 1643,
2977
2978 /// One or more customizations are not permitted by software restriction policy.
2979 INSTALL_TRANSFORM_REJECTED = 1644,
2980
2981 /// The Windows Installer does not permit installation from a Remote Desktop Connection.
2982 INSTALL_REMOTE_PROHIBITED = 1645,
2983
2984 /// Uninstallation of the update package is not supported.
2985 PATCH_REMOVAL_UNSUPPORTED = 1646,
2986
2987 /// The update is not applied to this product.
2988 UNKNOWN_PATCH = 1647,
2989
2990 /// No valid sequence could be found for the set of updates.
2991 PATCH_NO_SEQUENCE = 1648,
2992
2993 /// Update removal was disallowed by policy.
2994 PATCH_REMOVAL_DISALLOWED = 1649,
2995
2996 /// The XML update data is invalid.
2997 INVALID_PATCH_XML = 1650,
2998
2999 /// Windows Installer does not permit updating of managed advertised products.
3000 /// At least one feature of the product must be installed before applying the update.
3001 PATCH_MANAGED_ADVERTISED_PRODUCT = 1651,
3002
3003 /// The Windows Installer service is not accessible in Safe Mode.
3004 /// Please try again when your computer is not in Safe Mode or you can use System Restore to return your machine to a previous good state.
3005 INSTALL_SERVICE_SAFEBOOT = 1652,
3006
3007 /// A fail fast exception occurred.
3008 /// Exception handlers will not be invoked and the process will be terminated immediately.
3009 FAIL_FAST_EXCEPTION = 1653,
3010
3011 /// The app that you are trying to run is not supported on this version of Windows.
3012 INSTALL_REJECTED = 1654,
3013
3014 /// The string binding is invalid.
3015 RPC_S_INVALID_STRING_BINDING = 1700,
3016
3017 /// The binding handle is not the correct type.
3018 RPC_S_WRONG_KIND_OF_BINDING = 1701,
3019
3020 /// The binding handle is invalid.
3021 RPC_S_INVALID_BINDING = 1702,
3022
3023 /// The RPC protocol sequence is not supported.
3024 RPC_S_PROTSEQ_NOT_SUPPORTED = 1703,
3025
3026 /// The RPC protocol sequence is invalid.
3027 RPC_S_INVALID_RPC_PROTSEQ = 1704,
3028
3029 /// The string universal unique identifier (UUID) is invalid.
3030 RPC_S_INVALID_STRING_UUID = 1705,
3031
3032 /// The endpoint format is invalid.
3033 RPC_S_INVALID_ENDPOINT_FORMAT = 1706,
3034
3035 /// The network address is invalid.
3036 RPC_S_INVALID_NET_ADDR = 1707,
3037
3038 /// No endpoint was found.
3039 RPC_S_NO_ENDPOINT_FOUND = 1708,
3040
3041 /// The timeout value is invalid.
3042 RPC_S_INVALID_TIMEOUT = 1709,
3043
3044 /// The object universal unique identifier (UUID) was not found.
3045 RPC_S_OBJECT_NOT_FOUND = 1710,
3046
3047 /// The object universal unique identifier (UUID) has already been registered.
3048 RPC_S_ALREADY_REGISTERED = 1711,
3049
3050 /// The type universal unique identifier (UUID) has already been registered.
3051 RPC_S_TYPE_ALREADY_REGISTERED = 1712,
3052
3053 /// The RPC server is already listening.
3054 RPC_S_ALREADY_LISTENING = 1713,
3055
3056 /// No protocol sequences have been registered.
3057 RPC_S_NO_PROTSEQS_REGISTERED = 1714,
3058
3059 /// The RPC server is not listening.
3060 RPC_S_NOT_LISTENING = 1715,
3061
3062 /// The manager type is unknown.
3063 RPC_S_UNKNOWN_MGR_TYPE = 1716,
3064
3065 /// The interface is unknown.
3066 RPC_S_UNKNOWN_IF = 1717,
3067
3068 /// There are no bindings.
3069 RPC_S_NO_BINDINGS = 1718,
3070
3071 /// There are no protocol sequences.
3072 RPC_S_NO_PROTSEQS = 1719,
3073
3074 /// The endpoint cannot be created.
3075 RPC_S_CANT_CREATE_ENDPOINT = 1720,
3076
3077 /// Not enough resources are available to complete this operation.
3078 RPC_S_OUT_OF_RESOURCES = 1721,
3079
3080 /// The RPC server is unavailable.
3081 RPC_S_SERVER_UNAVAILABLE = 1722,
3082
3083 /// The RPC server is too busy to complete this operation.
3084 RPC_S_SERVER_TOO_BUSY = 1723,
3085
3086 /// The network options are invalid.
3087 RPC_S_INVALID_NETWORK_OPTIONS = 1724,
3088
3089 /// There are no remote procedure calls active on this thread.
3090 RPC_S_NO_CALL_ACTIVE = 1725,
3091
3092 /// The remote procedure call failed.
3093 RPC_S_CALL_FAILED = 1726,
3094
3095 /// The remote procedure call failed and did not execute.
3096 RPC_S_CALL_FAILED_DNE = 1727,
3097
3098 /// A remote procedure call (RPC) protocol error occurred.
3099 RPC_S_PROTOCOL_ERROR = 1728,
3100
3101 /// Access to the HTTP proxy is denied.
3102 RPC_S_PROXY_ACCESS_DENIED = 1729,
3103
3104 /// The transfer syntax is not supported by the RPC server.
3105 RPC_S_UNSUPPORTED_TRANS_SYN = 1730,
3106
3107 /// The universal unique identifier (UUID) type is not supported.
3108 RPC_S_UNSUPPORTED_TYPE = 1732,
3109
3110 /// The tag is invalid.
3111 RPC_S_INVALID_TAG = 1733,
3112
3113 /// The array bounds are invalid.
3114 RPC_S_INVALID_BOUND = 1734,
3115
3116 /// The binding does not contain an entry name.
3117 RPC_S_NO_ENTRY_NAME = 1735,
3118
3119 /// The name syntax is invalid.
3120 RPC_S_INVALID_NAME_SYNTAX = 1736,
3121
3122 /// The name syntax is not supported.
3123 RPC_S_UNSUPPORTED_NAME_SYNTAX = 1737,
3124
3125 /// No network address is available to use to construct a universal unique identifier (UUID).
3126 RPC_S_UUID_NO_ADDRESS = 1739,
3127
3128 /// The endpoint is a duplicate.
3129 RPC_S_DUPLICATE_ENDPOINT = 1740,
3130
3131 /// The authentication type is unknown.
3132 RPC_S_UNKNOWN_AUTHN_TYPE = 1741,
3133
3134 /// The maximum number of calls is too small.
3135 RPC_S_MAX_CALLS_TOO_SMALL = 1742,
3136
3137 /// The string is too long.
3138 RPC_S_STRING_TOO_LONG = 1743,
3139
3140 /// The RPC protocol sequence was not found.
3141 RPC_S_PROTSEQ_NOT_FOUND = 1744,
3142
3143 /// The procedure number is out of range.
3144 RPC_S_PROCNUM_OUT_OF_RANGE = 1745,
3145
3146 /// The binding does not contain any authentication information.
3147 RPC_S_BINDING_HAS_NO_AUTH = 1746,
3148
3149 /// The authentication service is unknown.
3150 RPC_S_UNKNOWN_AUTHN_SERVICE = 1747,
3151
3152 /// The authentication level is unknown.
3153 RPC_S_UNKNOWN_AUTHN_LEVEL = 1748,
3154
3155 /// The security context is invalid.
3156 RPC_S_INVALID_AUTH_IDENTITY = 1749,
3157
3158 /// The authorization service is unknown.
3159 RPC_S_UNKNOWN_AUTHZ_SERVICE = 1750,
3160
3161 /// The entry is invalid.
3162 EPT_S_INVALID_ENTRY = 1751,
3163
3164 /// The server endpoint cannot perform the operation.
3165 EPT_S_CANT_PERFORM_OP = 1752,
3166
3167 /// There are no more endpoints available from the endpoint mapper.
3168 EPT_S_NOT_REGISTERED = 1753,
3169
3170 /// No interfaces have been exported.
3171 RPC_S_NOTHING_TO_EXPORT = 1754,
3172
3173 /// The entry name is incomplete.
3174 RPC_S_INCOMPLETE_NAME = 1755,
3175
3176 /// The version option is invalid.
3177 RPC_S_INVALID_VERS_OPTION = 1756,
3178
3179 /// There are no more members.
3180 RPC_S_NO_MORE_MEMBERS = 1757,
3181
3182 /// There is nothing to unexport.
3183 RPC_S_NOT_ALL_OBJS_UNEXPORTED = 1758,
3184
3185 /// The interface was not found.
3186 RPC_S_INTERFACE_NOT_FOUND = 1759,
3187
3188 /// The entry already exists.
3189 RPC_S_ENTRY_ALREADY_EXISTS = 1760,
3190
3191 /// The entry is not found.
3192 RPC_S_ENTRY_NOT_FOUND = 1761,
3193
3194 /// The name service is unavailable.
3195 RPC_S_NAME_SERVICE_UNAVAILABLE = 1762,
3196
3197 /// The network address family is invalid.
3198 RPC_S_INVALID_NAF_ID = 1763,
3199
3200 /// The requested operation is not supported.
3201 RPC_S_CANNOT_SUPPORT = 1764,
3202
3203 /// No security context is available to allow impersonation.
3204 RPC_S_NO_CONTEXT_AVAILABLE = 1765,
3205
3206 /// An internal error occurred in a remote procedure call (RPC).
3207 RPC_S_INTERNAL_ERROR = 1766,
3208
3209 /// The RPC server attempted an integer division by zero.
3210 RPC_S_ZERO_DIVIDE = 1767,
3211
3212 /// An addressing error occurred in the RPC server.
3213 RPC_S_ADDRESS_ERROR = 1768,
3214
3215 /// A floating-point operation at the RPC server caused a division by zero.
3216 RPC_S_FP_DIV_ZERO = 1769,
3217
3218 /// A floating-point underflow occurred at the RPC server.
3219 RPC_S_FP_UNDERFLOW = 1770,
3220
3221 /// A floating-point overflow occurred at the RPC server.
3222 RPC_S_FP_OVERFLOW = 1771,
3223
3224 /// The list of RPC servers available for the binding of auto handles has been exhausted.
3225 RPC_X_NO_MORE_ENTRIES = 1772,
3226
3227 /// Unable to open the character translation table file.
3228 RPC_X_SS_CHAR_TRANS_OPEN_FAIL = 1773,
3229
3230 /// The file containing the character translation table has fewer than 512 bytes.
3231 RPC_X_SS_CHAR_TRANS_SHORT_FILE = 1774,
3232
3233 /// A null context handle was passed from the client to the host during a remote procedure call.
3234 RPC_X_SS_IN_NULL_CONTEXT = 1775,
3235
3236 /// The context handle changed during a remote procedure call.
3237 RPC_X_SS_CONTEXT_DAMAGED = 1777,
3238
3239 /// The binding handles passed to a remote procedure call do not match.
3240 RPC_X_SS_HANDLES_MISMATCH = 1778,
3241
3242 /// The stub is unable to get the remote procedure call handle.
3243 RPC_X_SS_CANNOT_GET_CALL_HANDLE = 1779,
3244
3245 /// A null reference pointer was passed to the stub.
3246 RPC_X_NULL_REF_POINTER = 1780,
3247
3248 /// The enumeration value is out of range.
3249 RPC_X_ENUM_VALUE_OUT_OF_RANGE = 1781,
3250
3251 /// The byte count is too small.
3252 RPC_X_BYTE_COUNT_TOO_SMALL = 1782,
3253
3254 /// The stub received bad data.
3255 RPC_X_BAD_STUB_DATA = 1783,
3256
3257 /// The supplied user buffer is not valid for the requested operation.
3258 INVALID_USER_BUFFER = 1784,
3259
3260 /// The disk media is not recognized. It may not be formatted.
3261 UNRECOGNIZED_MEDIA = 1785,
3262
3263 /// The workstation does not have a trust secret.
3264 NO_TRUST_LSA_SECRET = 1786,
3265
3266 /// The security database on the server does not have a computer account for this workstation trust relationship.
3267 NO_TRUST_SAM_ACCOUNT = 1787,
3268
3269 /// The trust relationship between the primary domain and the trusted domain failed.
3270 TRUSTED_DOMAIN_FAILURE = 1788,
3271
3272 /// The trust relationship between this workstation and the primary domain failed.
3273 TRUSTED_RELATIONSHIP_FAILURE = 1789,
3274
3275 /// The network logon failed.
3276 TRUST_FAILURE = 1790,
3277
3278 /// A remote procedure call is already in progress for this thread.
3279 RPC_S_CALL_IN_PROGRESS = 1791,
3280
3281 /// An attempt was made to logon, but the network logon service was not started.
3282 NETLOGON_NOT_STARTED = 1792,
3283
3284 /// The user's account has expired.
3285 ACCOUNT_EXPIRED = 1793,
3286
3287 /// The redirector is in use and cannot be unloaded.
3288 REDIRECTOR_HAS_OPEN_HANDLES = 1794,
3289
3290 /// The specified printer driver is already installed.
3291 PRINTER_DRIVER_ALREADY_INSTALLED = 1795,
3292
3293 /// The specified port is unknown.
3294 UNKNOWN_PORT = 1796,
3295
3296 /// The printer driver is unknown.
3297 UNKNOWN_PRINTER_DRIVER = 1797,
3298
3299 /// The print processor is unknown.
3300 UNKNOWN_PRINTPROCESSOR = 1798,
3301
3302 /// The specified separator file is invalid.
3303 INVALID_SEPARATOR_FILE = 1799,
3304
3305 /// The specified priority is invalid.
3306 INVALID_PRIORITY = 1800,
3307
3308 /// The printer name is invalid.
3309 INVALID_PRINTER_NAME = 1801,
3310
3311 /// The printer already exists.
3312 PRINTER_ALREADY_EXISTS = 1802,
3313
3314 /// The printer command is invalid.
3315 INVALID_PRINTER_COMMAND = 1803,
3316
3317 /// The specified datatype is invalid.
3318 INVALID_DATATYPE = 1804,
3319
3320 /// The environment specified is invalid.
3321 INVALID_ENVIRONMENT = 1805,
3322
3323 /// There are no more bindings.
3324 RPC_S_NO_MORE_BINDINGS = 1806,
3325
3326 /// The account used is an interdomain trust account.
3327 /// Use your global user account or local user account to access this server.
3328 NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = 1807,
3329
3330 /// The account used is a computer account.
3331 /// Use your global user account or local user account to access this server.
3332 NOLOGON_WORKSTATION_TRUST_ACCOUNT = 1808,
3333
3334 /// The account used is a server trust account.
3335 /// Use your global user account or local user account to access this server.
3336 NOLOGON_SERVER_TRUST_ACCOUNT = 1809,
3337
3338 /// The name or security ID (SID) of the domain specified is inconsistent with the trust information for that domain.
3339 DOMAIN_TRUST_INCONSISTENT = 1810,
3340
3341 /// The server is in use and cannot be unloaded.
3342 SERVER_HAS_OPEN_HANDLES = 1811,
3343
3344 /// The specified image file did not contain a resource section.
3345 RESOURCE_DATA_NOT_FOUND = 1812,
3346
3347 /// The specified resource type cannot be found in the image file.
3348 RESOURCE_TYPE_NOT_FOUND = 1813,
3349
3350 /// The specified resource name cannot be found in the image file.
3351 RESOURCE_NAME_NOT_FOUND = 1814,
3352
3353 /// The specified resource language ID cannot be found in the image file.
3354 RESOURCE_LANG_NOT_FOUND = 1815,
3355
3356 /// Not enough quota is available to process this command.
3357 NOT_ENOUGH_QUOTA = 1816,
3358
3359 /// No interfaces have been registered.
3360 RPC_S_NO_INTERFACES = 1817,
3361
3362 /// The remote procedure call was cancelled.
3363 RPC_S_CALL_CANCELLED = 1818,
3364
3365 /// The binding handle does not contain all required information.
3366 RPC_S_BINDING_INCOMPLETE = 1819,
3367
3368 /// A communications failure occurred during a remote procedure call.
3369 RPC_S_COMM_FAILURE = 1820,
3370
3371 /// The requested authentication level is not supported.
3372 RPC_S_UNSUPPORTED_AUTHN_LEVEL = 1821,
3373
3374 /// No principal name registered.
3375 RPC_S_NO_PRINC_NAME = 1822,
3376
3377 /// The error specified is not a valid Windows RPC error code.
3378 RPC_S_NOT_RPC_ERROR = 1823,
3379
3380 /// A UUID that is valid only on this computer has been allocated.
3381 RPC_S_UUID_LOCAL_ONLY = 1824,
3382
3383 /// A security package specific error occurred.
3384 RPC_S_SEC_PKG_ERROR = 1825,
3385
3386 /// Thread is not canceled.
3387 RPC_S_NOT_CANCELLED = 1826,
3388
3389 /// Invalid operation on the encoding/decoding handle.
3390 RPC_X_INVALID_ES_ACTION = 1827,
3391
3392 /// Incompatible version of the serializing package.
3393 RPC_X_WRONG_ES_VERSION = 1828,
3394
3395 /// Incompatible version of the RPC stub.
3396 RPC_X_WRONG_STUB_VERSION = 1829,
3397
3398 /// The RPC pipe object is invalid or corrupted.
3399 RPC_X_INVALID_PIPE_OBJECT = 1830,
3400
3401 /// An invalid operation was attempted on an RPC pipe object.
3402 RPC_X_WRONG_PIPE_ORDER = 1831,
3403
3404 /// Unsupported RPC pipe version.
3405 RPC_X_WRONG_PIPE_VERSION = 1832,
3406
3407 /// HTTP proxy server rejected the connection because the cookie authentication failed.
3408 RPC_S_COOKIE_AUTH_FAILED = 1833,
3409
3410 /// The group member was not found.
3411 RPC_S_GROUP_MEMBER_NOT_FOUND = 1898,
3412
3413 /// The endpoint mapper database entry could not be created.
3414 EPT_S_CANT_CREATE = 1899,
3415
3416 /// The object universal unique identifier (UUID) is the nil UUID.
3417 RPC_S_INVALID_OBJECT = 1900,
3418
3419 /// The specified time is invalid.
3420 INVALID_TIME = 1901,
3421
3422 /// The specified form name is invalid.
3423 INVALID_FORM_NAME = 1902,
3424
3425 /// The specified form size is invalid.
3426 INVALID_FORM_SIZE = 1903,
3427
3428 /// The specified printer handle is already being waited on.
3429 ALREADY_WAITING = 1904,
3430
3431 /// The specified printer has been deleted.
3432 PRINTER_DELETED = 1905,
3433
3434 /// The state of the printer is invalid.
3435 INVALID_PRINTER_STATE = 1906,
3436
3437 /// The user's password must be changed before signing in.
3438 PASSWORD_MUST_CHANGE = 1907,
3439
3440 /// Could not find the domain controller for this domain.
3441 DOMAIN_CONTROLLER_NOT_FOUND = 1908,
3442
3443 /// The referenced account is currently locked out and may not be logged on to.
3444 ACCOUNT_LOCKED_OUT = 1909,
3445
3446 /// The object exporter specified was not found.
3447 OR_INVALID_OXID = 1910,
3448
3449 /// The object specified was not found.
3450 OR_INVALID_OID = 1911,
3451
3452 /// The object resolver set specified was not found.
3453 OR_INVALID_SET = 1912,
3454
3455 /// Some data remains to be sent in the request buffer.
3456 RPC_S_SEND_INCOMPLETE = 1913,
3457
3458 /// Invalid asynchronous remote procedure call handle.
3459 RPC_S_INVALID_ASYNC_HANDLE = 1914,
3460
3461 /// Invalid asynchronous RPC call handle for this operation.
3462 RPC_S_INVALID_ASYNC_CALL = 1915,
3463
3464 /// The RPC pipe object has already been closed.
3465 RPC_X_PIPE_CLOSED = 1916,
3466
3467 /// The RPC call completed before all pipes were processed.
3468 RPC_X_PIPE_DISCIPLINE_ERROR = 1917,
3469
3470 /// No more data is available from the RPC pipe.
3471 RPC_X_PIPE_EMPTY = 1918,
3472
3473 /// No site name is available for this machine.
3474 NO_SITENAME = 1919,
3475
3476 /// The file cannot be accessed by the system.
3477 CANT_ACCESS_FILE = 1920,
3478
3479 /// The name of the file cannot be resolved by the system.
3480 CANT_RESOLVE_FILENAME = 1921,
3481
3482 /// The entry is not of the expected type.
3483 RPC_S_ENTRY_TYPE_MISMATCH = 1922,
3484
3485 /// Not all object UUIDs could be exported to the specified entry.
3486 RPC_S_NOT_ALL_OBJS_EXPORTED = 1923,
3487
3488 /// Interface could not be exported to the specified entry.
3489 RPC_S_INTERFACE_NOT_EXPORTED = 1924,
3490
3491 /// The specified profile entry could not be added.
3492 RPC_S_PROFILE_NOT_ADDED = 1925,
3493
3494 /// The specified profile element could not be added.
3495 RPC_S_PRF_ELT_NOT_ADDED = 1926,
3496
3497 /// The specified profile element could not be removed.
3498 RPC_S_PRF_ELT_NOT_REMOVED = 1927,
3499
3500 /// The group element could not be added.
3501 RPC_S_GRP_ELT_NOT_ADDED = 1928,
3502
3503 /// The group element could not be removed.
3504 RPC_S_GRP_ELT_NOT_REMOVED = 1929,
3505
3506 /// The printer driver is not compatible with a policy enabled on your computer that blocks NT 4.0 drivers.
3507 KM_DRIVER_BLOCKED = 1930,
3508
3509 /// The context has expired and can no longer be used.
3510 CONTEXT_EXPIRED = 1931,
3511
3512 /// The current user's delegated trust creation quota has been exceeded.
3513 PER_USER_TRUST_QUOTA_EXCEEDED = 1932,
3514
3515 /// The total delegated trust creation quota has been exceeded.
3516 ALL_USER_TRUST_QUOTA_EXCEEDED = 1933,
3517
3518 /// The current user's delegated trust deletion quota has been exceeded.
3519 USER_DELETE_TRUST_QUOTA_EXCEEDED = 1934,
3520
3521 /// The computer you are signing into is protected by an authentication firewall.
3522 /// The specified account is not allowed to authenticate to the computer.
3523 AUTHENTICATION_FIREWALL_FAILED = 1935,
3524
3525 /// Remote connections to the Print Spooler are blocked by a policy set on your machine.
3526 REMOTE_PRINT_CONNECTIONS_BLOCKED = 1936,
3527
3528 /// Authentication failed because NTLM authentication has been disabled.
3529 NTLM_BLOCKED = 1937,
3530
3531 /// Logon Failure: EAS policy requires that the user change their password before this operation can be performed.
3532 PASSWORD_CHANGE_REQUIRED = 1938,
3533
3534 /// The pixel format is invalid.
3535 INVALID_PIXEL_FORMAT = 2000,
3536
3537 /// The specified driver is invalid.
3538 BAD_DRIVER = 2001,
3539
3540 /// The window style or class attribute is invalid for this operation.
3541 INVALID_WINDOW_STYLE = 2002,
3542
3543 /// The requested metafile operation is not supported.
3544 METAFILE_NOT_SUPPORTED = 2003,
3545
3546 /// The requested transformation operation is not supported.
3547 TRANSFORM_NOT_SUPPORTED = 2004,
3548
3549 /// The requested clipping operation is not supported.
3550 CLIPPING_NOT_SUPPORTED = 2005,
3551
3552 /// The specified color management module is invalid.
3553 INVALID_CMM = 2010,
3554
3555 /// The specified color profile is invalid.
3556 INVALID_PROFILE = 2011,
3557
3558 /// The specified tag was not found.
3559 TAG_NOT_FOUND = 2012,
3560
3561 /// A required tag is not present.
3562 TAG_NOT_PRESENT = 2013,
3563
3564 /// The specified tag is already present.
3565 DUPLICATE_TAG = 2014,
3566
3567 /// The specified color profile is not associated with the specified device.
3568 PROFILE_NOT_ASSOCIATED_WITH_DEVICE = 2015,
3569
3570 /// The specified color profile was not found.
3571 PROFILE_NOT_FOUND = 2016,
3572
3573 /// The specified color space is invalid.
3574 INVALID_COLORSPACE = 2017,
3575
3576 /// Image Color Management is not enabled.
3577 ICM_NOT_ENABLED = 2018,
3578
3579 /// There was an error while deleting the color transform.
3580 DELETING_ICM_XFORM = 2019,
3581
3582 /// The specified color transform is invalid.
3583 INVALID_TRANSFORM = 2020,
3584
3585 /// The specified transform does not match the bitmap's color space.
3586 COLORSPACE_MISMATCH = 2021,
3587
3588 /// The specified named color index is not present in the profile.
3589 INVALID_COLORINDEX = 2022,
3590
3591 /// The specified profile is intended for a device of a different type than the specified device.
3592 PROFILE_DOES_NOT_MATCH_DEVICE = 2023,
3593
3594 /// The network connection was made successfully, but the user had to be prompted for a password other than the one originally specified.
3595 CONNECTED_OTHER_PASSWORD = 2108,
3596
3597 /// The network connection was made successfully using default credentials.
3598 CONNECTED_OTHER_PASSWORD_DEFAULT = 2109,
3599
3600 /// The specified username is invalid.
3601 BAD_USERNAME = 2202,
3602
3603 /// This network connection does not exist.
3604 NOT_CONNECTED = 2250,
3605
3606 /// This network connection has files open or requests pending.
3607 OPEN_FILES = 2401,
3608
3609 /// Active connections still exist.
3610 ACTIVE_CONNECTIONS = 2402,
3611
3612 /// The device is in use by an active process and cannot be disconnected.
3613 DEVICE_IN_USE = 2404,
3614
3615 /// The specified print monitor is unknown.
3616 UNKNOWN_PRINT_MONITOR = 3000,
3617
3618 /// The specified printer driver is currently in use.
3619 PRINTER_DRIVER_IN_USE = 3001,
3620
3621 /// The spool file was not found.
3622 SPOOL_FILE_NOT_FOUND = 3002,
3623
3624 /// A StartDocPrinter call was not issued.
3625 SPL_NO_STARTDOC = 3003,
3626
3627 /// An AddJob call was not issued.
3628 SPL_NO_ADDJOB = 3004,
3629
3630 /// The specified print processor has already been installed.
3631 PRINT_PROCESSOR_ALREADY_INSTALLED = 3005,
3632
3633 /// The specified print monitor has already been installed.
3634 PRINT_MONITOR_ALREADY_INSTALLED = 3006,
3635
3636 /// The specified print monitor does not have the required functions.
3637 INVALID_PRINT_MONITOR = 3007,
3638
3639 /// The specified print monitor is currently in use.
3640 PRINT_MONITOR_IN_USE = 3008,
3641
3642 /// The requested operation is not allowed when there are jobs queued to the printer.
3643 PRINTER_HAS_JOBS_QUEUED = 3009,
3644
3645 /// The requested operation is successful.
3646 /// Changes will not be effective until the system is rebooted.
3647 SUCCESS_REBOOT_REQUIRED = 3010,
3648
3649 /// The requested operation is successful.
3650 /// Changes will not be effective until the service is restarted.
3651 SUCCESS_RESTART_REQUIRED = 3011,
3652
3653 /// No printers were found.
3654 PRINTER_NOT_FOUND = 3012,
3655
3656 /// The printer driver is known to be unreliable.
3657 PRINTER_DRIVER_WARNED = 3013,
3658
3659 /// The printer driver is known to harm the system.
3660 PRINTER_DRIVER_BLOCKED = 3014,
3661
3662 /// The specified printer driver package is currently in use.
3663 PRINTER_DRIVER_PACKAGE_IN_USE = 3015,
3664
3665 /// Unable to find a core driver package that is required by the printer driver package.
3666 CORE_DRIVER_PACKAGE_NOT_FOUND = 3016,
3667
3668 /// The requested operation failed.
3669 /// A system reboot is required to roll back changes made.
3670 FAIL_REBOOT_REQUIRED = 3017,
3671
3672 /// The requested operation failed.
3673 /// A system reboot has been initiated to roll back changes made.
3674 FAIL_REBOOT_INITIATED = 3018,
3675
3676 /// The specified printer driver was not found on the system and needs to be downloaded.
3677 PRINTER_DRIVER_DOWNLOAD_NEEDED = 3019,
3678
3679 /// The requested print job has failed to print.
3680 /// A print system update requires the job to be resubmitted.
3681 PRINT_JOB_RESTART_REQUIRED = 3020,
3682
3683 /// The printer driver does not contain a valid manifest, or contains too many manifests.
3684 INVALID_PRINTER_DRIVER_MANIFEST = 3021,
3685
3686 /// The specified printer cannot be shared.
3687 PRINTER_NOT_SHAREABLE = 3022,
3688
3689 /// The operation was paused.
3690 REQUEST_PAUSED = 3050,
3691
3692 /// Reissue the given operation as a cached IO operation.
3693 IO_REISSUE_AS_CACHED = 3950,
3694
3695 _,
3696};
lib/std/os/windows/ws2_32.zig+449-96
...@@ -205,101 +205,454 @@ pub const WSAMSG = extern struct {...@@ -205,101 +205,454 @@ pub const WSAMSG = extern struct {
205 dwFlags: DWORD,205 dwFlags: DWORD,
206};206};
207207
208pub const WSA_INVALID_HANDLE = 6;208// https://docs.microsoft.com/en-au/windows/win32/winsock/windows-sockets-error-codes-2
209pub const WSA_NOT_ENOUGH_MEMORY = 8;209pub const WinsockError = extern enum(u16) {
210pub const WSA_INVALID_PARAMETER = 87;210 /// Specified event object handle is invalid.
211pub const WSA_OPERATION_ABORTED = 995;211 /// An application attempts to use an event object, but the specified handle is not valid.
212pub const WSA_IO_INCOMPLETE = 996;212 WSA_INVALID_HANDLE = 6,
213pub const WSA_IO_PENDING = 997;213
214pub const WSAEINTR = 10004;214 /// Insufficient memory available.
215pub const WSAEBADF = 10009;215 /// An application used a Windows Sockets function that directly maps to a Windows function.
216pub const WSAEACCES = 10013;216 /// The Windows function is indicating a lack of required memory resources.
217pub const WSAEFAULT = 10014;217 WSA_NOT_ENOUGH_MEMORY = 8,
218pub const WSAEINVAL = 10022;218
219pub const WSAEMFILE = 10024;219 /// One or more parameters are invalid.
220pub const WSAEWOULDBLOCK = 10035;220 /// An application used a Windows Sockets function which directly maps to a Windows function.
221pub const WSAEINPROGRESS = 10036;221 /// The Windows function is indicating a problem with one or more parameters.
222pub const WSAEALREADY = 10037;222 WSA_INVALID_PARAMETER = 87,
223pub const WSAENOTSOCK = 10038;223
224pub const WSAEDESTADDRREQ = 10039;224 /// Overlapped operation aborted.
225pub const WSAEMSGSIZE = 10040;225 /// An overlapped operation was canceled due to the closure of the socket, or the execution of the SIO_FLUSH command in WSAIoctl.
226pub const WSAEPROTOTYPE = 10041;226 WSA_OPERATION_ABORTED = 995,
227pub const WSAENOPROTOOPT = 10042;227
228pub const WSAEPROTONOSUPPORT = 10043;228 /// Overlapped I/O event object not in signaled state.
229pub const WSAESOCKTNOSUPPORT = 10044;229 /// The application has tried to determine the status of an overlapped operation which is not yet completed.
230pub const WSAEOPNOTSUPP = 10045;230 /// Applications that use WSAGetOverlappedResult (with the fWait flag set to FALSE) in a polling mode to determine when an overlapped operation has completed, get this error code until the operation is complete.
231pub const WSAEPFNOSUPPORT = 10046;231 WSA_IO_INCOMPLETE = 996,
232pub const WSAEAFNOSUPPORT = 10047;232
233pub const WSAEADDRINUSE = 10048;233 /// The application has initiated an overlapped operation that cannot be completed immediately.
234pub const WSAEADDRNOTAVAIL = 10049;234 /// A completion indication will be given later when the operation has been completed.
235pub const WSAENETDOWN = 10050;235 WSA_IO_PENDING = 997,
236pub const WSAENETUNREACH = 10051;236
237pub const WSAENETRESET = 10052;237 /// Interrupted function call.
238pub const WSAECONNABORTED = 10053;238 /// A blocking operation was interrupted by a call to WSACancelBlockingCall.
239pub const WSAECONNRESET = 10054;239 WSAEINTR = 10004,
240pub const WSAENOBUFS = 10055;240
241pub const WSAEISCONN = 10056;241 /// File handle is not valid.
242pub const WSAENOTCONN = 10057;242 /// The file handle supplied is not valid.
243pub const WSAESHUTDOWN = 10058;243 WSAEBADF = 10009,
244pub const WSAETOOMANYREFS = 10059;244
245pub const WSAETIMEDOUT = 10060;245 /// Permission denied.
246pub const WSAECONNREFUSED = 10061;246 /// An attempt was made to access a socket in a way forbidden by its access permissions.
247pub const WSAELOOP = 10062;247 /// An example is using a broadcast address for sendto without broadcast permission being set using setsockopt(SO_BROADCAST).
248pub const WSAENAMETOOLONG = 10063;248 /// Another possible reason for the WSAEACCES error is that when the bind function is called (on Windows NT 4.0 with SP4 and later), another application, service, or kernel mode driver is bound to the same address with exclusive access.
249pub const WSAEHOSTDOWN = 10064;249 /// Such exclusive access is a new feature of Windows NT 4.0 with SP4 and later, and is implemented by using the SO_EXCLUSIVEADDRUSE option.
250pub const WSAEHOSTUNREACH = 10065;250 WSAEACCES = 10013,
251pub const WSAENOTEMPTY = 10066;251
252pub const WSAEPROCLIM = 10067;252 /// Bad address.
253pub const WSAEUSERS = 10068;253 /// The system detected an invalid pointer address in attempting to use a pointer argument of a call.
254pub const WSAEDQUOT = 10069;254 /// This error occurs if an application passes an invalid pointer value, or if the length of the buffer is too small.
255pub const WSAESTALE = 10070;255 /// For instance, if the length of an argument, which is a sockaddr structure, is smaller than the sizeof(sockaddr).
256pub const WSAEREMOTE = 10071;256 WSAEFAULT = 10014,
257pub const WSASYSNOTREADY = 10091;257
258pub const WSAVERNOTSUPPORTED = 10092;258 /// Invalid argument.
259pub const WSANOTINITIALISED = 10093;259 /// Some invalid argument was supplied (for example, specifying an invalid level to the setsockopt function).
260pub const WSAEDISCON = 10101;260 /// In some instances, it also refers to the current state of the socket—for instance, calling accept on a socket that is not listening.
261pub const WSAENOMORE = 10102;261 WSAEINVAL = 10022,
262pub const WSAECANCELLED = 10103;262
263pub const WSAEINVALIDPROCTABLE = 10104;263 /// Too many open files.
264pub const WSAEINVALIDPROVIDER = 10105;264 /// Too many open sockets. Each implementation may have a maximum number of socket handles available, either globally, per process, or per thread.
265pub const WSAEPROVIDERFAILEDINIT = 10106;265 WSAEMFILE = 10024,
266pub const WSASYSCALLFAILURE = 10107;266
267pub const WSASERVICE_NOT_FOUND = 10108;267 /// Resource temporarily unavailable.
268pub const WSATYPE_NOT_FOUND = 10109;268 /// This error is returned from operations on nonblocking sockets that cannot be completed immediately, for example recv when no data is queued to be read from the socket.
269pub const WSA_E_NO_MORE = 10110;269 /// It is a nonfatal error, and the operation should be retried later.
270pub const WSA_E_CANCELLED = 10111;270 /// It is normal for WSAEWOULDBLOCK to be reported as the result from calling connect on a nonblocking SOCK_STREAM socket, since some time must elapse for the connection to be established.
271pub const WSAEREFUSED = 10112;271 WSAEWOULDBLOCK = 10035,
272pub const WSAHOST_NOT_FOUND = 11001;272
273pub const WSATRY_AGAIN = 11002;273 /// Operation now in progress.
274pub const WSANO_RECOVERY = 11003;274 /// A blocking operation is currently executing.
275pub const WSANO_DATA = 11004;275 /// Windows Sockets only allows a single blocking operation—per- task or thread—to be outstanding, and if any other function call is made (whether or not it references that or any other socket) the function fails with the WSAEINPROGRESS error.
276pub const WSA_QOS_RECEIVERS = 11005;276 WSAEINPROGRESS = 10036,
277pub const WSA_QOS_SENDERS = 11006;277
278pub const WSA_QOS_NO_SENDERS = 11007;278 /// Operation already in progress.
279pub const WSA_QOS_NO_RECEIVERS = 11008;279 /// An operation was attempted on a nonblocking socket with an operation already in progress—that is, calling connect a second time on a nonblocking socket that is already connecting, or canceling an asynchronous request (WSAAsyncGetXbyY) that has already been canceled or completed.
280pub const WSA_QOS_REQUEST_CONFIRMED = 11009;280 WSAEALREADY = 10037,
281pub const WSA_QOS_ADMISSION_FAILURE = 11010;281
282pub const WSA_QOS_POLICY_FAILURE = 11011;282 /// Socket operation on nonsocket.
283pub const WSA_QOS_BAD_STYLE = 11012;283 /// An operation was attempted on something that is not a socket.
284pub const WSA_QOS_BAD_OBJECT = 11013;284 /// Either the socket handle parameter did not reference a valid socket, or for select, a member of an fd_set was not valid.
285pub const WSA_QOS_TRAFFIC_CTRL_ERROR = 11014;285 WSAENOTSOCK = 10038,
286pub const WSA_QOS_GENERIC_ERROR = 11015;286
287pub const WSA_QOS_ESERVICETYPE = 11016;287 /// Destination address required.
288pub const WSA_QOS_EFLOWSPEC = 11017;288 /// A required address was omitted from an operation on a socket.
289pub const WSA_QOS_EPROVSPECBUF = 11018;289 /// For example, this error is returned if sendto is called with the remote address of ADDR_ANY.
290pub const WSA_QOS_EFILTERSTYLE = 11019;290 WSAEDESTADDRREQ = 10039,
291pub const WSA_QOS_EFILTERTYPE = 11020;291
292pub const WSA_QOS_EFILTERCOUNT = 11021;292 /// Message too long.
293pub const WSA_QOS_EOBJLENGTH = 11022;293 /// A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram was smaller than the datagram itself.
294pub const WSA_QOS_EFLOWCOUNT = 11023;294 WSAEMSGSIZE = 10040,
295pub const WSA_QOS_EUNKOWNPSOBJ = 11024;295
296pub const WSA_QOS_EPOLICYOBJ = 11025;296 /// Protocol wrong type for socket.
297pub const WSA_QOS_EFLOWDESC = 11026;297 /// A protocol was specified in the socket function call that does not support the semantics of the socket type requested.
298pub const WSA_QOS_EPSFLOWSPEC = 11027;298 /// For example, the ARPA Internet UDP protocol cannot be specified with a socket type of SOCK_STREAM.
299pub const WSA_QOS_EPSFILTERSPEC = 11028;299 WSAEPROTOTYPE = 10041,
300pub const WSA_QOS_ESDMODEOBJ = 11029;300
301pub const WSA_QOS_ESHAPERATEOBJ = 11030;301 /// Bad protocol option.
302pub const WSA_QOS_RESERVED_PETYPE = 11031;302 /// An unknown, invalid or unsupported option or level was specified in a getsockopt or setsockopt call.
303 WSAENOPROTOOPT = 10042,
304
305 /// Protocol not supported.
306 /// The requested protocol has not been configured into the system, or no implementation for it exists.
307 /// For example, a socket call requests a SOCK_DGRAM socket, but specifies a stream protocol.
308 WSAEPROTONOSUPPORT = 10043,
309
310 /// Socket type not supported.
311 /// The support for the specified socket type does not exist in this address family.
312 /// For example, the optional type SOCK_RAW might be selected in a socket call, and the implementation does not support SOCK_RAW sockets at all.
313 WSAESOCKTNOSUPPORT = 10044,
314
315 /// Operation not supported.
316 /// The attempted operation is not supported for the type of object referenced.
317 /// Usually this occurs when a socket descriptor to a socket that cannot support this operation is trying to accept a connection on a datagram socket.
318 WSAEOPNOTSUPP = 10045,
319
320 /// Protocol family not supported.
321 /// The protocol family has not been configured into the system or no implementation for it exists.
322 /// This message has a slightly different meaning from WSAEAFNOSUPPORT.
323 /// However, it is interchangeable in most cases, and all Windows Sockets functions that return one of these messages also specify WSAEAFNOSUPPORT.
324 WSAEPFNOSUPPORT = 10046,
325
326 /// Address family not supported by protocol family.
327 /// An address incompatible with the requested protocol was used.
328 /// All sockets are created with an associated address family (that is, AF_INET for Internet Protocols) and a generic protocol type (that is, SOCK_STREAM).
329 /// This error is returned if an incorrect protocol is explicitly requested in the socket call, or if an address of the wrong family is used for a socket, for example, in sendto.
330 WSAEAFNOSUPPORT = 10047,
331
332 /// Address already in use.
333 /// Typically, only one usage of each socket address (protocol/IP address/port) is permitted.
334 /// This error occurs if an application attempts to bind a socket to an IP address/port that has already been used for an existing socket, or a socket that was not closed properly, or one that is still in the process of closing.
335 /// For server applications that need to bind multiple sockets to the same port number, consider using setsockopt (SO_REUSEADDR).
336 /// Client applications usually need not call bind at all—connect chooses an unused port automatically.
337 /// When bind is called with a wildcard address (involving ADDR_ANY), a WSAEADDRINUSE error could be delayed until the specific address is committed.
338 /// This could happen with a call to another function later, including connect, listen, WSAConnect, or WSAJoinLeaf.
339 WSAEADDRINUSE = 10048,
340
341 /// Cannot assign requested address.
342 /// The requested address is not valid in its context.
343 /// This normally results from an attempt to bind to an address that is not valid for the local computer.
344 /// This can also result from connect, sendto, WSAConnect, WSAJoinLeaf, or WSASendTo when the remote address or port is not valid for a remote computer (for example, address or port 0).
345 WSAEADDRNOTAVAIL = 10049,
346
347 /// Network is down.
348 /// A socket operation encountered a dead network.
349 /// This could indicate a serious failure of the network system (that is, the protocol stack that the Windows Sockets DLL runs over), the network interface, or the local network itself.
350 WSAENETDOWN = 10050,
351
352 /// Network is unreachable.
353 /// A socket operation was attempted to an unreachable network.
354 /// This usually means the local software knows no route to reach the remote host.
355 WSAENETUNREACH = 10051,
356
357 /// Network dropped connection on reset.
358 /// The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress.
359 /// It can also be returned by setsockopt if an attempt is made to set SO_KEEPALIVE on a connection that has already failed.
360 WSAENETRESET = 10052,
361
362 /// Software caused connection abort.
363 /// An established connection was aborted by the software in your host computer, possibly due to a data transmission time-out or protocol error.
364 WSAECONNABORTED = 10053,
365
366 /// Connection reset by peer.
367 /// An existing connection was forcibly closed by the remote host.
368 /// This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, the host or remote network interface is disabled, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket).
369 /// This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress.
370 /// Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET.
371 WSAECONNRESET = 10054,
372
373 /// No buffer space available.
374 /// An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.
375 WSAENOBUFS = 10055,
376
377 /// Socket is already connected.
378 /// A connect request was made on an already-connected socket.
379 /// Some implementations also return this error if sendto is called on a connected SOCK_DGRAM socket (for SOCK_STREAM sockets, the to parameter in sendto is ignored) although other implementations treat this as a legal occurrence.
380 WSAEISCONN = 10056,
381
382 /// Socket is not connected.
383 /// A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using sendto) no address was supplied.
384 /// Any other type of operation might also return this error—for example, setsockopt setting SO_KEEPALIVE if the connection has been reset.
385 WSAENOTCONN = 10057,
386
387 /// Cannot send after socket shutdown.
388 /// A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call.
389 /// By calling shutdown a partial close of a socket is requested, which is a signal that sending or receiving, or both have been discontinued.
390 WSAESHUTDOWN = 10058,
391
392 /// Too many references.
393 /// Too many references to some kernel object.
394 WSAETOOMANYREFS = 10059,
395
396 /// Connection timed out.
397 /// A connection attempt failed because the connected party did not properly respond after a period of time, or the established connection failed because the connected host has failed to respond.
398 WSAETIMEDOUT = 10060,
399
400 /// Connection refused.
401 /// No connection could be made because the target computer actively refused it.
402 /// This usually results from trying to connect to a service that is inactive on the foreign host—that is, one with no server application running.
403 WSAECONNREFUSED = 10061,
404
405 /// Cannot translate name.
406 /// Cannot translate a name.
407 WSAELOOP = 10062,
408
409 /// Name too long.
410 /// A name component or a name was too long.
411 WSAENAMETOOLONG = 10063,
412
413 /// Host is down.
414 /// A socket operation failed because the destination host is down. A socket operation encountered a dead host.
415 /// Networking activity on the local host has not been initiated.
416 /// These conditions are more likely to be indicated by the error WSAETIMEDOUT.
417 WSAEHOSTDOWN = 10064,
418
419 /// No route to host.
420 /// A socket operation was attempted to an unreachable host. See WSAENETUNREACH.
421 WSAEHOSTUNREACH = 10065,
422
423 /// Directory not empty.
424 /// Cannot remove a directory that is not empty.
425 WSAENOTEMPTY = 10066,
426
427 /// Too many processes.
428 /// A Windows Sockets implementation may have a limit on the number of applications that can use it simultaneously.
429 /// WSAStartup may fail with this error if the limit has been reached.
430 WSAEPROCLIM = 10067,
431
432 /// User quota exceeded.
433 /// Ran out of user quota.
434 WSAEUSERS = 10068,
435
436 /// Disk quota exceeded.
437 /// Ran out of disk quota.
438 WSAEDQUOT = 10069,
439
440 /// Stale file handle reference.
441 /// The file handle reference is no longer available.
442 WSAESTALE = 10070,
443
444 /// Item is remote.
445 /// The item is not available locally.
446 WSAEREMOTE = 10071,
447
448 /// Network subsystem is unavailable.
449 /// This error is returned by WSAStartup if the Windows Sockets implementation cannot function at this time because the underlying system it uses to provide network services is currently unavailable.
450 /// Users should check:
451 /// - That the appropriate Windows Sockets DLL file is in the current path.
452 /// - That they are not trying to use more than one Windows Sockets implementation simultaneously.
453 /// - If there is more than one Winsock DLL on your system, be sure the first one in the path is appropriate for the network subsystem currently loaded.
454 /// - The Windows Sockets implementation documentation to be sure all necessary components are currently installed and configured correctly.
455 WSASYSNOTREADY = 10091,
456
457 /// Winsock.dll version out of range.
458 /// The current Windows Sockets implementation does not support the Windows Sockets specification version requested by the application.
459 /// Check that no old Windows Sockets DLL files are being accessed.
460 WSAVERNOTSUPPORTED = 10092,
461
462 /// Successful WSAStartup not yet performed.
463 /// Either the application has not called WSAStartup or WSAStartup failed.
464 /// The application may be accessing a socket that the current active task does not own (that is, trying to share a socket between tasks), or WSACleanup has been called too many times.
465 WSANOTINITIALISED = 10093,
466
467 /// Graceful shutdown in progress.
468 /// Returned by WSARecv and WSARecvFrom to indicate that the remote party has initiated a graceful shutdown sequence.
469 WSAEDISCON = 10101,
470
471 /// No more results.
472 /// No more results can be returned by the WSALookupServiceNext function.
473 WSAENOMORE = 10102,
474
475 /// Call has been canceled.
476 /// A call to the WSALookupServiceEnd function was made while this call was still processing. The call has been canceled.
477 WSAECANCELLED = 10103,
478
479 /// Procedure call table is invalid.
480 /// The service provider procedure call table is invalid.
481 /// A service provider returned a bogus procedure table to Ws2_32.dll.
482 /// This is usually caused by one or more of the function pointers being NULL.
483 WSAEINVALIDPROCTABLE = 10104,
484
485 /// Service provider is invalid.
486 /// The requested service provider is invalid.
487 /// This error is returned by the WSCGetProviderInfo and WSCGetProviderInfo32 functions if the protocol entry specified could not be found.
488 /// This error is also returned if the service provider returned a version number other than 2.0.
489 WSAEINVALIDPROVIDER = 10105,
490
491 /// Service provider failed to initialize.
492 /// The requested service provider could not be loaded or initialized.
493 /// This error is returned if either a service provider's DLL could not be loaded (LoadLibrary failed) or the provider's WSPStartup or NSPStartup function failed.
494 WSAEPROVIDERFAILEDINIT = 10106,
495
496 /// System call failure.
497 /// A system call that should never fail has failed.
498 /// This is a generic error code, returned under various conditions.
499 /// Returned when a system call that should never fail does fail.
500 /// For example, if a call to WaitForMultipleEvents fails or one of the registry functions fails trying to manipulate the protocol/namespace catalogs.
501 /// Returned when a provider does not return SUCCESS and does not provide an extended error code.
502 /// Can indicate a service provider implementation error.
503 WSASYSCALLFAILURE = 10107,
504
505 /// Service not found.
506 /// No such service is known. The service cannot be found in the specified name space.
507 WSASERVICE_NOT_FOUND = 10108,
508
509 /// Class type not found.
510 /// The specified class was not found.
511 WSATYPE_NOT_FOUND = 10109,
512
513 /// No more results.
514 /// No more results can be returned by the WSALookupServiceNext function.
515 WSA_E_NO_MORE = 10110,
516
517 /// Call was canceled.
518 /// A call to the WSALookupServiceEnd function was made while this call was still processing. The call has been canceled.
519 WSA_E_CANCELLED = 10111,
520
521 /// Database query was refused.
522 /// A database query failed because it was actively refused.
523 WSAEREFUSED = 10112,
524
525 /// Host not found.
526 /// No such host is known. The name is not an official host name or alias, or it cannot be found in the database(s) being queried.
527 /// This error may also be returned for protocol and service queries, and means that the specified name could not be found in the relevant database.
528 WSAHOST_NOT_FOUND = 11001,
529
530 /// Nonauthoritative host not found.
531 /// This is usually a temporary error during host name resolution and means that the local server did not receive a response from an authoritative server. A retry at some time later may be successful.
532 WSATRY_AGAIN = 11002,
533
534 /// This is a nonrecoverable error.
535 /// This indicates that some sort of nonrecoverable error occurred during a database lookup.
536 /// This may be because the database files (for example, BSD-compatible HOSTS, SERVICES, or PROTOCOLS files) could not be found, or a DNS request was returned by the server with a severe error.
537 WSANO_RECOVERY = 11003,
538
539 /// Valid name, no data record of requested type.
540 /// The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for.
541 /// The usual example for this is a host name-to-address translation attempt (using gethostbyname or WSAAsyncGetHostByName) which uses the DNS (Domain Name Server).
542 /// An MX record is returned but no A record—indicating the host itself exists, but is not directly reachable.
543 WSANO_DATA = 11004,
544
545 /// QoS receivers.
546 /// At least one QoS reserve has arrived.
547 WSA_QOS_RECEIVERS = 11005,
548
549 /// QoS senders.
550 /// At least one QoS send path has arrived.
551 WSA_QOS_SENDERS = 11006,
552
553 /// No QoS senders.
554 /// There are no QoS senders.
555 WSA_QOS_NO_SENDERS = 11007,
556
557 /// QoS no receivers.
558 /// There are no QoS receivers.
559 WSA_QOS_NO_RECEIVERS = 11008,
560
561 /// QoS request confirmed.
562 /// The QoS reserve request has been confirmed.
563 WSA_QOS_REQUEST_CONFIRMED = 11009,
564
565 /// QoS admission error.
566 /// A QoS error occurred due to lack of resources.
567 WSA_QOS_ADMISSION_FAILURE = 11010,
568
569 /// QoS policy failure.
570 /// The QoS request was rejected because the policy system couldn't allocate the requested resource within the existing policy.
571 WSA_QOS_POLICY_FAILURE = 11011,
572
573 /// QoS bad style.
574 /// An unknown or conflicting QoS style was encountered.
575 WSA_QOS_BAD_STYLE = 11012,
576
577 /// QoS bad object.
578 /// A problem was encountered with some part of the filterspec or the provider-specific buffer in general.
579 WSA_QOS_BAD_OBJECT = 11013,
580
581 /// QoS traffic control error.
582 /// An error with the underlying traffic control (TC) API as the generic QoS request was converted for local enforcement by the TC API.
583 /// This could be due to an out of memory error or to an internal QoS provider error.
584 WSA_QOS_TRAFFIC_CTRL_ERROR = 11014,
585
586 /// QoS generic error.
587 /// A general QoS error.
588 WSA_QOS_GENERIC_ERROR = 11015,
589
590 /// QoS service type error.
591 /// An invalid or unrecognized service type was found in the QoS flowspec.
592 WSA_QOS_ESERVICETYPE = 11016,
593
594 /// QoS flowspec error.
595 /// An invalid or inconsistent flowspec was found in the QOS structure.
596 WSA_QOS_EFLOWSPEC = 11017,
597
598 /// Invalid QoS provider buffer.
599 /// An invalid QoS provider-specific buffer.
600 WSA_QOS_EPROVSPECBUF = 11018,
601
602 /// Invalid QoS filter style.
603 /// An invalid QoS filter style was used.
604 WSA_QOS_EFILTERSTYLE = 11019,
605
606 /// Invalid QoS filter type.
607 /// An invalid QoS filter type was used.
608 WSA_QOS_EFILTERTYPE = 11020,
609
610 /// Incorrect QoS filter count.
611 /// An incorrect number of QoS FILTERSPECs were specified in the FLOWDESCRIPTOR.
612 WSA_QOS_EFILTERCOUNT = 11021,
613
614 /// Invalid QoS object length.
615 /// An object with an invalid ObjectLength field was specified in the QoS provider-specific buffer.
616 WSA_QOS_EOBJLENGTH = 11022,
617
618 /// Incorrect QoS flow count.
619 /// An incorrect number of flow descriptors was specified in the QoS structure.
620 WSA_QOS_EFLOWCOUNT = 11023,
621
622 /// Unrecognized QoS object.
623 /// An unrecognized object was found in the QoS provider-specific buffer.
624 WSA_QOS_EUNKOWNPSOBJ = 11024,
625
626 /// Invalid QoS policy object.
627 /// An invalid policy object was found in the QoS provider-specific buffer.
628 WSA_QOS_EPOLICYOBJ = 11025,
629
630 /// Invalid QoS flow descriptor.
631 /// An invalid QoS flow descriptor was found in the flow descriptor list.
632 WSA_QOS_EFLOWDESC = 11026,
633
634 /// Invalid QoS provider-specific flowspec.
635 /// An invalid or inconsistent flowspec was found in the QoS provider-specific buffer.
636 WSA_QOS_EPSFLOWSPEC = 11027,
637
638 /// Invalid QoS provider-specific filterspec.
639 /// An invalid FILTERSPEC was found in the QoS provider-specific buffer.
640 WSA_QOS_EPSFILTERSPEC = 11028,
641
642 /// Invalid QoS shape discard mode object.
643 /// An invalid shape discard mode object was found in the QoS provider-specific buffer.
644 WSA_QOS_ESDMODEOBJ = 11029,
645
646 /// Invalid QoS shaping rate object.
647 /// An invalid shaping rate object was found in the QoS provider-specific buffer.
648 WSA_QOS_ESHAPERATEOBJ = 11030,
649
650 /// Reserved policy QoS element type.
651 /// A reserved policy element was found in the QoS provider-specific buffer.
652 WSA_QOS_RESERVED_PETYPE = 11031,
653
654 _,
655};
303656
304/// no parameters657/// no parameters
305const IOC_VOID = 0x80000000;658const IOC_VOID = 0x80000000;
...@@ -320,7 +673,7 @@ pub extern "ws2_32" fn WSAStartup(...@@ -320,7 +673,7 @@ pub extern "ws2_32" fn WSAStartup(
320 lpWSAData: *WSADATA,673 lpWSAData: *WSADATA,
321) callconv(.Stdcall) c_int;674) callconv(.Stdcall) c_int;
322pub extern "ws2_32" fn WSACleanup() callconv(.Stdcall) c_int;675pub extern "ws2_32" fn WSACleanup() callconv(.Stdcall) c_int;
323pub extern "ws2_32" fn WSAGetLastError() callconv(.Stdcall) c_int;676pub extern "ws2_32" fn WSAGetLastError() callconv(.Stdcall) WinsockError;
324pub extern "ws2_32" fn WSASocketA(677pub extern "ws2_32" fn WSASocketA(
325 af: c_int,678 af: c_int,
326 type: c_int,679 type: c_int,
lib/std/packed_int_array.zig+2-2
...@@ -604,7 +604,7 @@ test "PackedIntArray at end of available memory" {...@@ -604,7 +604,7 @@ test "PackedIntArray at end of available memory" {
604 p: PackedArray,604 p: PackedArray,
605 };605 };
606606
607 const allocator = std.heap.page_allocator;607 const allocator = std.testing.allocator;
608608
609 var pad = try allocator.create(Padded);609 var pad = try allocator.create(Padded);
610 defer allocator.destroy(pad);610 defer allocator.destroy(pad);
...@@ -618,7 +618,7 @@ test "PackedIntSlice at end of available memory" {...@@ -618,7 +618,7 @@ test "PackedIntSlice at end of available memory" {
618 }618 }
619 const PackedSlice = PackedIntSlice(u11);619 const PackedSlice = PackedIntSlice(u11);
620620
621 const allocator = std.heap.page_allocator;621 const allocator = std.testing.allocator;
622622
623 var page = try allocator.alloc(u8, std.mem.page_size);623 var page = try allocator.alloc(u8, std.mem.page_size);
624 defer allocator.free(page);624 defer allocator.free(page);
lib/std/priority_queue.zig+19-19
...@@ -1,10 +1,10 @@...@@ -1,10 +1,10 @@
1const std = @import("std.zig");1const std = @import("std.zig");
2const Allocator = std.mem.Allocator;2const Allocator = std.mem.Allocator;
3const debug = std.debug;3const assert = std.debug.assert;
4const assert = debug.assert;4const testing = std.testing;
5const expect = std.testing.expect;5const expect = testing.expect;
6const expectEqual = std.testing.expectEqual;6const expectEqual = testing.expectEqual;
7const expectError = std.testing.expectError;7const expectError = testing.expectError;
88
9/// Priority queue for storing generic data. Initialize with `init`.9/// Priority queue for storing generic data. Initialize with `init`.
10pub fn PriorityQueue(comptime T: type) type {10pub fn PriorityQueue(comptime T: type) type {
...@@ -239,7 +239,7 @@ fn greaterThan(a: u32, b: u32) bool {...@@ -239,7 +239,7 @@ fn greaterThan(a: u32, b: u32) bool {
239const PQ = PriorityQueue(u32);239const PQ = PriorityQueue(u32);
240240
241test "std.PriorityQueue: add and remove min heap" {241test "std.PriorityQueue: add and remove min heap" {
242 var queue = PQ.init(debug.global_allocator, lessThan);242 var queue = PQ.init(testing.allocator, lessThan);
243 defer queue.deinit();243 defer queue.deinit();
244244
245 try queue.add(54);245 try queue.add(54);
...@@ -257,7 +257,7 @@ test "std.PriorityQueue: add and remove min heap" {...@@ -257,7 +257,7 @@ test "std.PriorityQueue: add and remove min heap" {
257}257}
258258
259test "std.PriorityQueue: add and remove same min heap" {259test "std.PriorityQueue: add and remove same min heap" {
260 var queue = PQ.init(debug.global_allocator, lessThan);260 var queue = PQ.init(testing.allocator, lessThan);
261 defer queue.deinit();261 defer queue.deinit();
262262
263 try queue.add(1);263 try queue.add(1);
...@@ -275,14 +275,14 @@ test "std.PriorityQueue: add and remove same min heap" {...@@ -275,14 +275,14 @@ test "std.PriorityQueue: add and remove same min heap" {
275}275}
276276
277test "std.PriorityQueue: removeOrNull on empty" {277test "std.PriorityQueue: removeOrNull on empty" {
278 var queue = PQ.init(debug.global_allocator, lessThan);278 var queue = PQ.init(testing.allocator, lessThan);
279 defer queue.deinit();279 defer queue.deinit();
280280
281 expect(queue.removeOrNull() == null);281 expect(queue.removeOrNull() == null);
282}282}
283283
284test "std.PriorityQueue: edge case 3 elements" {284test "std.PriorityQueue: edge case 3 elements" {
285 var queue = PQ.init(debug.global_allocator, lessThan);285 var queue = PQ.init(testing.allocator, lessThan);
286 defer queue.deinit();286 defer queue.deinit();
287287
288 try queue.add(9);288 try queue.add(9);
...@@ -294,7 +294,7 @@ test "std.PriorityQueue: edge case 3 elements" {...@@ -294,7 +294,7 @@ test "std.PriorityQueue: edge case 3 elements" {
294}294}
295295
296test "std.PriorityQueue: peek" {296test "std.PriorityQueue: peek" {
297 var queue = PQ.init(debug.global_allocator, lessThan);297 var queue = PQ.init(testing.allocator, lessThan);
298 defer queue.deinit();298 defer queue.deinit();
299299
300 expect(queue.peek() == null);300 expect(queue.peek() == null);
...@@ -306,7 +306,7 @@ test "std.PriorityQueue: peek" {...@@ -306,7 +306,7 @@ test "std.PriorityQueue: peek" {
306}306}
307307
308test "std.PriorityQueue: sift up with odd indices" {308test "std.PriorityQueue: sift up with odd indices" {
309 var queue = PQ.init(debug.global_allocator, lessThan);309 var queue = PQ.init(testing.allocator, lessThan);
310 defer queue.deinit();310 defer queue.deinit();
311 const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 };311 const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 };
312 for (items) |e| {312 for (items) |e| {
...@@ -320,7 +320,7 @@ test "std.PriorityQueue: sift up with odd indices" {...@@ -320,7 +320,7 @@ test "std.PriorityQueue: sift up with odd indices" {
320}320}
321321
322test "std.PriorityQueue: addSlice" {322test "std.PriorityQueue: addSlice" {
323 var queue = PQ.init(debug.global_allocator, lessThan);323 var queue = PQ.init(testing.allocator, lessThan);
324 defer queue.deinit();324 defer queue.deinit();
325 const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 };325 const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 };
326 try queue.addSlice(items[0..]);326 try queue.addSlice(items[0..]);
...@@ -333,8 +333,8 @@ test "std.PriorityQueue: addSlice" {...@@ -333,8 +333,8 @@ test "std.PriorityQueue: addSlice" {
333333
334test "std.PriorityQueue: fromOwnedSlice" {334test "std.PriorityQueue: fromOwnedSlice" {
335 const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 };335 const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 };
336 const heap_items = try std.mem.dupe(debug.global_allocator, u32, items[0..]);336 const heap_items = try std.mem.dupe(testing.allocator, u32, items[0..]);
337 var queue = PQ.fromOwnedSlice(debug.global_allocator, lessThan, heap_items[0..]);337 var queue = PQ.fromOwnedSlice(testing.allocator, lessThan, heap_items[0..]);
338 defer queue.deinit();338 defer queue.deinit();
339339
340 const sorted_items = [_]u32{ 1, 2, 5, 6, 7, 7, 11, 12, 13, 14, 15, 15, 16, 21, 22, 24, 24, 25 };340 const sorted_items = [_]u32{ 1, 2, 5, 6, 7, 7, 11, 12, 13, 14, 15, 15, 16, 21, 22, 24, 24, 25 };
...@@ -344,7 +344,7 @@ test "std.PriorityQueue: fromOwnedSlice" {...@@ -344,7 +344,7 @@ test "std.PriorityQueue: fromOwnedSlice" {
344}344}
345345
346test "std.PriorityQueue: add and remove max heap" {346test "std.PriorityQueue: add and remove max heap" {
347 var queue = PQ.init(debug.global_allocator, greaterThan);347 var queue = PQ.init(testing.allocator, greaterThan);
348 defer queue.deinit();348 defer queue.deinit();
349349
350 try queue.add(54);350 try queue.add(54);
...@@ -362,7 +362,7 @@ test "std.PriorityQueue: add and remove max heap" {...@@ -362,7 +362,7 @@ test "std.PriorityQueue: add and remove max heap" {
362}362}
363363
364test "std.PriorityQueue: add and remove same max heap" {364test "std.PriorityQueue: add and remove same max heap" {
365 var queue = PQ.init(debug.global_allocator, greaterThan);365 var queue = PQ.init(testing.allocator, greaterThan);
366 defer queue.deinit();366 defer queue.deinit();
367367
368 try queue.add(1);368 try queue.add(1);
...@@ -380,8 +380,8 @@ test "std.PriorityQueue: add and remove same max heap" {...@@ -380,8 +380,8 @@ test "std.PriorityQueue: add and remove same max heap" {
380}380}
381381
382test "std.PriorityQueue: iterator" {382test "std.PriorityQueue: iterator" {
383 var queue = PQ.init(debug.global_allocator, lessThan);383 var queue = PQ.init(testing.allocator, lessThan);
384 var map = std.AutoHashMap(u32, void).init(debug.global_allocator);384 var map = std.AutoHashMap(u32, void).init(testing.allocator);
385 defer {385 defer {
386 queue.deinit();386 queue.deinit();
387 map.deinit();387 map.deinit();
...@@ -402,7 +402,7 @@ test "std.PriorityQueue: iterator" {...@@ -402,7 +402,7 @@ test "std.PriorityQueue: iterator" {
402}402}
403403
404test "std.PriorityQueue: remove at index" {404test "std.PriorityQueue: remove at index" {
405 var queue = PQ.init(debug.global_allocator, lessThan);405 var queue = PQ.init(testing.allocator, lessThan);
406 defer queue.deinit();406 defer queue.deinit();
407407
408 try queue.add(3);408 try queue.add(3);
lib/std/process.zig+6-5
...@@ -79,7 +79,7 @@ pub fn getEnvMap(allocator: *Allocator) !BufMap {...@@ -79,7 +79,7 @@ pub fn getEnvMap(allocator: *Allocator) !BufMap {
79 // https://github.com/WebAssembly/WASI/issues/2779 // https://github.com/WebAssembly/WASI/issues/27
80 var environ = try allocator.alloc(?[*:0]u8, environ_count + 1);80 var environ = try allocator.alloc(?[*:0]u8, environ_count + 1);
81 defer allocator.free(environ);81 defer allocator.free(environ);
82 var environ_buf = try std.heap.page_allocator.alloc(u8, environ_buf_size);82 var environ_buf = try allocator.alloc(u8, environ_buf_size);
83 defer allocator.free(environ_buf);83 defer allocator.free(environ_buf);
8484
85 const environ_get_ret = os.wasi.environ_get(environ.ptr, environ_buf.ptr);85 const environ_get_ret = os.wasi.environ_get(environ.ptr, environ_buf.ptr);
...@@ -114,7 +114,7 @@ pub fn getEnvMap(allocator: *Allocator) !BufMap {...@@ -114,7 +114,7 @@ pub fn getEnvMap(allocator: *Allocator) !BufMap {
114}114}
115115
116test "os.getEnvMap" {116test "os.getEnvMap" {
117 var env = try getEnvMap(std.debug.global_allocator);117 var env = try getEnvMap(std.testing.allocator);
118 defer env.deinit();118 defer env.deinit();
119}119}
120120
...@@ -165,7 +165,7 @@ pub fn getEnvVarOwned(allocator: *mem.Allocator, key: []const u8) GetEnvVarOwned...@@ -165,7 +165,7 @@ pub fn getEnvVarOwned(allocator: *mem.Allocator, key: []const u8) GetEnvVarOwned
165}165}
166166
167test "os.getEnvVarOwned" {167test "os.getEnvVarOwned" {
168 var ga = std.debug.global_allocator;168 var ga = std.testing.allocator;
169 testing.expectError(error.EnvironmentVariableNotFound, getEnvVarOwned(ga, "BADENV"));169 testing.expectError(error.EnvironmentVariableNotFound, getEnvVarOwned(ga, "BADENV"));
170}170}
171171
...@@ -492,10 +492,11 @@ test "windows arg parsing" {...@@ -492,10 +492,11 @@ test "windows arg parsing" {
492fn testWindowsCmdLine(input_cmd_line: [*]const u8, expected_args: []const []const u8) void {492fn testWindowsCmdLine(input_cmd_line: [*]const u8, expected_args: []const []const u8) void {
493 var it = ArgIteratorWindows.initWithCmdLine(input_cmd_line);493 var it = ArgIteratorWindows.initWithCmdLine(input_cmd_line);
494 for (expected_args) |expected_arg| {494 for (expected_args) |expected_arg| {
495 const arg = it.next(std.debug.global_allocator).? catch unreachable;495 const arg = it.next(std.testing.allocator).? catch unreachable;
496 defer std.testing.allocator.free(arg);
496 testing.expectEqualSlices(u8, expected_arg, arg);497 testing.expectEqualSlices(u8, expected_arg, arg);
497 }498 }
498 testing.expect(it.next(std.debug.global_allocator) == null);499 testing.expect(it.next(std.testing.allocator) == null);
499}500}
500501
501pub const UserInfo = struct {502pub const UserInfo = struct {
lib/std/rb.zig+39-15
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1const std = @import("std.zig");1const std = @import("std");
2const assert = std.debug.assert;2const assert = std.debug.assert;
3const testing = std.testing;3const testing = std.testing;
4const Order = std.math.Order;4const Order = std.math.Order;
...@@ -11,6 +11,7 @@ const Red = Color.Red;...@@ -11,6 +11,7 @@ const Red = Color.Red;
11const Black = Color.Black;11const Black = Color.Black;
1212
13const ReplaceError = error{NotEqual};13const ReplaceError = error{NotEqual};
14const SortError = error{NotUnique}; // The new comparison function results in duplicates.
1415
15/// Insert this into your struct that you want to add to a red-black tree.16/// Insert this into your struct that you want to add to a red-black tree.
16/// Do not use a pointer. Turn the *rb.Node results of the functions in rb17/// Do not use a pointer. Turn the *rb.Node results of the functions in rb
...@@ -122,7 +123,8 @@ pub const Node = struct {...@@ -122,7 +123,8 @@ pub const Node = struct {
122 return node;123 return node;
123 }124 }
124125
125 fn getLast(node: *Node) *Node {126 fn getLast(nodeconst: *Node) *Node {
127 var node = nodeconst;
126 while (node.right) |right| {128 while (node.right) |right| {
127 node = right;129 node = right;
128 }130 }
...@@ -132,7 +134,21 @@ pub const Node = struct {...@@ -132,7 +134,21 @@ pub const Node = struct {
132134
133pub const Tree = struct {135pub const Tree = struct {
134 root: ?*Node,136 root: ?*Node,
135 compareFn: fn (*Node, *Node) Order,137 compareFn: fn (*Node, *Node, *Tree) Order,
138
139 /// Re-sorts a tree with a new compare function
140 pub fn sort(tree: *Tree, newCompareFn: fn (*Node, *Node, *Tree) Order) SortError!void {
141 var newTree = Tree.init(newCompareFn);
142 var node: *Node = undefined;
143 while (true) {
144 node = tree.first() orelse break;
145 tree.remove(node);
146 if (newTree.insert(node) != null) {
147 return error.NotUnique; // EEXISTS
148 }
149 }
150 tree.* = newTree;
151 }
136152
137 /// If you have a need for a version that caches this, please file a bug.153 /// If you have a need for a version that caches this, please file a bug.
138 pub fn first(tree: *Tree) ?*Node {154 pub fn first(tree: *Tree) ?*Node {
...@@ -244,6 +260,7 @@ pub const Tree = struct {...@@ -244,6 +260,7 @@ pub const Tree = struct {
244 return doLookup(key, tree, &parent, &is_left);260 return doLookup(key, tree, &parent, &is_left);
245 }261 }
246262
263 /// If node is not part of tree, behavior is undefined.
247 pub fn remove(tree: *Tree, nodeconst: *Node) void {264 pub fn remove(tree: *Tree, nodeconst: *Node) void {
248 var node = nodeconst;265 var node = nodeconst;
249 // as this has the same value as node, it is unsafe to access node after newnode266 // as this has the same value as node, it is unsafe to access node after newnode
...@@ -389,7 +406,7 @@ pub const Tree = struct {...@@ -389,7 +406,7 @@ pub const Tree = struct {
389 var new = newconst;406 var new = newconst;
390407
391 // I assume this can get optimized out if the caller already knows.408 // I assume this can get optimized out if the caller already knows.
392 if (tree.compareFn(old, new) != .eq) return ReplaceError.NotEqual;409 if (tree.compareFn(old, new, tree) != .eq) return ReplaceError.NotEqual;
393410
394 if (old.getParent()) |parent| {411 if (old.getParent()) |parent| {
395 parent.setChild(new, parent.left == old);412 parent.setChild(new, parent.left == old);
...@@ -404,9 +421,11 @@ pub const Tree = struct {...@@ -404,9 +421,11 @@ pub const Tree = struct {
404 new.* = old.*;421 new.* = old.*;
405 }422 }
406423
407 pub fn init(tree: *Tree, f: fn (*Node, *Node) Order) void {424 pub fn init(f: fn (*Node, *Node, *Tree) Order) Tree {
408 tree.root = null;425 return Tree{
409 tree.compareFn = f;426 .root = null,
427 .compareFn = f,
428 };
410 }429 }
411};430};
412431
...@@ -469,7 +488,7 @@ fn doLookup(key: *Node, tree: *Tree, pparent: *?*Node, is_left: *bool) ?*Node {...@@ -469,7 +488,7 @@ fn doLookup(key: *Node, tree: *Tree, pparent: *?*Node, is_left: *bool) ?*Node {
469 is_left.* = false;488 is_left.* = false;
470489
471 while (maybe_node) |node| {490 while (maybe_node) |node| {
472 const res = tree.compareFn(node, key);491 const res = tree.compareFn(node, key, tree);
473 if (res == .eq) {492 if (res == .eq) {
474 return node;493 return node;
475 }494 }
...@@ -498,7 +517,7 @@ fn testGetNumber(node: *Node) *testNumber {...@@ -498,7 +517,7 @@ fn testGetNumber(node: *Node) *testNumber {
498 return @fieldParentPtr(testNumber, "node", node);517 return @fieldParentPtr(testNumber, "node", node);
499}518}
500519
501fn testCompare(l: *Node, r: *Node) Order {520fn testCompare(l: *Node, r: *Node, contextIgnored: *Tree) Order {
502 var left = testGetNumber(l);521 var left = testGetNumber(l);
503 var right = testGetNumber(r);522 var right = testGetNumber(r);
504523
...@@ -512,13 +531,17 @@ fn testCompare(l: *Node, r: *Node) Order {...@@ -512,13 +531,17 @@ fn testCompare(l: *Node, r: *Node) Order {
512 unreachable;531 unreachable;
513}532}
514533
534fn testCompareReverse(l: *Node, r: *Node, contextIgnored: *Tree) Order {
535 return testCompare(r, l, contextIgnored);
536}
537
515test "rb" {538test "rb" {
516 if (@import("builtin").arch == .aarch64) {539 if (@import("builtin").arch == .aarch64) {
517 // TODO https://github.com/ziglang/zig/issues/3288540 // TODO https://github.com/ziglang/zig/issues/3288
518 return error.SkipZigTest;541 return error.SkipZigTest;
519 }542 }
520543
521 var tree: Tree = undefined;544 var tree = Tree.init(testCompare);
522 var ns: [10]testNumber = undefined;545 var ns: [10]testNumber = undefined;
523 ns[0].value = 42;546 ns[0].value = 42;
524 ns[1].value = 41;547 ns[1].value = 41;
...@@ -534,7 +557,6 @@ test "rb" {...@@ -534,7 +557,6 @@ test "rb" {
534 var dup: testNumber = undefined;557 var dup: testNumber = undefined;
535 dup.value = 32345;558 dup.value = 32345;
536559
537 tree.init(testCompare);
538 _ = tree.insert(&ns[1].node);560 _ = tree.insert(&ns[1].node);
539 _ = tree.insert(&ns[2].node);561 _ = tree.insert(&ns[2].node);
540 _ = tree.insert(&ns[3].node);562 _ = tree.insert(&ns[3].node);
...@@ -557,8 +579,7 @@ test "rb" {...@@ -557,8 +579,7 @@ test "rb" {
557}579}
558580
559test "inserting and looking up" {581test "inserting and looking up" {
560 var tree: Tree = undefined;582 var tree = Tree.init(testCompare);
561 tree.init(testCompare);
562 var number: testNumber = undefined;583 var number: testNumber = undefined;
563 number.value = 1000;584 number.value = 1000;
564 _ = tree.insert(&number.node);585 _ = tree.insert(&number.node);
...@@ -582,8 +603,7 @@ test "multiple inserts, followed by calling first and last" {...@@ -582,8 +603,7 @@ test "multiple inserts, followed by calling first and last" {
582 // TODO https://github.com/ziglang/zig/issues/3288603 // TODO https://github.com/ziglang/zig/issues/3288
583 return error.SkipZigTest;604 return error.SkipZigTest;
584 }605 }
585 var tree: Tree = undefined;606 var tree = Tree.init(testCompare);
586 tree.init(testCompare);
587 var zeroth: testNumber = undefined;607 var zeroth: testNumber = undefined;
588 zeroth.value = 0;608 zeroth.value = 0;
589 var first: testNumber = undefined;609 var first: testNumber = undefined;
...@@ -601,4 +621,8 @@ test "multiple inserts, followed by calling first and last" {...@@ -601,4 +621,8 @@ test "multiple inserts, followed by calling first and last" {
601 var lookupNode: testNumber = undefined;621 var lookupNode: testNumber = undefined;
602 lookupNode.value = 3;622 lookupNode.value = 3;
603 assert(tree.lookup(&lookupNode.node) == &third.node);623 assert(tree.lookup(&lookupNode.node) == &third.node);
624 tree.sort(testCompareReverse) catch unreachable;
625 assert(testGetNumber(tree.first().?).value == 3);
626 assert(testGetNumber(tree.last().?).value == 0);
627 assert(tree.lookup(&lookupNode.node) == &third.node);
604}628}
lib/std/reset_event.zig+5-5
...@@ -283,7 +283,7 @@ const AtomicEvent = struct {...@@ -283,7 +283,7 @@ const AtomicEvent = struct {
283 var waiting = wake_count;283 var waiting = wake_count;
284 while (waiting != 0) : (waiting -= 1) {284 while (waiting != 0) : (waiting -= 1) {
285 const rc = windows.ntdll.NtReleaseKeyedEvent(handle, key, windows.FALSE, null);285 const rc = windows.ntdll.NtReleaseKeyedEvent(handle, key, windows.FALSE, null);
286 assert(rc == 0);286 assert(rc == .SUCCESS);
287 }287 }
288 }288 }
289289
...@@ -302,7 +302,7 @@ const AtomicEvent = struct {...@@ -302,7 +302,7 @@ const AtomicEvent = struct {
302 // NtWaitForKeyedEvent doesnt have spurious wake-ups302 // NtWaitForKeyedEvent doesnt have spurious wake-ups
303 var rc = windows.ntdll.NtWaitForKeyedEvent(handle, key, windows.FALSE, timeout_ptr);303 var rc = windows.ntdll.NtWaitForKeyedEvent(handle, key, windows.FALSE, timeout_ptr);
304 switch (rc) {304 switch (rc) {
305 windows.WAIT_TIMEOUT => {305 .TIMEOUT => {
306 // update the wait count to signal that we're not waiting anymore.306 // update the wait count to signal that we're not waiting anymore.
307 // if the .set() thread already observed that we are, perform a307 // if the .set() thread already observed that we are, perform a
308 // matching NtWaitForKeyedEvent so that the .set() thread doesn't308 // matching NtWaitForKeyedEvent so that the .set() thread doesn't
...@@ -311,7 +311,7 @@ const AtomicEvent = struct {...@@ -311,7 +311,7 @@ const AtomicEvent = struct {
311 while (true) {311 while (true) {
312 if (waiting == WAKE) {312 if (waiting == WAKE) {
313 rc = windows.ntdll.NtWaitForKeyedEvent(handle, key, windows.FALSE, null);313 rc = windows.ntdll.NtWaitForKeyedEvent(handle, key, windows.FALSE, null);
314 assert(rc == windows.WAIT_OBJECT_0);314 assert(rc == .WAIT_0);
315 break;315 break;
316 } else {316 } else {
317 waiting = @cmpxchgWeak(u32, waiters, waiting, waiting - WAIT, .Acquire, .Monotonic) orelse break;317 waiting = @cmpxchgWeak(u32, waiters, waiting, waiting - WAIT, .Acquire, .Monotonic) orelse break;
...@@ -320,7 +320,7 @@ const AtomicEvent = struct {...@@ -320,7 +320,7 @@ const AtomicEvent = struct {
320 }320 }
321 return error.TimedOut;321 return error.TimedOut;
322 },322 },
323 windows.WAIT_OBJECT_0 => {},323 .WAIT_0 => {},
324 else => unreachable,324 else => unreachable,
325 }325 }
326 }326 }
...@@ -336,7 +336,7 @@ const AtomicEvent = struct {...@@ -336,7 +336,7 @@ const AtomicEvent = struct {
336 EMPTY => handle = @cmpxchgWeak(usize, &event_handle, EMPTY, LOADING, .Acquire, .Monotonic) orelse {336 EMPTY => handle = @cmpxchgWeak(usize, &event_handle, EMPTY, LOADING, .Acquire, .Monotonic) orelse {
337 const handle_ptr = @ptrCast(*windows.HANDLE, &handle);337 const handle_ptr = @ptrCast(*windows.HANDLE, &handle);
338 const access_mask = windows.GENERIC_READ | windows.GENERIC_WRITE;338 const access_mask = windows.GENERIC_READ | windows.GENERIC_WRITE;
339 if (windows.ntdll.NtCreateKeyedEvent(handle_ptr, access_mask, null, 0) != 0)339 if (windows.ntdll.NtCreateKeyedEvent(handle_ptr, access_mask, null, 0) != .SUCCESS)
340 handle = 0;340 handle = 0;
341 @atomicStore(usize, &event_handle, handle, .Monotonic);341 @atomicStore(usize, &event_handle, handle, .Monotonic);
342 return @intToPtr(?windows.HANDLE, handle);342 return @intToPtr(?windows.HANDLE, handle);
lib/std/segmented_list.zig+1-1
...@@ -339,7 +339,7 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type...@@ -339,7 +339,7 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type
339}339}
340340
341test "std.SegmentedList" {341test "std.SegmentedList" {
342 var a = std.heap.page_allocator;342 var a = std.testing.allocator;
343343
344 try testSegmentedList(0, a);344 try testSegmentedList(0, a);
345 try testSegmentedList(1, a);345 try testSegmentedList(1, a);
lib/std/sort.zig+60
...@@ -5,6 +5,66 @@ const mem = std.mem;...@@ -5,6 +5,66 @@ const mem = std.mem;
5const math = std.math;5const math = std.math;
6const builtin = @import("builtin");6const builtin = @import("builtin");
77
8pub fn binarySearch(comptime T: type, key: T, items: []const T, comptime compareFn: fn (lhs: T, rhs: T) math.Order) ?usize {
9 if (items.len < 1)
10 return null;
11
12 var left: usize = 0;
13 var right: usize = items.len - 1;
14
15 while (left <= right) {
16 // Avoid overflowing in the midpoint calculation
17 const mid = left + (right - left) / 2;
18 // Compare the key with the midpoint element
19 switch (compareFn(key, items[mid])) {
20 .eq => return mid,
21 .gt => left = mid + 1,
22 .lt => right = mid - 1,
23 }
24 }
25
26 return null;
27}
28
29test "std.sort.binarySearch" {
30 const S = struct {
31 fn order_u32(lhs: u32, rhs: u32) math.Order {
32 return math.order(lhs, rhs);
33 }
34 fn order_i32(lhs: i32, rhs: i32) math.Order {
35 return math.order(lhs, rhs);
36 }
37 };
38 testing.expectEqual(
39 @as(?usize, null),
40 binarySearch(u32, 1, &[_]u32{}, S.order_u32),
41 );
42 testing.expectEqual(
43 @as(?usize, 0),
44 binarySearch(u32, 1, &[_]u32{1}, S.order_u32),
45 );
46 testing.expectEqual(
47 @as(?usize, null),
48 binarySearch(u32, 1, &[_]u32{0}, S.order_u32),
49 );
50 testing.expectEqual(
51 @as(?usize, 4),
52 binarySearch(u32, 5, &[_]u32{ 1, 2, 3, 4, 5 }, S.order_u32),
53 );
54 testing.expectEqual(
55 @as(?usize, 0),
56 binarySearch(u32, 2, &[_]u32{ 2, 4, 8, 16, 32, 64 }, S.order_u32),
57 );
58 testing.expectEqual(
59 @as(?usize, 1),
60 binarySearch(i32, -4, &[_]i32{ -7, -4, 0, 9, 10 }, S.order_i32),
61 );
62 testing.expectEqual(
63 @as(?usize, 3),
64 binarySearch(i32, 98, &[_]i32{ -100, -25, 2, 98, 99, 100 }, S.order_i32),
65 );
66}
67
8/// Stable in-place sort. O(n) best case, O(pow(n, 2)) worst case. O(1) memory (no allocator required).68/// Stable in-place sort. O(n) best case, O(pow(n, 2)) worst case. O(1) memory (no allocator required).
9pub fn insertionSort(comptime T: type, items: []T, lessThan: fn (lhs: T, rhs: T) bool) void {69pub fn insertionSort(comptime T: type, items: []T, lessThan: fn (lhs: T, rhs: T) bool) void {
10 var i: usize = 1;70 var i: usize = 1;
lib/std/special/test_runner.zig+6
...@@ -13,6 +13,8 @@ pub fn main() anyerror!void {...@@ -13,6 +13,8 @@ pub fn main() anyerror!void {
13 };13 };
1414
15 for (test_fn_list) |test_fn, i| {15 for (test_fn_list) |test_fn, i| {
16 std.testing.base_allocator_instance.reset();
17
16 var test_node = root_node.start(test_fn.name, null);18 var test_node = root_node.start(test_fn.name, null);
17 test_node.activate();19 test_node.activate();
18 progress.refresh();20 progress.refresh();
...@@ -22,6 +24,10 @@ pub fn main() anyerror!void {...@@ -22,6 +24,10 @@ pub fn main() anyerror!void {
22 if (test_fn.func()) |_| {24 if (test_fn.func()) |_| {
23 ok_count += 1;25 ok_count += 1;
24 test_node.end();26 test_node.end();
27 std.testing.allocator_instance.validate() catch |err| switch (err) {
28 error.Leak => std.debug.panic("", .{}),
29 else => std.debug.panic("error.{}", .{@errorName(err)}),
30 };
25 if (progress.terminal == null) std.debug.warn("OK\n", .{});31 if (progress.terminal == null) std.debug.warn("OK\n", .{});
26 } else |err| switch (err) {32 } else |err| switch (err) {
27 error.SkipZigTest => {33 error.SkipZigTest => {
lib/std/target.zig+17
...@@ -976,6 +976,23 @@ pub const Target = union(enum) {...@@ -976,6 +976,23 @@ pub const Target = union(enum) {
976 }976 }
977 }977 }
978978
979 pub fn getObjectFormat(self: Target) ObjectFormat {
980 switch (self) {
981 .Native => return @import("builtin").object_format,
982 .Cross => blk: {
983 if (self.isWindows() or self.isUefi()) {
984 return .coff;
985 } else if (self.isDarwin()) {
986 return .macho;
987 }
988 if (self.isWasm()) {
989 return .wasm;
990 }
991 return .elf;
992 },
993 }
994 }
995
979 pub fn isMinGW(self: Target) bool {996 pub fn isMinGW(self: Target) bool {
980 return self.isWindows() and self.isGnu();997 return self.isWindows() and self.isGnu();
981 }998 }
lib/std/testing.zig+12
...@@ -2,6 +2,18 @@ const builtin = @import("builtin");...@@ -2,6 +2,18 @@ const builtin = @import("builtin");
2const TypeId = builtin.TypeId;2const TypeId = builtin.TypeId;
3const std = @import("std.zig");3const std = @import("std.zig");
44
5pub const LeakCountAllocator = @import("testing/leak_count_allocator.zig").LeakCountAllocator;
6pub const FailingAllocator = @import("testing/failing_allocator.zig").FailingAllocator;
7
8/// This should only be used in temporary test programs.
9pub const allocator = &allocator_instance.allocator;
10pub var allocator_instance = LeakCountAllocator.init(&base_allocator_instance.allocator);
11
12pub const failing_allocator = &FailingAllocator.init(&base_allocator_instance.allocator, 0).allocator;
13
14pub var base_allocator_instance = std.heap.ThreadSafeFixedBufferAllocator.init(allocator_mem[0..]);
15var allocator_mem: [512 * 1024]u8 = undefined;
16
5/// This function is intended to be used only in tests. It prints diagnostics to stderr17/// This function is intended to be used only in tests. It prints diagnostics to stderr
6/// and then aborts when actual_error_union is not expected_error.18/// and then aborts when actual_error_union is not expected_error.
7pub fn expectError(expected_error: anyerror, actual_error_union: var) void {19pub fn expectError(expected_error: anyerror, actual_error_union: var) void {
lib/std/testing/failing_allocator.zig created+81
...@@ -0,0 +1,81 @@
1const std = @import("../std.zig");
2const mem = std.mem;
3
4/// Allocator that fails after N allocations, useful for making sure out of
5/// memory conditions are handled correctly.
6///
7/// To use this, first initialize it and get an allocator with
8///
9/// `const failing_allocator = &FailingAllocator.init(<allocator>,
10/// <fail_index>).allocator;`
11///
12/// Then use `failing_allocator` anywhere you would have used a
13/// different allocator.
14pub const FailingAllocator = struct {
15 allocator: mem.Allocator,
16 index: usize,
17 fail_index: usize,
18 internal_allocator: *mem.Allocator,
19 allocated_bytes: usize,
20 freed_bytes: usize,
21 allocations: usize,
22 deallocations: usize,
23
24 /// `fail_index` is the number of successful allocations you can
25 /// expect from this allocator. The next allocation will fail.
26 /// For example, if this is called with `fail_index` equal to 2,
27 /// the following test will pass:
28 ///
29 /// var a = try failing_alloc.create(i32);
30 /// var b = try failing_alloc.create(i32);
31 /// testing.expectError(error.OutOfMemory, failing_alloc.create(i32));
32 pub fn init(allocator: *mem.Allocator, fail_index: usize) FailingAllocator {
33 return FailingAllocator{
34 .internal_allocator = allocator,
35 .fail_index = fail_index,
36 .index = 0,
37 .allocated_bytes = 0,
38 .freed_bytes = 0,
39 .allocations = 0,
40 .deallocations = 0,
41 .allocator = mem.Allocator{
42 .reallocFn = realloc,
43 .shrinkFn = shrink,
44 },
45 };
46 }
47
48 fn realloc(allocator: *mem.Allocator, old_mem: []u8, old_align: u29, new_size: usize, new_align: u29) ![]u8 {
49 const self = @fieldParentPtr(FailingAllocator, "allocator", allocator);
50 if (self.index == self.fail_index) {
51 return error.OutOfMemory;
52 }
53 const result = try self.internal_allocator.reallocFn(
54 self.internal_allocator,
55 old_mem,
56 old_align,
57 new_size,
58 new_align,
59 );
60 if (new_size < old_mem.len) {
61 self.freed_bytes += old_mem.len - new_size;
62 if (new_size == 0)
63 self.deallocations += 1;
64 } else if (new_size > old_mem.len) {
65 self.allocated_bytes += new_size - old_mem.len;
66 if (old_mem.len == 0)
67 self.allocations += 1;
68 }
69 self.index += 1;
70 return result;
71 }
72
73 fn shrink(allocator: *mem.Allocator, old_mem: []u8, old_align: u29, new_size: usize, new_align: u29) []u8 {
74 const self = @fieldParentPtr(FailingAllocator, "allocator", allocator);
75 const r = self.internal_allocator.shrinkFn(self.internal_allocator, old_mem, old_align, new_size, new_align);
76 self.freed_bytes += old_mem.len - r.len;
77 if (new_size == 0)
78 self.deallocations += 1;
79 return r;
80 }
81};
lib/std/testing/leak_count_allocator.zig created+50
...@@ -0,0 +1,50 @@
1const std = @import("../std.zig");
2
3/// This allocator is used in front of another allocator and counts the numbers of allocs and frees.
4/// The test runner asserts every alloc has a corresponding free at the end of each test.
5///
6/// The detection algorithm is incredibly primitive and only accounts for number of calls.
7/// This should be replaced by the general purpose debug allocator.
8pub const LeakCountAllocator = struct {
9 count: usize,
10 allocator: std.mem.Allocator,
11 internal_allocator: *std.mem.Allocator,
12
13 pub fn init(allocator: *std.mem.Allocator) LeakCountAllocator {
14 return .{
15 .count = 0,
16 .allocator = .{
17 .reallocFn = realloc,
18 .shrinkFn = shrink,
19 },
20 .internal_allocator = allocator,
21 };
22 }
23
24 fn realloc(allocator: *std.mem.Allocator, old_mem: []u8, old_align: u29, new_size: usize, new_align: u29) ![]u8 {
25 const self = @fieldParentPtr(LeakCountAllocator, "allocator", allocator);
26 var data = try self.internal_allocator.reallocFn(self.internal_allocator, old_mem, old_align, new_size, new_align);
27 if (old_mem.len == 0) {
28 self.count += 1;
29 }
30 return data;
31 }
32
33 fn shrink(allocator: *std.mem.Allocator, old_mem: []u8, old_align: u29, new_size: usize, new_align: u29) []u8 {
34 const self = @fieldParentPtr(LeakCountAllocator, "allocator", allocator);
35 if (new_size == 0) {
36 if (self.count == 0) {
37 std.debug.panic("error - too many calls to free, most likely double free", .{});
38 }
39 self.count -= 1;
40 }
41 return self.internal_allocator.shrinkFn(self.internal_allocator, old_mem, old_align, new_size, new_align);
42 }
43
44 pub fn validate(self: LeakCountAllocator) !void {
45 if (self.count > 0) {
46 std.debug.warn("error - detected leaked allocations without matching free: {}\n", .{self.count});
47 return error.Leak;
48 }
49 }
50};
lib/std/unicode.zig+12-6
...@@ -501,14 +501,16 @@ test "utf16leToUtf8" {...@@ -501,14 +501,16 @@ test "utf16leToUtf8" {
501 {501 {
502 mem.writeIntSliceLittle(u16, utf16le_as_bytes[0..], 'A');502 mem.writeIntSliceLittle(u16, utf16le_as_bytes[0..], 'A');
503 mem.writeIntSliceLittle(u16, utf16le_as_bytes[2..], 'a');503 mem.writeIntSliceLittle(u16, utf16le_as_bytes[2..], 'a');
504 const utf8 = try utf16leToUtf8Alloc(std.debug.global_allocator, &utf16le);504 const utf8 = try utf16leToUtf8Alloc(std.testing.allocator, &utf16le);
505 defer std.testing.allocator.free(utf8);
505 testing.expect(mem.eql(u8, utf8, "Aa"));506 testing.expect(mem.eql(u8, utf8, "Aa"));
506 }507 }
507508
508 {509 {
509 mem.writeIntSliceLittle(u16, utf16le_as_bytes[0..], 0x80);510 mem.writeIntSliceLittle(u16, utf16le_as_bytes[0..], 0x80);
510 mem.writeIntSliceLittle(u16, utf16le_as_bytes[2..], 0xffff);511 mem.writeIntSliceLittle(u16, utf16le_as_bytes[2..], 0xffff);
511 const utf8 = try utf16leToUtf8Alloc(std.debug.global_allocator, &utf16le);512 const utf8 = try utf16leToUtf8Alloc(std.testing.allocator, &utf16le);
513 defer std.testing.allocator.free(utf8);
512 testing.expect(mem.eql(u8, utf8, "\xc2\x80" ++ "\xef\xbf\xbf"));514 testing.expect(mem.eql(u8, utf8, "\xc2\x80" ++ "\xef\xbf\xbf"));
513 }515 }
514516
...@@ -516,7 +518,8 @@ test "utf16leToUtf8" {...@@ -516,7 +518,8 @@ test "utf16leToUtf8" {
516 // the values just outside the surrogate half range518 // the values just outside the surrogate half range
517 mem.writeIntSliceLittle(u16, utf16le_as_bytes[0..], 0xd7ff);519 mem.writeIntSliceLittle(u16, utf16le_as_bytes[0..], 0xd7ff);
518 mem.writeIntSliceLittle(u16, utf16le_as_bytes[2..], 0xe000);520 mem.writeIntSliceLittle(u16, utf16le_as_bytes[2..], 0xe000);
519 const utf8 = try utf16leToUtf8Alloc(std.debug.global_allocator, &utf16le);521 const utf8 = try utf16leToUtf8Alloc(std.testing.allocator, &utf16le);
522 defer std.testing.allocator.free(utf8);
520 testing.expect(mem.eql(u8, utf8, "\xed\x9f\xbf" ++ "\xee\x80\x80"));523 testing.expect(mem.eql(u8, utf8, "\xed\x9f\xbf" ++ "\xee\x80\x80"));
521 }524 }
522525
...@@ -524,7 +527,8 @@ test "utf16leToUtf8" {...@@ -524,7 +527,8 @@ test "utf16leToUtf8" {
524 // smallest surrogate pair527 // smallest surrogate pair
525 mem.writeIntSliceLittle(u16, utf16le_as_bytes[0..], 0xd800);528 mem.writeIntSliceLittle(u16, utf16le_as_bytes[0..], 0xd800);
526 mem.writeIntSliceLittle(u16, utf16le_as_bytes[2..], 0xdc00);529 mem.writeIntSliceLittle(u16, utf16le_as_bytes[2..], 0xdc00);
527 const utf8 = try utf16leToUtf8Alloc(std.debug.global_allocator, &utf16le);530 const utf8 = try utf16leToUtf8Alloc(std.testing.allocator, &utf16le);
531 defer std.testing.allocator.free(utf8);
528 testing.expect(mem.eql(u8, utf8, "\xf0\x90\x80\x80"));532 testing.expect(mem.eql(u8, utf8, "\xf0\x90\x80\x80"));
529 }533 }
530534
...@@ -532,14 +536,16 @@ test "utf16leToUtf8" {...@@ -532,14 +536,16 @@ test "utf16leToUtf8" {
532 // largest surrogate pair536 // largest surrogate pair
533 mem.writeIntSliceLittle(u16, utf16le_as_bytes[0..], 0xdbff);537 mem.writeIntSliceLittle(u16, utf16le_as_bytes[0..], 0xdbff);
534 mem.writeIntSliceLittle(u16, utf16le_as_bytes[2..], 0xdfff);538 mem.writeIntSliceLittle(u16, utf16le_as_bytes[2..], 0xdfff);
535 const utf8 = try utf16leToUtf8Alloc(std.debug.global_allocator, &utf16le);539 const utf8 = try utf16leToUtf8Alloc(std.testing.allocator, &utf16le);
540 defer std.testing.allocator.free(utf8);
536 testing.expect(mem.eql(u8, utf8, "\xf4\x8f\xbf\xbf"));541 testing.expect(mem.eql(u8, utf8, "\xf4\x8f\xbf\xbf"));
537 }542 }
538543
539 {544 {
540 mem.writeIntSliceLittle(u16, utf16le_as_bytes[0..], 0xdbff);545 mem.writeIntSliceLittle(u16, utf16le_as_bytes[0..], 0xdbff);
541 mem.writeIntSliceLittle(u16, utf16le_as_bytes[2..], 0xdc00);546 mem.writeIntSliceLittle(u16, utf16le_as_bytes[2..], 0xdc00);
542 const utf8 = try utf16leToUtf8Alloc(std.debug.global_allocator, &utf16le);547 const utf8 = try utf16leToUtf8Alloc(std.testing.allocator, &utf16le);
548 defer std.testing.allocator.free(utf8);
543 testing.expect(mem.eql(u8, utf8, "\xf4\x8f\xb0\x80"));549 testing.expect(mem.eql(u8, utf8, "\xf4\x8f\xb0\x80"));
544 }550 }
545}551}
lib/std/zig/ast.zig+11-1
...@@ -784,6 +784,11 @@ pub const Node = struct {...@@ -784,6 +784,11 @@ pub const Node = struct {
784 i -= 1;784 i -= 1;
785 }785 }
786786
787 if (self.align_expr) |align_expr| {
788 if (i < 1) return align_expr;
789 i -= 1;
790 }
791
787 if (self.value_expr) |value_expr| {792 if (self.value_expr) |value_expr| {
788 if (i < 1) return value_expr;793 if (i < 1) return value_expr;
789 i -= 1;794 i -= 1;
...@@ -800,6 +805,11 @@ pub const Node = struct {...@@ -800,6 +805,11 @@ pub const Node = struct {
800 if (self.value_expr) |value_expr| {805 if (self.value_expr) |value_expr| {
801 return value_expr.lastToken();806 return value_expr.lastToken();
802 }807 }
808 if (self.align_expr) |align_expr| {
809 // The expression refers to what's inside the parenthesis, the
810 // last token is the closing one
811 return align_expr.lastToken() + 1;
812 }
803 if (self.type_expr) |type_expr| {813 if (self.type_expr) |type_expr| {
804 return type_expr.lastToken();814 return type_expr.lastToken();
805 }815 }
...@@ -2291,7 +2301,7 @@ pub const Node = struct {...@@ -2291,7 +2301,7 @@ pub const Node = struct {
2291test "iterate" {2301test "iterate" {
2292 var root = Node.Root{2302 var root = Node.Root{
2293 .base = Node{ .id = Node.Id.Root },2303 .base = Node{ .id = Node.Id.Root },
2294 .decls = Node.Root.DeclList.init(std.debug.global_allocator),2304 .decls = Node.Root.DeclList.init(std.testing.allocator),
2295 .eof_token = 0,2305 .eof_token = 0,
2296 };2306 };
2297 var base = &root.base;2307 var base = &root.base;
lib/std/zig/parser_test.zig+73-16
...@@ -1,3 +1,71 @@...@@ -1,3 +1,71 @@
1test "zig fmt: trailing comma in container declaration" {
2 try testCanonical(
3 \\const X = struct { foo: i32 };
4 \\const X = struct { foo: i32, bar: i32 };
5 \\const X = struct { foo: i32 = 1, bar: i32 = 2 };
6 \\const X = struct { foo: i32 align(4), bar: i32 align(4) };
7 \\const X = struct { foo: i32 align(4) = 1, bar: i32 align(4) = 2 };
8 \\
9 );
10 try testCanonical(
11 \\test "" {
12 \\ comptime {
13 \\ const X = struct {
14 \\ x: i32
15 \\ };
16 \\ }
17 \\}
18 \\
19 );
20 try testTransform(
21 \\const X = struct {
22 \\ foo: i32, bar: i8 };
23 ,
24 \\const X = struct {
25 \\ foo: i32, bar: i8
26 \\};
27 \\
28 );
29}
30
31test "zig fmt: trailing comma in fn parameter list" {
32 try testCanonical(
33 \\pub fn f(
34 \\ a: i32,
35 \\ b: i32,
36 \\) i32 {}
37 \\pub fn f(
38 \\ a: i32,
39 \\ b: i32,
40 \\) align(8) i32 {}
41 \\pub fn f(
42 \\ a: i32,
43 \\ b: i32,
44 \\) linksection(".text") i32 {}
45 \\pub fn f(
46 \\ a: i32,
47 \\ b: i32,
48 \\) callconv(.C) i32 {}
49 \\pub fn f(
50 \\ a: i32,
51 \\ b: i32,
52 \\) align(8) linksection(".text") i32 {}
53 \\pub fn f(
54 \\ a: i32,
55 \\ b: i32,
56 \\) align(8) callconv(.C) i32 {}
57 \\pub fn f(
58 \\ a: i32,
59 \\ b: i32,
60 \\) align(8) linksection(".text") callconv(.C) i32 {}
61 \\pub fn f(
62 \\ a: i32,
63 \\ b: i32,
64 \\) linksection(".text") callconv(.C) i32 {}
65 \\
66 );
67}
68
1// TODO: Remove condition after deprecating 'typeOf'. See https://github.com/ziglang/zig/issues/134869// TODO: Remove condition after deprecating 'typeOf'. See https://github.com/ziglang/zig/issues/1348
2test "zig fmt: change @typeOf to @TypeOf" {70test "zig fmt: change @typeOf to @TypeOf" {
3 try testTransform(71 try testTransform(
...@@ -689,10 +757,7 @@ test "zig fmt: enum decl with no trailing comma" {...@@ -689,10 +757,7 @@ test "zig fmt: enum decl with no trailing comma" {
689 try testTransform(757 try testTransform(
690 \\const StrLitKind = enum {Normal, C};758 \\const StrLitKind = enum {Normal, C};
691 ,759 ,
692 \\const StrLitKind = enum {760 \\const StrLitKind = enum { Normal, C };
693 \\ Normal,
694 \\ C,
695 \\};
696 \\761 \\
697 );762 );
698}763}
...@@ -946,16 +1011,10 @@ test "zig fmt: empty block with only comment" {...@@ -946,16 +1011,10 @@ test "zig fmt: empty block with only comment" {
946}1011}
9471012
948test "zig fmt: no trailing comma on struct decl" {1013test "zig fmt: no trailing comma on struct decl" {
949 try testTransform(1014 try testCanonical(
950 \\const RoundParam = struct {1015 \\const RoundParam = struct {
951 \\ k: usize, s: u32, t: u321016 \\ k: usize, s: u32, t: u32
952 \\};1017 \\};
953 ,
954 \\const RoundParam = struct {
955 \\ k: usize,
956 \\ s: u32,
957 \\ t: u32,
958 \\};
959 \\1018 \\
960 );1019 );
961}1020}
...@@ -2522,10 +2581,8 @@ test "zig fmt: if type expr" {...@@ -2522,10 +2581,8 @@ test "zig fmt: if type expr" {
2522 );2581 );
2523}2582}
2524test "zig fmt: file ends with struct field" {2583test "zig fmt: file ends with struct field" {
2525 try testTransform(2584 try testCanonical(
2526 \\a: bool2585 \\a: bool
2527 ,
2528 \\a: bool,
2529 \\2586 \\
2530 );2587 );
2531}2588}
...@@ -2773,7 +2830,7 @@ fn testTransform(source: []const u8, expected_source: []const u8) !void {...@@ -2773,7 +2830,7 @@ fn testTransform(source: []const u8, expected_source: []const u8) !void {
2773 const needed_alloc_count = x: {2830 const needed_alloc_count = x: {
2774 // Try it once with unlimited memory, make sure it works2831 // Try it once with unlimited memory, make sure it works
2775 var fixed_allocator = std.heap.FixedBufferAllocator.init(fixed_buffer_mem[0..]);2832 var fixed_allocator = std.heap.FixedBufferAllocator.init(fixed_buffer_mem[0..]);
2776 var failing_allocator = std.debug.FailingAllocator.init(&fixed_allocator.allocator, maxInt(usize));2833 var failing_allocator = std.testing.FailingAllocator.init(&fixed_allocator.allocator, maxInt(usize));
2777 var anything_changed: bool = undefined;2834 var anything_changed: bool = undefined;
2778 const result_source = try testParse(source, &failing_allocator.allocator, &anything_changed);2835 const result_source = try testParse(source, &failing_allocator.allocator, &anything_changed);
2779 if (!mem.eql(u8, result_source, expected_source)) {2836 if (!mem.eql(u8, result_source, expected_source)) {
...@@ -2797,7 +2854,7 @@ fn testTransform(source: []const u8, expected_source: []const u8) !void {...@@ -2797,7 +2854,7 @@ fn testTransform(source: []const u8, expected_source: []const u8) !void {
2797 var fail_index: usize = 0;2854 var fail_index: usize = 0;
2798 while (fail_index < needed_alloc_count) : (fail_index += 1) {2855 while (fail_index < needed_alloc_count) : (fail_index += 1) {
2799 var fixed_allocator = std.heap.FixedBufferAllocator.init(fixed_buffer_mem[0..]);2856 var fixed_allocator = std.heap.FixedBufferAllocator.init(fixed_buffer_mem[0..]);
2800 var failing_allocator = std.debug.FailingAllocator.init(&fixed_allocator.allocator, fail_index);2857 var failing_allocator = std.testing.FailingAllocator.init(&fixed_allocator.allocator, fail_index);
2801 var anything_changed: bool = undefined;2858 var anything_changed: bool = undefined;
2802 if (testParse(source, &failing_allocator.allocator, &anything_changed)) |_| {2859 if (testParse(source, &failing_allocator.allocator, &anything_changed)) |_| {
2803 return error.NondeterministicMemoryUsage;2860 return error.NondeterministicMemoryUsage;
lib/std/zig/perf_test.zig+1-1
...@@ -25,7 +25,7 @@ pub fn main() !void {...@@ -25,7 +25,7 @@ pub fn main() !void {
2525
26 var stdout_file = std.io.getStdOut();26 var stdout_file = std.io.getStdOut();
27 const stdout = &stdout_file.outStream().stream;27 const stdout = &stdout_file.outStream().stream;
28 try stdout.print("{:.3} MiB/s, {} KiB used \n", .{mb_per_sec, memory_used / 1024});28 try stdout.print("{:.3} MiB/s, {} KiB used \n", .{ mb_per_sec, memory_used / 1024 });
29}29}
3030
31fn testOnce() usize {31fn testOnce() usize {
lib/std/zig/render.zig+125-44
...@@ -206,6 +206,10 @@ fn renderExtraNewline(tree: *ast.Tree, stream: var, start_col: *usize, node: *as...@@ -206,6 +206,10 @@ fn renderExtraNewline(tree: *ast.Tree, stream: var, start_col: *usize, node: *as
206}206}
207207
208fn renderTopLevelDecl(allocator: *mem.Allocator, stream: var, tree: *ast.Tree, indent: usize, start_col: *usize, decl: *ast.Node) (@TypeOf(stream).Child.Error || Error)!void {208fn renderTopLevelDecl(allocator: *mem.Allocator, stream: var, tree: *ast.Tree, indent: usize, start_col: *usize, decl: *ast.Node) (@TypeOf(stream).Child.Error || Error)!void {
209 try renderContainerDecl(allocator, stream, tree, indent, start_col, decl, .Newline);
210}
211
212fn renderContainerDecl(allocator: *mem.Allocator, stream: var, tree: *ast.Tree, indent: usize, start_col: *usize, decl: *ast.Node, space: Space) (@TypeOf(stream).Child.Error || Error)!void {
209 switch (decl.id) {213 switch (decl.id) {
210 .FnProto => {214 .FnProto => {
211 const fn_proto = @fieldParentPtr(ast.Node.FnProto, "base", decl);215 const fn_proto = @fieldParentPtr(ast.Node.FnProto, "base", decl);
...@@ -213,11 +217,11 @@ fn renderTopLevelDecl(allocator: *mem.Allocator, stream: var, tree: *ast.Tree, i...@@ -213,11 +217,11 @@ fn renderTopLevelDecl(allocator: *mem.Allocator, stream: var, tree: *ast.Tree, i
213 try renderDocComments(tree, stream, fn_proto, indent, start_col);217 try renderDocComments(tree, stream, fn_proto, indent, start_col);
214218
215 if (fn_proto.body_node) |body_node| {219 if (fn_proto.body_node) |body_node| {
216 try renderExpression(allocator, stream, tree, indent, start_col, decl, Space.Space);220 try renderExpression(allocator, stream, tree, indent, start_col, decl, .Space);
217 try renderExpression(allocator, stream, tree, indent, start_col, body_node, Space.Newline);221 try renderExpression(allocator, stream, tree, indent, start_col, body_node, space);
218 } else {222 } else {
219 try renderExpression(allocator, stream, tree, indent, start_col, decl, Space.None);223 try renderExpression(allocator, stream, tree, indent, start_col, decl, .None);
220 try renderToken(tree, stream, tree.nextToken(decl.lastToken()), indent, start_col, Space.Newline);224 try renderToken(tree, stream, tree.nextToken(decl.lastToken()), indent, start_col, space);
221 }225 }
222 },226 },
223227
...@@ -225,11 +229,11 @@ fn renderTopLevelDecl(allocator: *mem.Allocator, stream: var, tree: *ast.Tree, i...@@ -225,11 +229,11 @@ fn renderTopLevelDecl(allocator: *mem.Allocator, stream: var, tree: *ast.Tree, i
225 const use_decl = @fieldParentPtr(ast.Node.Use, "base", decl);229 const use_decl = @fieldParentPtr(ast.Node.Use, "base", decl);
226230
227 if (use_decl.visib_token) |visib_token| {231 if (use_decl.visib_token) |visib_token| {
228 try renderToken(tree, stream, visib_token, indent, start_col, Space.Space); // pub232 try renderToken(tree, stream, visib_token, indent, start_col, .Space); // pub
229 }233 }
230 try renderToken(tree, stream, use_decl.use_token, indent, start_col, Space.Space); // usingnamespace234 try renderToken(tree, stream, use_decl.use_token, indent, start_col, .Space); // usingnamespace
231 try renderExpression(allocator, stream, tree, indent, start_col, use_decl.expr, Space.None);235 try renderExpression(allocator, stream, tree, indent, start_col, use_decl.expr, .None);
232 try renderToken(tree, stream, use_decl.semicolon_token, indent, start_col, Space.Newline); // ;236 try renderToken(tree, stream, use_decl.semicolon_token, indent, start_col, space); // ;
233 },237 },
234238
235 .VarDecl => {239 .VarDecl => {
...@@ -243,9 +247,9 @@ fn renderTopLevelDecl(allocator: *mem.Allocator, stream: var, tree: *ast.Tree, i...@@ -243,9 +247,9 @@ fn renderTopLevelDecl(allocator: *mem.Allocator, stream: var, tree: *ast.Tree, i
243 const test_decl = @fieldParentPtr(ast.Node.TestDecl, "base", decl);247 const test_decl = @fieldParentPtr(ast.Node.TestDecl, "base", decl);
244248
245 try renderDocComments(tree, stream, test_decl, indent, start_col);249 try renderDocComments(tree, stream, test_decl, indent, start_col);
246 try renderToken(tree, stream, test_decl.test_token, indent, start_col, Space.Space);250 try renderToken(tree, stream, test_decl.test_token, indent, start_col, .Space);
247 try renderExpression(allocator, stream, tree, indent, start_col, test_decl.name, Space.Space);251 try renderExpression(allocator, stream, tree, indent, start_col, test_decl.name, .Space);
248 try renderExpression(allocator, stream, tree, indent, start_col, test_decl.body_node, Space.Newline);252 try renderExpression(allocator, stream, tree, indent, start_col, test_decl.body_node, space);
249 },253 },
250254
251 .ContainerField => {255 .ContainerField => {
...@@ -253,62 +257,76 @@ fn renderTopLevelDecl(allocator: *mem.Allocator, stream: var, tree: *ast.Tree, i...@@ -253,62 +257,76 @@ fn renderTopLevelDecl(allocator: *mem.Allocator, stream: var, tree: *ast.Tree, i
253257
254 try renderDocComments(tree, stream, field, indent, start_col);258 try renderDocComments(tree, stream, field, indent, start_col);
255 if (field.comptime_token) |t| {259 if (field.comptime_token) |t| {
256 try renderToken(tree, stream, t, indent, start_col, Space.Space); // comptime260 try renderToken(tree, stream, t, indent, start_col, .Space); // comptime
257 }261 }
258262
263 const src_has_trailing_comma = blk: {
264 const maybe_comma = tree.nextToken(field.lastToken());
265 break :blk tree.tokens.at(maybe_comma).id == .Comma;
266 };
267
268 // The trailing comma is emitted at the end, but if it's not present
269 // we still have to respect the specified `space` parameter
270 const last_token_space: Space = if (src_has_trailing_comma) .None else space;
271
259 if (field.type_expr == null and field.value_expr == null) {272 if (field.type_expr == null and field.value_expr == null) {
260 return renderToken(tree, stream, field.name_token, indent, start_col, Space.Comma); // name,273 try renderToken(tree, stream, field.name_token, indent, start_col, last_token_space); // name
261 } else if (field.type_expr != null and field.value_expr == null) {274 } else if (field.type_expr != null and field.value_expr == null) {
262 try renderToken(tree, stream, field.name_token, indent, start_col, Space.None); // name275 try renderToken(tree, stream, field.name_token, indent, start_col, .None); // name
263 try renderToken(tree, stream, tree.nextToken(field.name_token), indent, start_col, Space.Space); // :276 try renderToken(tree, stream, tree.nextToken(field.name_token), indent, start_col, .Space); // :
264277
265 if (field.align_expr) |align_value_expr| {278 if (field.align_expr) |align_value_expr| {
266 try renderExpression(allocator, stream, tree, indent, start_col, field.type_expr.?, Space.Space); // type279 try renderExpression(allocator, stream, tree, indent, start_col, field.type_expr.?, .Space); // type
267 const lparen_token = tree.prevToken(align_value_expr.firstToken());280 const lparen_token = tree.prevToken(align_value_expr.firstToken());
268 const align_kw = tree.prevToken(lparen_token);281 const align_kw = tree.prevToken(lparen_token);
269 const rparen_token = tree.nextToken(align_value_expr.lastToken());282 const rparen_token = tree.nextToken(align_value_expr.lastToken());
270 try renderToken(tree, stream, align_kw, indent, start_col, Space.None); // align283 try renderToken(tree, stream, align_kw, indent, start_col, .None); // align
271 try renderToken(tree, stream, lparen_token, indent, start_col, Space.None); // (284 try renderToken(tree, stream, lparen_token, indent, start_col, .None); // (
272 try renderExpression(allocator, stream, tree, indent, start_col, align_value_expr, Space.None); // alignment285 try renderExpression(allocator, stream, tree, indent, start_col, align_value_expr, .None); // alignment
273 try renderToken(tree, stream, rparen_token, indent, start_col, Space.Comma); // ),286 try renderToken(tree, stream, rparen_token, indent, start_col, last_token_space); // )
274 } else {287 } else {
275 try renderExpression(allocator, stream, tree, indent, start_col, field.type_expr.?, Space.Comma); // type,288 try renderExpression(allocator, stream, tree, indent, start_col, field.type_expr.?, last_token_space); // type
276 }289 }
277 } else if (field.type_expr == null and field.value_expr != null) {290 } else if (field.type_expr == null and field.value_expr != null) {
278 try renderToken(tree, stream, field.name_token, indent, start_col, Space.Space); // name291 try renderToken(tree, stream, field.name_token, indent, start_col, .Space); // name
279 try renderToken(tree, stream, tree.nextToken(field.name_token), indent, start_col, Space.Space); // =292 try renderToken(tree, stream, tree.nextToken(field.name_token), indent, start_col, .Space); // =
280 return renderExpression(allocator, stream, tree, indent, start_col, field.value_expr.?, Space.Comma); // value293 try renderExpression(allocator, stream, tree, indent, start_col, field.value_expr.?, last_token_space); // value
281 } else {294 } else {
282 try renderToken(tree, stream, field.name_token, indent, start_col, Space.None); // name295 try renderToken(tree, stream, field.name_token, indent, start_col, .None); // name
283 try renderToken(tree, stream, tree.nextToken(field.name_token), indent, start_col, Space.Space); // :296 try renderToken(tree, stream, tree.nextToken(field.name_token), indent, start_col, .Space); // :
284297
285 if (field.align_expr) |align_value_expr| {298 if (field.align_expr) |align_value_expr| {
286 try renderExpression(allocator, stream, tree, indent, start_col, field.type_expr.?, Space.Space); // type299 try renderExpression(allocator, stream, tree, indent, start_col, field.type_expr.?, .Space); // type
287 const lparen_token = tree.prevToken(align_value_expr.firstToken());300 const lparen_token = tree.prevToken(align_value_expr.firstToken());
288 const align_kw = tree.prevToken(lparen_token);301 const align_kw = tree.prevToken(lparen_token);
289 const rparen_token = tree.nextToken(align_value_expr.lastToken());302 const rparen_token = tree.nextToken(align_value_expr.lastToken());
290 try renderToken(tree, stream, align_kw, indent, start_col, Space.None); // align303 try renderToken(tree, stream, align_kw, indent, start_col, .None); // align
291 try renderToken(tree, stream, lparen_token, indent, start_col, Space.None); // (304 try renderToken(tree, stream, lparen_token, indent, start_col, .None); // (
292 try renderExpression(allocator, stream, tree, indent, start_col, align_value_expr, Space.None); // alignment305 try renderExpression(allocator, stream, tree, indent, start_col, align_value_expr, .None); // alignment
293 try renderToken(tree, stream, rparen_token, indent, start_col, Space.Space); // )306 try renderToken(tree, stream, rparen_token, indent, start_col, .Space); // )
294 } else {307 } else {
295 try renderExpression(allocator, stream, tree, indent, start_col, field.type_expr.?, Space.Space); // type308 try renderExpression(allocator, stream, tree, indent, start_col, field.type_expr.?, .Space); // type
296 }309 }
297 try renderToken(tree, stream, tree.prevToken(field.value_expr.?.firstToken()), indent, start_col, Space.Space); // =310 try renderToken(tree, stream, tree.prevToken(field.value_expr.?.firstToken()), indent, start_col, .Space); // =
298 return renderExpression(allocator, stream, tree, indent, start_col, field.value_expr.?, Space.Comma); // value,311 try renderExpression(allocator, stream, tree, indent, start_col, field.value_expr.?, last_token_space); // value
312 }
313
314 if (src_has_trailing_comma) {
315 const comma = tree.nextToken(field.lastToken());
316 try renderToken(tree, stream, comma, indent, start_col, space);
299 }317 }
300 },318 },
301319
302 .Comptime => {320 .Comptime => {
303 assert(!decl.requireSemiColon());321 assert(!decl.requireSemiColon());
304 try renderExpression(allocator, stream, tree, indent, start_col, decl, Space.Newline);322 try renderExpression(allocator, stream, tree, indent, start_col, decl, space);
305 },323 },
306324
307 .DocComment => {325 .DocComment => {
308 const comment = @fieldParentPtr(ast.Node.DocComment, "base", decl);326 const comment = @fieldParentPtr(ast.Node.DocComment, "base", decl);
309 var it = comment.lines.iterator(0);327 var it = comment.lines.iterator(0);
310 while (it.next()) |line_token_index| {328 while (it.next()) |line_token_index| {
311 try renderToken(tree, stream, line_token_index.*, indent, start_col, Space.Newline);329 try renderToken(tree, stream, line_token_index.*, indent, start_col, .Newline);
312 if (it.peek()) |_| {330 if (it.peek()) |_| {
313 try stream.writeByteNTimes(' ', indent);331 try stream.writeByteNTimes(' ', indent);
314 }332 }
...@@ -1150,14 +1168,42 @@ fn renderExpression(...@@ -1150,14 +1168,42 @@ fn renderExpression(
1150 if (container_decl.fields_and_decls.len == 0) {1168 if (container_decl.fields_and_decls.len == 0) {
1151 try renderToken(tree, stream, container_decl.lbrace_token, indent + indent_delta, start_col, Space.None); // {1169 try renderToken(tree, stream, container_decl.lbrace_token, indent + indent_delta, start_col, Space.None); // {
1152 return renderToken(tree, stream, container_decl.rbrace_token, indent, start_col, space); // }1170 return renderToken(tree, stream, container_decl.rbrace_token, indent, start_col, space); // }
1153 } else {1171 }
1172
1173 const src_has_trailing_comma = blk: {
1174 var maybe_comma = tree.prevToken(container_decl.lastToken());
1175 // Doc comments for a field may also appear after the comma, eg.
1176 // field_name: T, // comment attached to field_name
1177 if (tree.tokens.at(maybe_comma).id == .DocComment)
1178 maybe_comma = tree.prevToken(maybe_comma);
1179 break :blk tree.tokens.at(maybe_comma).id == .Comma;
1180 };
1181
1182 // Check if the first declaration and the { are on the same line
1183 const src_has_newline = !tree.tokensOnSameLine(
1184 container_decl.lbrace_token,
1185 container_decl.fields_and_decls.at(0).*.firstToken(),
1186 );
1187
1188 // We can only print all the elements in-line if all the
1189 // declarations inside are fields
1190 const src_has_only_fields = blk: {
1191 var it = container_decl.fields_and_decls.iterator(0);
1192 while (it.next()) |decl| {
1193 if (decl.*.id != .ContainerField) break :blk false;
1194 }
1195 break :blk true;
1196 };
1197
1198 if (src_has_trailing_comma or !src_has_only_fields) {
1199 // One declaration per line
1154 const new_indent = indent + indent_delta;1200 const new_indent = indent + indent_delta;
1155 try renderToken(tree, stream, container_decl.lbrace_token, new_indent, start_col, Space.Newline); // {1201 try renderToken(tree, stream, container_decl.lbrace_token, new_indent, start_col, .Newline); // {
11561202
1157 var it = container_decl.fields_and_decls.iterator(0);1203 var it = container_decl.fields_and_decls.iterator(0);
1158 while (it.next()) |decl| {1204 while (it.next()) |decl| {
1159 try stream.writeByteNTimes(' ', new_indent);1205 try stream.writeByteNTimes(' ', new_indent);
1160 try renderTopLevelDecl(allocator, stream, tree, new_indent, start_col, decl.*);1206 try renderContainerDecl(allocator, stream, tree, new_indent, start_col, decl.*, .Newline);
11611207
1162 if (it.peek()) |next_decl| {1208 if (it.peek()) |next_decl| {
1163 try renderExtraNewline(tree, stream, start_col, next_decl.*);1209 try renderExtraNewline(tree, stream, start_col, next_decl.*);
...@@ -1165,8 +1211,32 @@ fn renderExpression(...@@ -1165,8 +1211,32 @@ fn renderExpression(
1165 }1211 }
11661212
1167 try stream.writeByteNTimes(' ', indent);1213 try stream.writeByteNTimes(' ', indent);
1168 return renderToken(tree, stream, container_decl.rbrace_token, indent, start_col, space); // }1214 } else if (src_has_newline) {
1215 // All the declarations on the same line, but place the items on
1216 // their own line
1217 try renderToken(tree, stream, container_decl.lbrace_token, indent, start_col, .Newline); // {
1218
1219 const new_indent = indent + indent_delta;
1220 try stream.writeByteNTimes(' ', new_indent);
1221
1222 var it = container_decl.fields_and_decls.iterator(0);
1223 while (it.next()) |decl| {
1224 const space_after_decl: Space = if (it.peek() == null) .Newline else .Space;
1225 try renderContainerDecl(allocator, stream, tree, new_indent, start_col, decl.*, space_after_decl);
1226 }
1227
1228 try stream.writeByteNTimes(' ', indent);
1229 } else {
1230 // All the declarations on the same line
1231 try renderToken(tree, stream, container_decl.lbrace_token, indent, start_col, .Space); // {
1232
1233 var it = container_decl.fields_and_decls.iterator(0);
1234 while (it.next()) |decl| {
1235 try renderContainerDecl(allocator, stream, tree, indent, start_col, decl.*, .Space);
1236 }
1169 }1237 }
1238
1239 return renderToken(tree, stream, container_decl.rbrace_token, indent, start_col, space); // }
1170 },1240 },
11711241
1172 .ErrorSetDecl => {1242 .ErrorSetDecl => {
...@@ -1344,11 +1414,22 @@ fn renderExpression(...@@ -1344,11 +1414,22 @@ fn renderExpression(
1344 try renderToken(tree, stream, fn_proto.fn_token, indent, start_col, Space.Space); // fn1414 try renderToken(tree, stream, fn_proto.fn_token, indent, start_col, Space.Space); // fn
1345 break :blk tree.nextToken(fn_proto.fn_token);1415 break :blk tree.nextToken(fn_proto.fn_token);
1346 };1416 };
13471417 assert(tree.tokens.at(lparen).id == .LParen);
1348 const rparen = tree.prevToken(switch (fn_proto.return_type) {1418
1349 ast.Node.FnProto.ReturnType.Explicit => |node| node.firstToken(),1419 const rparen = tree.prevToken(
1350 ast.Node.FnProto.ReturnType.InferErrorSet => |node| tree.prevToken(node.firstToken()),1420 // the first token for the annotation expressions is the left
1421 // parenthesis, hence the need for two prevToken
1422 if (fn_proto.align_expr) |align_expr|
1423 tree.prevToken(tree.prevToken(align_expr.firstToken()))
1424 else if (fn_proto.section_expr) |section_expr|
1425 tree.prevToken(tree.prevToken(section_expr.firstToken()))
1426 else if (fn_proto.callconv_expr) |callconv_expr|
1427 tree.prevToken(tree.prevToken(callconv_expr.firstToken()))
1428 else switch (fn_proto.return_type) {
1429 .Explicit => |node| node.firstToken(),
1430 .InferErrorSet => |node| tree.prevToken(node.firstToken()),
1351 });1431 });
1432 assert(tree.tokens.at(rparen).id == .RParen);
13521433
1353 const src_params_trailing_comma = blk: {1434 const src_params_trailing_comma = blk: {
1354 const maybe_comma = tree.tokens.at(rparen - 1).id;1435 const maybe_comma = tree.tokens.at(rparen - 1).id;
src-self-hosted/c_tokenizer.zig+2-2
...@@ -866,7 +866,7 @@ fn expectTokens(tl: *TokenList, src: [*:0]const u8, expected: []CToken) void {...@@ -866,7 +866,7 @@ fn expectTokens(tl: *TokenList, src: [*:0]const u8, expected: []CToken) void {
866}866}
867867
868test "tokenize macro" {868test "tokenize macro" {
869 var tl = TokenList.init(std.heap.page_allocator);869 var tl = TokenList.init(std.testing.allocator);
870 defer tl.deinit();870 defer tl.deinit();
871871
872 expectTokens(&tl, "TEST(0\n", &[_]CToken{872 expectTokens(&tl, "TEST(0\n", &[_]CToken{
...@@ -904,7 +904,7 @@ test "tokenize macro" {...@@ -904,7 +904,7 @@ test "tokenize macro" {
904}904}
905905
906test "tokenize macro ops" {906test "tokenize macro ops" {
907 var tl = TokenList.init(std.heap.page_allocator);907 var tl = TokenList.init(std.testing.allocator);
908 defer tl.deinit();908 defer tl.deinit();
909909
910 expectTokens(&tl, "ADD A + B", &[_]CToken{910 expectTokens(&tl, "ADD A + B", &[_]CToken{
src-self-hosted/codegen.zig+1-1
...@@ -31,7 +31,7 @@ pub async fn renderToLlvm(comp: *Compilation, fn_val: *Value.Fn, code: *ir.Code)...@@ -31,7 +31,7 @@ pub async fn renderToLlvm(comp: *Compilation, fn_val: *Value.Fn, code: *ir.Code)
31 llvm.SetTarget(module, comp.llvm_triple.toSliceConst());31 llvm.SetTarget(module, comp.llvm_triple.toSliceConst());
32 llvm.SetDataLayout(module, comp.target_layout_str);32 llvm.SetDataLayout(module, comp.target_layout_str);
3333
34 if (util.getObjectFormat(comp.target) == .coff) {34 if (comp.target.getObjectFormat() == .coff) {
35 llvm.AddModuleCodeViewFlag(module);35 llvm.AddModuleCodeViewFlag(module);
36 } else {36 } else {
37 llvm.AddModuleDebugInfoFlag(module);37 llvm.AddModuleDebugInfoFlag(module);
src-self-hosted/dep_tokenizer.zig+1-1
...@@ -894,7 +894,7 @@ fn printSection(out: var, label: []const u8, bytes: []const u8) !void {...@@ -894,7 +894,7 @@ fn printSection(out: var, label: []const u8, bytes: []const u8) !void {
894894
895fn printLabel(out: var, label: []const u8, bytes: []const u8) !void {895fn printLabel(out: var, label: []const u8, bytes: []const u8) !void {
896 var buf: [80]u8 = undefined;896 var buf: [80]u8 = undefined;
897 var text = try std.fmt.bufPrint(buf[0..], "{} {} bytes ", .{label, bytes.len});897 var text = try std.fmt.bufPrint(buf[0..], "{} {} bytes ", .{ label, bytes.len });
898 try out.write(text);898 try out.write(text);
899 var i: usize = text.len;899 var i: usize = text.len;
900 const end = 79;900 const end = 79;
src-self-hosted/link.zig+3-3
...@@ -76,7 +76,7 @@ pub fn link(comp: *Compilation) !void {...@@ -76,7 +76,7 @@ pub fn link(comp: *Compilation) !void {
76 std.debug.warn("\n", .{});76 std.debug.warn("\n", .{});
77 }77 }
7878
79 const extern_ofmt = toExternObjectFormatType(util.getObjectFormat(comp.target));79 const extern_ofmt = toExternObjectFormatType(comp.target.getObjectFormat());
80 const args_slice = ctx.args.toSlice();80 const args_slice = ctx.args.toSlice();
8181
82 {82 {
...@@ -105,7 +105,7 @@ extern fn ZigLLDLink(...@@ -105,7 +105,7 @@ extern fn ZigLLDLink(
105 context: *c_void,105 context: *c_void,
106) bool;106) bool;
107107
108extern fn linkDiagCallback(context: *c_void, ptr: [*]const u8, len: usize) void {108fn linkDiagCallback(context: *c_void, ptr: [*]const u8, len: usize) callconv(.C) void {
109 const ctx = @ptrCast(*Context, @alignCast(@alignOf(Context), context));109 const ctx = @ptrCast(*Context, @alignCast(@alignOf(Context), context));
110 ctx.link_err = linkDiagCallbackErrorable(ctx, ptr[0..len]);110 ctx.link_err = linkDiagCallbackErrorable(ctx, ptr[0..len]);
111}111}
...@@ -128,7 +128,7 @@ fn toExternObjectFormatType(ofmt: ObjectFormat) c.ZigLLVM_ObjectFormatType {...@@ -128,7 +128,7 @@ fn toExternObjectFormatType(ofmt: ObjectFormat) c.ZigLLVM_ObjectFormatType {
128}128}
129129
130fn constructLinkerArgs(ctx: *Context) !void {130fn constructLinkerArgs(ctx: *Context) !void {
131 switch (util.getObjectFormat(ctx.comp.target)) {131 switch (ctx.comp.target.getObjectFormat()) {
132 .unknown => unreachable,132 .unknown => unreachable,
133 .coff => return constructLinkerArgsCoff(ctx),133 .coff => return constructLinkerArgsCoff(ctx),
134 .elf => return constructLinkerArgsElf(ctx),134 .elf => return constructLinkerArgsElf(ctx),
src-self-hosted/translate_c.zig+35-28
...@@ -1991,6 +1991,29 @@ fn transInitListExprRecord(...@@ -1991,6 +1991,29 @@ fn transInitListExprRecord(
1991 return &init_node.base;1991 return &init_node.base;
1992}1992}
19931993
1994fn transCreateNodeArrayType(
1995 rp: RestorePoint,
1996 source_loc: ZigClangSourceLocation,
1997 ty: *const ZigClangType,
1998 len: var,
1999) TransError!*ast.Node {
2000 var node = try transCreateNodePrefixOp(
2001 rp.c,
2002 .{
2003 .ArrayType = .{
2004 .len_expr = undefined,
2005 .sentinel = null,
2006 },
2007 },
2008 .LBracket,
2009 "[",
2010 );
2011 node.op.ArrayType.len_expr = try transCreateNodeInt(rp.c, len);
2012 _ = try appendToken(rp.c, .RBracket, "]");
2013 node.rhs = try transType(rp, ty, source_loc);
2014 return &node.base;
2015}
2016
1994fn transInitListExprArray(2017fn transInitListExprArray(
1995 rp: RestorePoint,2018 rp: RestorePoint,
1996 scope: *Scope,2019 scope: *Scope,
...@@ -2011,8 +2034,13 @@ fn transInitListExprArray(...@@ -2011,8 +2034,13 @@ fn transInitListExprArray(
2011 var init_node: *ast.Node.SuffixOp = undefined;2034 var init_node: *ast.Node.SuffixOp = undefined;
2012 var cat_tok: ast.TokenIndex = undefined;2035 var cat_tok: ast.TokenIndex = undefined;
2013 if (init_count != 0) {2036 if (init_count != 0) {
2014 const dot_tok = try appendToken(rp.c, .Period, ".");2037 const ty_node = try transCreateNodeArrayType(
2015 init_node = try transCreateNodeContainerInitializer(rp.c, dot_tok);2038 rp,
2039 loc,
2040 ZigClangQualType_getTypePtr(child_qt),
2041 init_count,
2042 );
2043 init_node = try transCreateNodeArrayInitializer(rp.c, ty_node);
2016 var i: c_uint = 0;2044 var i: c_uint = 0;
2017 while (i < init_count) : (i += 1) {2045 while (i < init_count) : (i += 1) {
2018 const elem_expr = ZigClangInitListExpr_getInit(expr, i);2046 const elem_expr = ZigClangInitListExpr_getInit(expr, i);
...@@ -2026,8 +2054,8 @@ fn transInitListExprArray(...@@ -2026,8 +2054,8 @@ fn transInitListExprArray(
2026 cat_tok = try appendToken(rp.c, .PlusPlus, "++");2054 cat_tok = try appendToken(rp.c, .PlusPlus, "++");
2027 }2055 }
20282056
2029 const dot_tok = try appendToken(rp.c, .Period, ".");2057 const ty_node = try transCreateNodeArrayType(rp, loc, ZigClangQualType_getTypePtr(child_qt), 1);
2030 var filler_init_node = try transCreateNodeContainerInitializer(rp.c, dot_tok);2058 var filler_init_node = try transCreateNodeArrayInitializer(rp.c, ty_node);
2031 const filler_val_expr = ZigClangInitListExpr_getArrayFiller(expr);2059 const filler_val_expr = ZigClangInitListExpr_getArrayFiller(expr);
2032 try filler_init_node.op.ArrayInitializer.push(try transExpr(rp, scope, filler_val_expr, .used, .r_value));2060 try filler_init_node.op.ArrayInitializer.push(try transExpr(rp, scope, filler_val_expr, .used, .r_value));
2033 filler_init_node.rtoken = try appendToken(rp.c, .RBrace, "}");2061 filler_init_node.rtoken = try appendToken(rp.c, .RBrace, "}");
...@@ -3418,31 +3446,10 @@ fn qualTypeToLog2IntRef(rp: RestorePoint, qt: ZigClangQualType, source_loc: ZigC...@@ -3418,31 +3446,10 @@ fn qualTypeToLog2IntRef(rp: RestorePoint, qt: ZigClangQualType, source_loc: ZigC
3418}3446}
34193447
3420fn qualTypeChildIsFnProto(qt: ZigClangQualType) bool {3448fn qualTypeChildIsFnProto(qt: ZigClangQualType) bool {
3421 const ty = ZigClangQualType_getTypePtr(qt);3449 const ty = qualTypeCanon(qt);
34223450
3423 switch (ZigClangType_getTypeClass(ty)) {3451 switch (ZigClangType_getTypeClass(ty)) {
3424 .FunctionProto, .FunctionNoProto => return true,3452 .FunctionProto, .FunctionNoProto => return true,
3425 .Elaborated => {
3426 const elaborated_ty = @ptrCast(*const ZigClangElaboratedType, ty);
3427 return qualTypeChildIsFnProto(ZigClangElaboratedType_getNamedType(elaborated_ty));
3428 },
3429 .Typedef => {
3430 const typedef_ty = @ptrCast(*const ZigClangTypedefType, ty);
3431 const typedef_decl = ZigClangTypedefType_getDecl(typedef_ty);
3432 return qualTypeChildIsFnProto(ZigClangTypedefNameDecl_getUnderlyingType(typedef_decl));
3433 },
3434 .Paren => {
3435 const paren_type = @ptrCast(*const ZigClangParenType, ty);
3436 const inner_type = ZigClangParenType_getInnerType(paren_type);
3437 switch (ZigClangQualType_getTypeClass(inner_type)) {
3438 .FunctionProto, .FunctionNoProto => return true,
3439 else => return false,
3440 }
3441 },
3442 .Attributed => {
3443 const attr_type = @ptrCast(*const ZigClangAttributedType, ty);
3444 return qualTypeChildIsFnProto(ZigClangAttributedType_getEquivalentType(attr_type));
3445 },
3446 else => return false,3453 else => return false,
3447 }3454 }
3448}3455}
...@@ -3878,11 +3885,11 @@ fn transCreateNodeBoolLiteral(c: *Context, value: bool) !*ast.Node {...@@ -3878,11 +3885,11 @@ fn transCreateNodeBoolLiteral(c: *Context, value: bool) !*ast.Node {
3878 return &node.base;3885 return &node.base;
3879}3886}
38803887
3881fn transCreateNodeContainerInitializer(c: *Context, dot_tok: ast.TokenIndex) !*ast.Node.SuffixOp {3888fn transCreateNodeArrayInitializer(c: *Context, ty: *ast.Node) !*ast.Node.SuffixOp {
3882 _ = try appendToken(c, .LBrace, "{");3889 _ = try appendToken(c, .LBrace, "{");
3883 const node = try c.a().create(ast.Node.SuffixOp);3890 const node = try c.a().create(ast.Node.SuffixOp);
3884 node.* = ast.Node.SuffixOp{3891 node.* = ast.Node.SuffixOp{
3885 .lhs = .{ .dot = dot_tok },3892 .lhs = .{ .node = ty },
3886 .op = .{3893 .op = .{
3887 .ArrayInitializer = ast.Node.SuffixOp.Op.InitList.init(c.a()),3894 .ArrayInitializer = ast.Node.SuffixOp.Op.InitList.init(c.a()),
3888 },3895 },
src-self-hosted/util.zig-17
...@@ -32,23 +32,6 @@ pub fn getFloatAbi(self: Target) FloatAbi {...@@ -32,23 +32,6 @@ pub fn getFloatAbi(self: Target) FloatAbi {
32 };32 };
33}33}
3434
35pub fn getObjectFormat(target: Target) Target.ObjectFormat {
36 switch (target) {
37 .Native => return @import("builtin").object_format,
38 .Cross => blk: {
39 if (target.isWindows() or target.isUefi()) {
40 return .coff;
41 } else if (target.isDarwin()) {
42 return .macho;
43 }
44 if (target.isWasm()) {
45 return .wasm;
46 }
47 return .elf;
48 },
49 }
50}
51
52pub fn getDynamicLinkerPath(self: Target) ?[]const u8 {35pub fn getDynamicLinkerPath(self: Target) ?[]const u8 {
53 const env = self.getAbi();36 const env = self.getAbi();
54 const arch = self.getArch();37 const arch = self.getArch();
src/analyze.cpp+4-4
...@@ -8846,13 +8846,13 @@ static void resolve_llvm_types_fn_type(CodeGen *g, ZigType *fn_type) {...@@ -8846,13 +8846,13 @@ static void resolve_llvm_types_fn_type(CodeGen *g, ZigType *fn_type) {
8846 ZigType *gen_return_type;8846 ZigType *gen_return_type;
8847 if (is_async) {8847 if (is_async) {
8848 gen_return_type = g->builtin_types.entry_void;8848 gen_return_type = g->builtin_types.entry_void;
8849 param_di_types.append(get_llvm_di_type(g, gen_return_type));8849 param_di_types.append(nullptr);
8850 } else if (!type_has_bits(fn_type_id->return_type)) {8850 } else if (!type_has_bits(fn_type_id->return_type)) {
8851 gen_return_type = g->builtin_types.entry_void;8851 gen_return_type = g->builtin_types.entry_void;
8852 param_di_types.append(get_llvm_di_type(g, gen_return_type));8852 param_di_types.append(nullptr);
8853 } else if (first_arg_return) {8853 } else if (first_arg_return) {
8854 gen_return_type = g->builtin_types.entry_void;8854 gen_return_type = g->builtin_types.entry_void;
8855 param_di_types.append(get_llvm_di_type(g, gen_return_type));8855 param_di_types.append(nullptr);
8856 ZigType *gen_type = get_pointer_to_type(g, fn_type_id->return_type, false);8856 ZigType *gen_type = get_pointer_to_type(g, fn_type_id->return_type, false);
8857 gen_param_types.append(get_llvm_type(g, gen_type));8857 gen_param_types.append(get_llvm_type(g, gen_type));
8858 param_di_types.append(get_llvm_di_type(g, gen_type));8858 param_di_types.append(get_llvm_di_type(g, gen_type));
...@@ -8955,7 +8955,7 @@ void resolve_llvm_types_fn(CodeGen *g, ZigFn *fn) {...@@ -8955,7 +8955,7 @@ void resolve_llvm_types_fn(CodeGen *g, ZigFn *fn) {
8955 ZigList<ZigLLVMDIType *> param_di_types = {};8955 ZigList<ZigLLVMDIType *> param_di_types = {};
8956 ZigList<LLVMTypeRef> gen_param_types = {};8956 ZigList<LLVMTypeRef> gen_param_types = {};
8957 // first "parameter" is return value8957 // first "parameter" is return value
8958 param_di_types.append(get_llvm_di_type(g, gen_return_type));8958 param_di_types.append(nullptr);
89598959
8960 ZigType *frame_type = get_fn_frame_type(g, fn);8960 ZigType *frame_type = get_fn_frame_type(g, fn);
8961 ZigType *ptr_type = get_pointer_to_type(g, frame_type, false);8961 ZigType *ptr_type = get_pointer_to_type(g, frame_type, false);
test/cli.zig+1-1
...@@ -8,7 +8,7 @@ const ChildProcess = std.ChildProcess;...@@ -8,7 +8,7 @@ const ChildProcess = std.ChildProcess;
8var a: *std.mem.Allocator = undefined;8var a: *std.mem.Allocator = undefined;
99
10pub fn main() !void {10pub fn main() !void {
11 var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);11 var arena = std.heap.ArenaAllocator.init(std.testing.allocator);
12 defer arena.deinit();12 defer arena.deinit();
1313
14 var arg_it = process.args();14 var arg_it = process.args();
test/compare_output.zig+2-2
...@@ -445,7 +445,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {...@@ -445,7 +445,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
445 \\const std = @import("std");445 \\const std = @import("std");
446 \\const io = std.io;446 \\const io = std.io;
447 \\const os = std.os;447 \\const os = std.os;
448 \\const allocator = std.debug.global_allocator;448 \\const allocator = std.testing.allocator;
449 \\449 \\
450 \\pub fn main() !void {450 \\pub fn main() !void {
451 \\ var args_it = std.process.args();451 \\ var args_it = std.process.args();
...@@ -486,7 +486,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {...@@ -486,7 +486,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
486 \\const std = @import("std");486 \\const std = @import("std");
487 \\const io = std.io;487 \\const io = std.io;
488 \\const os = std.os;488 \\const os = std.os;
489 \\const allocator = std.debug.global_allocator;489 \\const allocator = std.testing.allocator;
490 \\490 \\
491 \\pub fn main() !void {491 \\pub fn main() !void {
492 \\ var args_it = std.process.args();492 \\ var args_it = std.process.args();
test/compile_errors.zig+1-1
...@@ -5765,7 +5765,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {...@@ -5765,7 +5765,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
5765 \\5765 \\
5766 \\export fn entry() void {5766 \\export fn entry() void {
5767 \\ const a = MdNode.Header {5767 \\ const a = MdNode.Header {
5768 \\ .text = MdText.init(&std.debug.global_allocator),5768 \\ .text = MdText.init(&std.testing.allocator),
5769 \\ .weight = HeaderWeight.H1,5769 \\ .weight = HeaderWeight.H1,
5770 \\ };5770 \\ };
5771 \\}5771 \\}
test/run_translated_c.zig+16
...@@ -3,6 +3,22 @@ const tests = @import("tests.zig");...@@ -3,6 +3,22 @@ const tests = @import("tests.zig");
3const nl = std.cstr.line_sep;3const nl = std.cstr.line_sep;
44
5pub fn addCases(cases: *tests.RunTranslatedCContext) void {5pub fn addCases(cases: *tests.RunTranslatedCContext) void {
6 cases.add("array initializer",
7 \\#include <stdlib.h>
8 \\int main(int argc, char **argv) {
9 \\ int a0[4] = {1};
10 \\ int a1[4] = {1,2,3,4};
11 \\ int s0 = 0, s1 = 0;
12 \\ for (int i = 0; i < 4; i++) {
13 \\ s0 += a0[i];
14 \\ s1 += a1[i];
15 \\ }
16 \\ if (s0 != 1) abort();
17 \\ if (s1 != 10) abort();
18 \\ return 0;
19 \\}
20 , "");
21
6 cases.add("forward declarations",22 cases.add("forward declarations",
7 \\#include <stdlib.h>23 \\#include <stdlib.h>
8 \\int foo(int);24 \\int foo(int);
test/stage1/behavior/async_fn.zig+5-5
...@@ -410,8 +410,8 @@ test "heap allocated async function frame" {...@@ -410,8 +410,8 @@ test "heap allocated async function frame" {
410 var x: i32 = 42;410 var x: i32 = 42;
411411
412 fn doTheTest() !void {412 fn doTheTest() !void {
413 const frame = try std.heap.page_allocator.create(@Frame(someFunc));413 const frame = try std.testing.allocator.create(@Frame(someFunc));
414 defer std.heap.page_allocator.destroy(frame);414 defer std.testing.allocator.destroy(frame);
415415
416 expect(x == 42);416 expect(x == 42);
417 frame.* = async someFunc();417 frame.* = async someFunc();
...@@ -671,7 +671,7 @@ fn testAsyncAwaitTypicalUsage(...@@ -671,7 +671,7 @@ fn testAsyncAwaitTypicalUsage(
671 }671 }
672672
673 fn amain() !void {673 fn amain() !void {
674 const allocator = std.heap.page_allocator; // TODO once we have the debug allocator, use that, so that this can detect leaks674 const allocator = std.testing.allocator;
675 var download_frame = async fetchUrl(allocator, "https://example.com/");675 var download_frame = async fetchUrl(allocator, "https://example.com/");
676 var download_awaited = false;676 var download_awaited = false;
677 errdefer if (!download_awaited) {677 errdefer if (!download_awaited) {
...@@ -935,12 +935,12 @@ fn recursiveAsyncFunctionTest(comptime suspending_implementation: bool) type {...@@ -935,12 +935,12 @@ fn recursiveAsyncFunctionTest(comptime suspending_implementation: bool) type {
935 _ = async amain(&result);935 _ = async amain(&result);
936 return result;936 return result;
937 } else {937 } else {
938 return fib(std.heap.page_allocator, 10) catch unreachable;938 return fib(std.testing.allocator, 10) catch unreachable;
939 }939 }
940 }940 }
941941
942 fn amain(result: *u32) void {942 fn amain(result: *u32) void {
943 var x = async fib(std.heap.page_allocator, 10);943 var x = async fib(std.testing.allocator, 10);
944 result.* = (await x) catch unreachable;944 result.* = (await x) catch unreachable;
945 }945 }
946 };946 };
test/stage1/behavior/const_slice_child.zig+4-2
...@@ -1,6 +1,7 @@...@@ -1,6 +1,7 @@
1const std = @import("std");1const std = @import("std");
2const debug = std.debug;2const debug = std.debug;
3const expect = std.testing.expect;3const testing = std.testing;
4const expect = testing.expect;
45
5var argv: [*]const [*]const u8 = undefined;6var argv: [*]const [*]const u8 = undefined;
67
...@@ -22,7 +23,8 @@ fn foo(args: [][]const u8) void {...@@ -22,7 +23,8 @@ fn foo(args: [][]const u8) void {
22}23}
2324
24fn bar(argc: usize) void {25fn bar(argc: usize) void {
25 const args = debug.global_allocator.alloc([]const u8, argc) catch unreachable;26 const args = testing.allocator.alloc([]const u8, argc) catch unreachable;
27 defer testing.allocator.free(args);
26 for (args) |_, i| {28 for (args) |_, i| {
27 const ptr = argv[i];29 const ptr = argv[i];
28 args[i] = ptr[0..strlen(ptr)];30 args[i] = ptr[0..strlen(ptr)];
test/standalone/brace_expansion/main.zig+8-2
...@@ -201,7 +201,10 @@ pub fn main() !void {...@@ -201,7 +201,10 @@ pub fn main() !void {
201}201}
202202
203test "invalid inputs" {203test "invalid inputs" {
204 global_allocator = std.debug.global_allocator;204 var arena = std.heap.ArenaAllocator.init(std.testing.allocator);
205 defer arena.deinit();
206
207 global_allocator = &arena.allocator;
205208
206 expectError("}ABC", error.InvalidInput);209 expectError("}ABC", error.InvalidInput);
207 expectError("{ABC", error.InvalidInput);210 expectError("{ABC", error.InvalidInput);
...@@ -222,7 +225,10 @@ fn expectError(test_input: []const u8, expected_err: anyerror) void {...@@ -222,7 +225,10 @@ fn expectError(test_input: []const u8, expected_err: anyerror) void {
222}225}
223226
224test "valid inputs" {227test "valid inputs" {
225 global_allocator = std.debug.global_allocator;228 var arena = std.heap.ArenaAllocator.init(std.testing.allocator);
229 defer arena.deinit();
230
231 global_allocator = &arena.allocator;
226232
227 expectExpansion("{x,y,z}", "x y z");233 expectExpansion("{x,y,z}", "x y z");
228 expectExpansion("{A,B}{x,y}", "Ax Ay Bx By");234 expectExpansion("{A,B}{x,y}", "Ax Ay Bx By");
test/standalone/cat/main.zig+1-1
...@@ -4,7 +4,7 @@ const process = std.process;...@@ -4,7 +4,7 @@ const process = std.process;
4const fs = std.fs;4const fs = std.fs;
5const mem = std.mem;5const mem = std.mem;
6const warn = std.debug.warn;6const warn = std.debug.warn;
7const allocator = std.debug.global_allocator;7const allocator = std.testing.allocator;
88
9pub fn main() !void {9pub fn main() !void {
10 var args_it = process.args();10 var args_it = process.args();
test/standalone/empty_env/main.zig+1-1
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1const std = @import("std");1const std = @import("std");
22
3pub fn main() void {3pub fn main() void {
4 const env_map = std.process.getEnvMap(std.debug.global_allocator) catch @panic("unable to get env map");4 const env_map = std.process.getEnvMap(std.testing.allocator) catch @panic("unable to get env map");
5 std.testing.expect(env_map.count() == 0);5 std.testing.expect(env_map.count() == 0);
6}6}
test/standalone/load_dynamic_library/main.zig+2-2
...@@ -1,8 +1,8 @@...@@ -1,8 +1,8 @@
1const std = @import("std");1const std = @import("std");
22
3pub fn main() !void {3pub fn main() !void {
4 const args = try std.process.argsAlloc(std.debug.global_allocator);4 const args = try std.process.argsAlloc(std.testing.allocator);
5 defer std.process.argsFree(std.debug.global_allocator, args);5 defer std.process.argsFree(std.testing.allocator, args);
66
7 const dynlib_name = args[1];7 const dynlib_name = args[1];
88
test/translate_c.zig+28-8
...@@ -3,6 +3,26 @@ const builtin = @import("builtin");...@@ -3,6 +3,26 @@ const builtin = @import("builtin");
3const Target = @import("std").Target;3const Target = @import("std").Target;
44
5pub fn addCases(cases: *tests.TranslateCContext) void {5pub fn addCases(cases: *tests.TranslateCContext) void {
6 cases.add("function prototype translated as optional",
7 \\typedef void (*fnptr_ty)(void);
8 \\typedef __attribute__((cdecl)) void (*fnptr_attr_ty)(void);
9 \\struct foo {
10 \\ __attribute__((cdecl)) void (*foo)(void);
11 \\ void (*bar)(void);
12 \\ fnptr_ty baz;
13 \\ fnptr_attr_ty qux;
14 \\};
15 , &[_][]const u8{
16 \\pub const fnptr_ty = ?fn () callconv(.C) void;
17 \\pub const fnptr_attr_ty = ?fn () callconv(.C) void;
18 \\pub const struct_foo = extern struct {
19 \\ foo: ?fn () callconv(.C) void,
20 \\ bar: ?fn () callconv(.C) void,
21 \\ baz: fnptr_ty,
22 \\ qux: fnptr_attr_ty,
23 \\};
24 });
25
6 cases.add("function prototype with parenthesis",26 cases.add("function prototype with parenthesis",
7 \\void (f0) (void *L);27 \\void (f0) (void *L);
8 \\void ((f1)) (void *L);28 \\void ((f1)) (void *L);
...@@ -18,7 +38,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {...@@ -18,7 +38,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
18 \\static const uuid_t UUID_NULL __attribute__ ((unused)) = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};38 \\static const uuid_t UUID_NULL __attribute__ ((unused)) = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
19 , &[_][]const u8{39 , &[_][]const u8{
20 \\pub const uuid_t = [16]u8;40 \\pub const uuid_t = [16]u8;
21 \\pub const UUID_NULL: uuid_t = .{41 \\pub const UUID_NULL: uuid_t = [16]u8{
22 \\ @bitCast(u8, @truncate(i8, @as(c_int, 0))),42 \\ @bitCast(u8, @truncate(i8, @as(c_int, 0))),
23 \\ @bitCast(u8, @truncate(i8, @as(c_int, 0))),43 \\ @bitCast(u8, @truncate(i8, @as(c_int, 0))),
24 \\ @bitCast(u8, @truncate(i8, @as(c_int, 0))),44 \\ @bitCast(u8, @truncate(i8, @as(c_int, 0))),
...@@ -87,7 +107,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {...@@ -87,7 +107,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
87 \\ .x = @as(c_int, 1),107 \\ .x = @as(c_int, 1),
88 \\};108 \\};
89 \\pub export var ub: union_unnamed_1 = union_unnamed_1{109 \\pub export var ub: union_unnamed_1 = union_unnamed_1{
90 \\ .c = .{110 \\ .c = [4]u8{
91 \\ @bitCast(u8, @truncate(i8, @as(c_int, 'a'))),111 \\ @bitCast(u8, @truncate(i8, @as(c_int, 'a'))),
92 \\ @bitCast(u8, @truncate(i8, @as(c_int, 'b'))),112 \\ @bitCast(u8, @truncate(i8, @as(c_int, 'b'))),
93 \\ @bitCast(u8, @truncate(i8, @as(c_int, 'b'))),113 \\ @bitCast(u8, @truncate(i8, @as(c_int, 'b'))),
...@@ -1118,12 +1138,12 @@ pub fn addCases(cases: *tests.TranslateCContext) void {...@@ -1118,12 +1138,12 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
1118 \\}1138 \\}
1119 , &[_][]const u8{1139 , &[_][]const u8{
1120 \\pub fn foo() callconv(.C) void {1140 \\pub fn foo() callconv(.C) void {
1121 \\ var arr: [10]u8 = .{1141 \\ var arr: [10]u8 = [1]u8{
1122 \\ @bitCast(u8, @truncate(i8, @as(c_int, 1))),1142 \\ @bitCast(u8, @truncate(i8, @as(c_int, 1))),
1123 \\ } ++ .{0} ** 9;1143 \\ } ++ [1]u8{0} ** 9;
1124 \\ var arr1: [10][*c]u8 = .{1144 \\ var arr1: [10][*c]u8 = [1][*c]u8{
1125 \\ null,1145 \\ null,
1126 \\ } ++ .{null} ** 9;1146 \\ } ++ [1][*c]u8{null} ** 9;
1127 \\}1147 \\}
1128 });1148 });
11291149
...@@ -1570,7 +1590,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {...@@ -1570,7 +1590,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
1570 cases.add("undefined array global",1590 cases.add("undefined array global",
1571 \\int array[100] = {};1591 \\int array[100] = {};
1572 , &[_][]const u8{1592 , &[_][]const u8{
1573 \\pub export var array: [100]c_int = .{0} ** 100;1593 \\pub export var array: [100]c_int = [1]c_int{0} ** 100;
1574 });1594 });
15751595
1576 cases.add("restrict -> noalias",1596 cases.add("restrict -> noalias",
...@@ -1904,7 +1924,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {...@@ -1904,7 +1924,7 @@ pub fn addCases(cases: *tests.TranslateCContext) void {
1904 \\ return array[index];1924 \\ return array[index];
1905 \\}1925 \\}
1906 , &[_][]const u8{1926 , &[_][]const u8{
1907 \\pub export var array: [100]c_int = .{0} ** 100;1927 \\pub export var array: [100]c_int = [1]c_int{0} ** 100;
1908 \\pub export fn foo(arg_index: c_int) c_int {1928 \\pub export fn foo(arg_index: c_int) c_int {
1909 \\ var index = arg_index;1929 \\ var index = arg_index;
1910 \\ return array[@intCast(c_uint, index)];1930 \\ return array[@intCast(c_uint, index)];