commit | fe61309f888157de161a48facf03d9412635cffe | [log] [tgz] |
---|---|---|
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 |
tree | eac88e154a161b52c6af3fded2447daf4c313bda | |
parent | ef496fb156abb033f71ae4fa16812778efe144f5 [diff] |
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 <pnyb@google.com> Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Simon Rozman <simon@rozman.si> Reviewed-by: Patrik Nyblom <pnyb@google.com>
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 $GOPATH/src/golang.org/x/sys
.
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.