| ... | ... | @@ -1190,7 +1190,14 @@ pub fn SetFilePointerEx_CURRENT_get(handle: HANDLE) SetFilePointerError!u64 { |
| 1190 | 1190 | return @as(u64, @bitCast(result)); |
| 1191 | 1191 | } |
| 1192 | 1192 | |
| 1193 | | pub fn QueryObjectName(handle: HANDLE, out_buffer: []u16) ![]u16 { |
| 1193 | 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 { |
| 1194 | 1201 | const out_buffer_aligned = mem.alignInSlice(out_buffer, @alignOf(OBJECT_NAME_INFORMATION)) orelse return error.NameTooLong; |
| 1195 | 1202 | |
| 1196 | 1203 | const info = @as(*OBJECT_NAME_INFORMATION, @ptrCast(out_buffer_aligned)); |