# Windows: Rework kernel32 apis · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/3095e83d1162081ba54ed73c59810bfe0fb3f025)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 3095e83d1162081ba54ed73c59810bfe0fb3f025

Requested commit: 3095e83d1162081ba54ed73c59810bfe0fb3f025

Commit: 3095e83d1162081ba54ed73c59810bfe0fb3f025

Tree: efd632f73b81439d7197c51b4a1f01eacb934a67

Author: Stephen Gregoratto

Committer: Stephen Gregoratto

## Message

```
Windows: Rework kernel32 apis

To facilitate #1840, this commit slims `std.windows.kernel32` to only
have the functions needed by the standard library. Since this will break
projects that relied on these, I offer two solutions:

- Make an argument as to why certain functions should be added back in.
  Note that they may just be wrappers around `ntdll` APIs, which would
  go against #1840.
  If necessary I'll add them back in *and* make wrappers in
  `std.windows` for it.
- Maintain your own list of APIs. This is the option taken by bun[1],
  where they wrap functions with tracing.
- Use `zigwin32`.

I've also added TODO comments that specify which functions can be
reimplemented using `ntdll` APIs in the future.

Other changes:
- Group functions into groups (I/O, process management etc.).
- Synchronize definitions against Microsoft documentation to use the
  proper parameter types/names.
- Break all functions with parameters over multiple lines.

```

## Parents

- [1735455099cb75acb970f549e579368e2a447405](https://git.cafe/gitcafe/zig/commit/1735455099cb75acb970f549e579368e2a447405?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/3095e83d1162081ba54ed73c59810bfe0fb3f025?format=markdown)
