aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os/windows/kernel32.zig
AgeCommit message (Collapse)Author
2022-09-07x86_64: implement Windows x64 calling conventionJakub Konka
2022-04-23add GetProcessTimes binding to the kernel32.zig (#11488)Morritz
2022-02-15Merge pull request #10003 from viriuwu/nt-thread-nameVeikka Tuominen
std.Thread.getName/setName: rework windows implementation
2022-02-15std.Thread(windows): use NT internals for name fnsviri
2022-02-11validate in Windows using VirtualQuerym
2021-12-19stage1, stage2: rename c_void to anyopaque (#10316)Isaac Freund
zig fmt now replaces c_void with anyopaque to make updating code easy.
2021-09-20adding support for UTF-8 outputHugoFlorentino
2021-09-01std: reorganization that allows new usingnamespace semanticsAndrew Kelley
The proposal #9629 is now accepted, usingnamespace stays but no longer puts identifiers in scope.
2021-09-01std.os.windows: reorg to avoid `usingnamespace`Andrew Kelley
Down to 19 uses of `usingnamespace`.
2021-08-24remove redundant license headers from zig standard libraryAndrew Kelley
We already have a LICENSE file that covers the Zig Standard Library. We no longer need to remind everyone that the license is MIT in every single file. Previously this was introduced to clarify the situation for a fork of Zig that made Zig's LICENSE file harder to find, and replaced it with their own license that required annual payments to their company. However that fork now appears to be dead. So there is no need to reinforce the copyright notice in every single file.
2021-07-29windows/kernel32: add LocalFree, SetThreadDescription and GetThreadDescriptionVincent Rischmann
2021-06-18finish ChildProcess collectOutputWindowsJonathan Marler
This finishes LemonBoy's Draft PR ziglang#6750. It updates ChildProcess to collect the output from stdout/stderr asynchronously using Overlapped IO and named pipes.
2021-06-17std: Use WINAPI instead of .StdcallLemonBoy
2021-06-17std: Avoid deadlocking in ChildProcess.execLemonBoy
Reading stdin&stderr at different times may lead to nasty deadlocks (eg. when stdout is read before stderr and the child process doesn't write anything onto stdout). Implement a polling mechanism to make sure this won't happen: we read data from stderr/stdout as it becomes ready and then it's copied into an ArrayList provided by the user, avoiding any kind of blocking read.
2021-06-09std.Progress: use `*W` functions on windowsviri
Closes #534. See: https://source.winehq.org/git/wine.git/blob/refs/heads/stable:/dlls/kernelbase/console.c#l520
2021-06-09windows: remove `TCHAR` idiom entirelyviri
2021-05-21handle relative paths with too many ".."Jonathan Marler
2021-05-10std/os, x/os/socket: windows support, socket helpers, getpeername()lithdew
Socket I/O methods such as read, readv, write, writev, send, recv, sendmsg, recvmsg have been generalized to read(buf, flags), write(buf, flags), readVectorized(vectors, flags), and writeVectorized(vectors, flags). There is still some work left to be done abstracting both readVectorized and writeVectorized properly across platforms, which is work to be done in a future PR. Support for setting the linger timeout of a socket, querying the remote address of a socket, setting whether or not keep-alive messages are to be sent through a connection-oriented socket periodically depending on host operating system settings has been added. `std.io.Reader` and `std.io.Writer` wrappers around `Socket` has been implemented, which wrap around Socket.read(buf, flags) and Socket.write(buf, flags). Both wrappers may be provided flags which are passed to Socket.read / Socket.write accordingly. Cross-platform support for `getpeername()` has been implemented. Windows support for the new `std.x.os.Socket` has been implemented. To accomplish this, a full refactor of `std.os.windows.ws2_32` has been done to supply any missing definitions and constants based on auto-generated Windows syscall bindings by @marler8997. `std.x.net.TCP.Listener.setQuickACK` has been moved to `std.x.net.TCP.Client.setQuickACK`. Windows support for resolving the scope ID of an interface name specified in an IPv6 address has been provided. `sockaddr_storage` definitions have been provided for Windows, Linux, and Darwin. `sockaddr_storage` is used to allocate space before any socket addresses are queried via. calls such as accept(), getsockname(), and getpeername(). Zig-friendly wrappers for GetQueuedCompletionStatusEx(), getpeername(), SetConsoleCtrlHandler(), SetFileCompletionNotificationModes() syscalls on Windows have been provided. Socket.setOption() was provided to set the value of a socket option in place of os.setsockopt. Socket.getOption() will be provided in a future PR. There is still further work to be done regarding querying socket option values on Windows, which is to be done in a subsequent PR.
2021-01-24fix windows bug in Progress.zigTimon Kruiper
This bug caused the compiler to deadlock when multiple c objects were build in parallel. Thanks @kprotty for finding this bug!
2021-01-14organize std lib concurrency primitives and add RwLockAndrew Kelley
* move concurrency primitives that always operate on kernel threads to the std.Thread namespace * remove std.SpinLock. Nobody should use this in a non-freestanding environment; the other primitives are always preferable. In freestanding, it will be necessary to put custom spin logic in there, so there are no use cases for a std lib version. * move some std lib files to the top level fields convention * add std.Thread.spinLoopHint * add std.Thread.Condition * add std.Thread.Semaphore * new implementation of std.Thread.Mutex for Windows and non-pthreads Linux * add std.Thread.RwLock Implementations provided by @kprotty
2021-01-11Merge pull request #7195 from Aransentin/masterAndrew Kelley
A win32-api proposal, implemented for user32.zig
2021-01-11Merge pull request #7134 from alexnask/fix_std_fs_watchAndrew Kelley
The std.fs.Watch rewrite PR
2020-12-31Year++Frank Denis
2020-12-14Implement std.fs.Watch on WindowsAlexandros Naskos
Use unmanaged containers in std.fs.Watch
2020-11-22user32 cleanup, added wrappers and additional functionsAransentin
2020-11-19Update code to not use unsupported calling conventions for targetTadeo Kondrak
2020-11-18Switch to RtlSetCurrentDirectory_ULee Cannon
2020-11-18Implement chdir and chdirZ for WindowsLee Cannon
2020-10-15fixups regarding windows wide stringsAndrew Kelley
* remove GetModuleHandleA from kernel32.zig. use of A functions considered harmful. * make it a compile error to expose WinMain instead of wWinMain. same thing. * start code declares wWinMainCRTStartup instead of WinMainCRTStartup when it has the choice.
2020-10-15Merge branch '5002-fix-entrypoint-with-winmain' of ↵Andrew Kelley
https://github.com/AnthonyYoManz/zig into AnthonyYoManz-5002-fix-entrypoint-with-winmain
2020-09-02Add the sync functionsAransentin
2020-08-20add license header to all std lib filesAndrew Kelley
add SPDX license identifier copyright ownership is zig contributors
2020-06-15Implement WinMain Callers that Pass Valid ParamsAnthony Arian
2020-04-22std: Implement progress for WindowsLemonBoy
Use the Win32 API instead of using the VT escape sequences.
2020-04-12std: add some basic windows user32 definitionsdaurnimator
2020-03-12std: Add setEndPos to fs.fileLemonBoy
Allow the user to shrink/grow the file size as needed.
2020-03-06?HMODULE instead of HMODULEAndrew Kelley
2020-02-01windows: Minor changes to psapi prototypesLemonBoy
2020-01-31Merge pull request #4340 from daurnimator/ntstatus-as-enumAndrew Kelley
Windows error codes as non-exhaustive enums
2020-02-01windows: Add GetCurrentProcess definitionLemonBoy
2020-01-31windows: Add psapi APILemonBoy
Export both the "old-style" definitions from psapi and the "new-style" ones from kernel32.
2020-01-31Turn win32 errors into a non-exhaustive enumdaurnimator
2020-01-07Merge branch 'std-utf16-sentinel-terminated' of ↵Andrew Kelley
https://github.com/daurnimator/zig
2020-01-02Implement the callconv() annotationLemonBoy
2019-12-29std: sentinel terminated pointers for utf16 apisdaurnimator
2019-12-10Replace @typeOf with @TypeOf in all zig sourceRobin Voetter
This change was mostly made with `zig fmt` and this also modified some whitespace. Note that in some files, `zig fmt` produced incorrect code, so the change was made manually.
2019-11-27std: improved windows.DeviceIoControldaurnimator
2019-11-27std: add CreateEvent for windowsdaurnimator
2019-11-27std: add WaitForMultipleObjects for windowsdaurnimator
2019-11-27std: add alertable argument for windows.WaitForSingleObjectdaurnimator