mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 16:54:52 +00:00
std.os.windows additions and fixes
This commit is contained in:
parent
e7ead9c5ea
commit
37295696ec
@ -2631,6 +2631,7 @@ pub const HWND = *opaque {};
|
||||
pub const HDC = *opaque {};
|
||||
pub const HGLRC = *opaque {};
|
||||
pub const FARPROC = *opaque {};
|
||||
pub const PROC = *opaque {};
|
||||
pub const INT = c_int;
|
||||
pub const LPCSTR = [*:0]const CHAR;
|
||||
pub const LPCVOID = *const anyopaque;
|
||||
@ -3433,6 +3434,10 @@ pub const E_HANDLE = @as(c_long, @bitCast(@as(c_ulong, 0x80070006)));
|
||||
pub const E_OUTOFMEMORY = @as(c_long, @bitCast(@as(c_ulong, 0x8007000E)));
|
||||
pub const E_INVALIDARG = @as(c_long, @bitCast(@as(c_ulong, 0x80070057)));
|
||||
|
||||
pub fn HRESULT_CODE(hr: HRESULT) Win32Error {
|
||||
return @enumFromInt(hr & 0xFFFF);
|
||||
}
|
||||
|
||||
pub const FILE_FLAG_BACKUP_SEMANTICS = 0x02000000;
|
||||
pub const FILE_FLAG_DELETE_ON_CLOSE = 0x04000000;
|
||||
pub const FILE_FLAG_NO_BUFFERING = 0x20000000;
|
||||
|
||||
@ -193,7 +193,7 @@ pub extern "kernel32" fn GetExitCodeProcess(hProcess: HANDLE, lpExitCode: *DWORD
|
||||
|
||||
pub extern "kernel32" fn GetFileSizeEx(hFile: HANDLE, lpFileSize: *LARGE_INTEGER) callconv(WINAPI) BOOL;
|
||||
|
||||
pub extern "kernel32" fn GetFileAttributesW(lpFileName: [*]const WCHAR) callconv(WINAPI) DWORD;
|
||||
pub extern "kernel32" fn GetFileAttributesW(lpFileName: [*:0]const WCHAR) callconv(WINAPI) DWORD;
|
||||
|
||||
pub extern "kernel32" fn GetModuleFileNameW(hModule: ?HMODULE, lpFilename: [*]u16, nSize: DWORD) callconv(WINAPI) DWORD;
|
||||
|
||||
@ -392,7 +392,7 @@ pub extern "kernel32" fn WriteFileEx(
|
||||
|
||||
pub extern "kernel32" fn LoadLibraryW(lpLibFileName: [*:0]const u16) callconv(WINAPI) ?HMODULE;
|
||||
|
||||
pub extern "kernel32" fn GetProcAddress(hModule: HMODULE, lpProcName: [*]const u8) callconv(WINAPI) ?FARPROC;
|
||||
pub extern "kernel32" fn GetProcAddress(hModule: HMODULE, lpProcName: [*:0]const u8) callconv(WINAPI) ?FARPROC;
|
||||
|
||||
pub extern "kernel32" fn FreeLibrary(hModule: HMODULE) callconv(WINAPI) BOOL;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user