1
0
mirror of https://git.zx2c4.com/wireguard-go synced 2024-11-15 09:15:14 +01:00
Commit Graph

24 Commits

Author SHA1 Message Date
Jason A. Donenfeld
3b7a4fa3ef setupapi: Lower case params 2019-02-07 03:46:31 +01:00
Simon Rozman
3c29434a79 setupapi: Make toUTF16() public and add UTF16ToBuf() counterpart
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-06 20:15:40 +01:00
Simon Rozman
3e8f2e3fa5 setupapi: Add support for driver info lists
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 16:29:17 +01:00
Simon Rozman
7b636380e5 setupapi: Move Go<>Windows struct marshaling to types_windows.go
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 14:03:28 +01:00
Simon Rozman
99a3b628e9 setupapi: Add support for SetupDi(Get|Set)DeviceRegistryProperty()
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
e7ffce0d21 setupapi: Introduce DevInfo methods for cleaner code
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
35f72239ac Add support for setupapi.SetupDi(Get|Set)SelectedDevice()
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
c15cbefc12 Reorder data-types and functions to match SetupAPI.h
Adding functions with non-consistent order made setupapi package a mess.
While we could reorder data-types and functions by alphabet - it would
make searching easier - it would put ...Get... and ...Set... functions
quite apart.

Therefore, the SetupAPI.h order was adopted.

Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
dd998ca86a Add support for setupapi.SetupDiCreateDeviceInfo()
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
024a4916c2 Add support for setupapi.setupDiCreateDeviceInfoListEx()
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
e821cdabd2 Unify certain variable names
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
38c7acd70f Simplify SetupDiEnumDeviceInfo() synopsis
The SetupDiEnumDeviceInfo() now returns a SP_DEVINFO_DATA rather than
taking it on input to fill it on return.

Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
20f1512b7c Change generic local variable names with meaningful replacements
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
348b4e9f7c Add support for setupapi.SetupDiClassGuidsFromNameEx()
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
3e0e61dd26 Replace SetupDiClassNameFromGuid() with SetupDiClassNameFromGuidEx()
The former is only a subset of the later. To minimize future
maintenance, we'll provide support for extended version only.

Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
9635a0b3a6 Add support for setupapi.SetupDiClassNameFromGuid()
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
269944002f Add support for setupapi.SetupDiCallClassInstaller()
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
a5a1ece32f Add support for setupapi.SetupDi(Get|Set)ClassInstallParams()
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
f1d5db6547 Add support for setupapi.SetupDi(Get|Set)DeviceInstallParams()
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
dce5192d86 Add support for setupapi.SetupDiOpenDevRegKey()
Furthermore setupapi.DevInfoData has been obsoleted.
SetupDiEnumDeviceInfo() fills existing SP_DEVINFO_DATA structure now.
As other functions of SetupAPI use SP_DEVINFO_DATA, converting it to
DevInfoData and back would hurt performance.

Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
955d8dfe04 Add support for setupapi.SetupDiEnumDeviceInfo()
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
45959c116a Add support for setupapi.SetupDiGetDeviceInfoListDetail()
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
d41bc015cc Finish support for setupapi.SetupDiGetClassDevsEx()
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00
Simon Rozman
31949136df Introduce SetupAPI - Windows device and driver management API
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-02-05 12:59:42 +01:00