We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1c0f42 commit bf3a54cCopy full SHA for bf3a54c
lib/std/os/windows.zig
@@ -1186,7 +1186,14 @@ pub fn SetFilePointerEx_CURRENT_get(handle: HANDLE) SetFilePointerError!u64 {
1186
return @as(u64, @bitCast(result));
1187
}
1188
1189
-pub fn QueryObjectName(handle: HANDLE, out_buffer: []u16) ![]u16 {
+pub const QueryObjectNameError = error{
1190
+ AccessDenied,
1191
+ InvalidHandle,
1192
+ NameTooLong,
1193
+ Unexpected,
1194
+};
1195
+
1196
+pub fn QueryObjectName(handle: HANDLE, out_buffer: []u16) QueryObjectNameError![]u16 {
1197
const out_buffer_aligned = mem.alignInSlice(out_buffer, @alignOf(OBJECT_NAME_INFORMATION)) orelse return error.NameTooLong;
1198
1199
const info = @as(*OBJECT_NAME_INFORMATION, @ptrCast(out_buffer_aligned));
0 commit comments