mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
Fix GetFileInformationByHandle compile error (#14829)
* Fix GetFileInformationByHandle compile error The wrapper function was mistakenly referencing ntdll.zig when the actual function is declared in kernel32.zig. * delete GetFileInformationByHandle since it's not used by the stdlib
This commit is contained in:
parent
9a203fa789
commit
30427ff794
@ -1708,21 +1708,6 @@ pub fn LocalFree(hMem: HLOCAL) void {
|
||||
assert(kernel32.LocalFree(hMem) == null);
|
||||
}
|
||||
|
||||
pub const GetFileInformationByHandleError = error{Unexpected};
|
||||
|
||||
pub fn GetFileInformationByHandle(
|
||||
hFile: HANDLE,
|
||||
) GetFileInformationByHandleError!BY_HANDLE_FILE_INFORMATION {
|
||||
var info: BY_HANDLE_FILE_INFORMATION = undefined;
|
||||
const rc = ntdll.GetFileInformationByHandle(hFile, &info);
|
||||
if (rc == 0) {
|
||||
switch (kernel32.GetLastError()) {
|
||||
else => |err| return unexpectedError(err),
|
||||
}
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
pub const SetFileTimeError = error{Unexpected};
|
||||
|
||||
pub fn SetFileTime(
|
||||
|
||||
@ -202,11 +202,6 @@ pub extern "kernel32" fn GetModuleHandleW(lpModuleName: ?[*:0]const WCHAR) callc
|
||||
pub extern "kernel32" fn GetLastError() callconv(WINAPI) Win32Error;
|
||||
pub extern "kernel32" fn SetLastError(dwErrCode: Win32Error) callconv(WINAPI) void;
|
||||
|
||||
pub extern "kernel32" fn GetFileInformationByHandle(
|
||||
hFile: HANDLE,
|
||||
lpFileInformation: *BY_HANDLE_FILE_INFORMATION,
|
||||
) callconv(WINAPI) BOOL;
|
||||
|
||||
pub extern "kernel32" fn GetFileInformationByHandleEx(
|
||||
in_hFile: HANDLE,
|
||||
in_FileInformationClass: FILE_INFO_BY_HANDLE_CLASS,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user