|author||Jason A. Donenfeld <Jason@zx2c4.com>||Wed Oct 27 15:23:03 2021 +0200|
|committer||Jason A. Donenfeld <Jason@zx2c4.com>||Wed Nov 24 21:15:45 2021 +0000|
windows: add SetupAPI and CfgMgr32 functions Simon and I have worked on these on and off for a number of projects over the last 3 years and by now it's quite stable and mature. Rather than carrying this around privately, these have now been updated to be in the style of x/sys/windows, in this case matching how the security_windows.go file does things. Specifically, because these APIs are kind of hard to work with, and quite lengthy, we split them off into a setupapi_windows.go file, just like security_windows.go. We already had the setupapierrors_windows.go file, so that's been folded into the new one that contains the additional definitions nad functions. These APIs are among the most obtuse to work with in all of Win32, so considerable attention has been spent trying to make these wrappers both quite "raw" so that they match the win32, but also accessible from Go. The fact that they're so old in Windows history makes for a few tricky things, like struct padding that doesn't quite match Go's rules, but we've been able to accommodate basically everything after quite a bit of work. Change-Id: I0c2dd85e4bb40eee10186ffc92558a858bdf8c6a Reviewed-on: https://go-review.googlesource.com/c/sys/+/366654 Trust: Jason A. Donenfeld <Jason@zx2c4.com> Trust: Patrik Nyblom <email@example.com> Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Go Bot <firstname.lastname@example.org> Reviewed-by: Simon Rozman <email@example.com> Reviewed-by: Patrik Nyblom <firstname.lastname@example.org>
This repository holds supplemental Go packages for low-level interactions with the operating system.
The easiest way to install is to run
go get -u golang.org/x/sys. You can also manually git clone the repository to
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the sys repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/sys:” in the subject line, so it is easy to find.