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