diff options
| author | Jimmi Holst Christensen <rainbowhejsil@gmail.com> | 2018-01-19 21:30:57 +0100 |
|---|---|---|
| committer | Jimmi Holst Christensen <rainbowhejsil@gmail.com> | 2018-01-19 21:30:57 +0100 |
| commit | 90714a38311ec79500c0257670985bfe5d6c9a1b (patch) | |
| tree | 2c7c7338b1392a4cd8063805f97092733340fc9e /std/os | |
| parent | 0aae96b5f0a592ee3e2ff3607121740042878634 (diff) | |
| download | zig-90714a38311ec79500c0257670985bfe5d6c9a1b.tar.gz zig-90714a38311ec79500c0257670985bfe5d6c9a1b.zip | |
Implemented windows versions of seekTo and getPos
Diffstat (limited to 'std/os')
| -rw-r--r-- | std/os/windows/index.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/std/os/windows/index.zig b/std/os/windows/index.zig index d460e94f64..b10d373d78 100644 --- a/std/os/windows/index.zig +++ b/std/os/windows/index.zig @@ -74,6 +74,9 @@ pub extern "kernel32" stdcallcc fn ReadFile(in_hFile: HANDLE, out_lpBuffer: LPVO in_nNumberOfBytesToRead: DWORD, out_lpNumberOfBytesRead: &DWORD, in_out_lpOverlapped: ?&OVERLAPPED) -> BOOL; +pub extern "kernel32" stdcallcc fn SetFilePointerEx(in_fFile: HANDLE, in_liDistanceToMove: LARGE_INTEGER, + out_opt_ldNewFilePointer: ?PLARGE_INTEGER, in_dwMoveMethod: DWORD) -> BOOL; + pub extern "kernel32" stdcallcc fn SetHandleInformation(hObject: HANDLE, dwMask: DWORD, dwFlags: DWORD) -> BOOL; pub extern "kernel32" stdcallcc fn Sleep(dwMilliseconds: DWORD); @@ -126,6 +129,7 @@ pub const UNICODE = false; pub const WCHAR = u16; pub const WORD = u16; pub const LARGE_INTEGER = i64; +pub const PLARGE_INTEGER = &LARGE_INTEGER; pub const TRUE = 1; pub const FALSE = 0; @@ -289,3 +293,7 @@ pub const MOVEFILE_DELAY_UNTIL_REBOOT = 4; pub const MOVEFILE_FAIL_IF_NOT_TRACKABLE = 32; pub const MOVEFILE_REPLACE_EXISTING = 1; pub const MOVEFILE_WRITE_THROUGH = 8; + +pub const FILE_BEGIN = 0; +pub const FILE_CURRENT = 1; +pub const FILE_END = 2;
\ No newline at end of file |
