mirror of
https://git.zx2c4.com/wireguard-go
synced 2025-10-06 17:17:02 +08:00
Add support for setupapi.SetupDi(Get|Set)SelectedDevice()
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:

committed by
Jason A. Donenfeld

parent
c15cbefc12
commit
35f72239ac
@@ -227,3 +227,16 @@ func SetupDiClassGuidsFromNameEx(ClassName string, MachineName string) (ClassGui
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
//sys setupDiGetSelectedDevice(DeviceInfoSet DevInfo, DeviceInfoData *SP_DEVINFO_DATA) (err error) = setupapi.SetupDiGetSelectedDevice
|
||||
|
||||
// SetupDiGetSelectedDevice function retrieves the selected device information element in a device information set.
|
||||
func SetupDiGetSelectedDevice(DeviceInfoSet DevInfo) (DeviceInfoData *SP_DEVINFO_DATA, err error) {
|
||||
data := SP_DEVINFO_DATA{}
|
||||
data.Size = uint32(unsafe.Sizeof(data))
|
||||
|
||||
return &data, setupDiGetSelectedDevice(DeviceInfoSet, &data)
|
||||
}
|
||||
|
||||
// SetupDiSetSelectedDevice function sets a device information element as the selected member of a device information set. This function is typically used by an installation wizard.
|
||||
//sys SetupDiSetSelectedDevice(DeviceInfoSet DevInfo, DeviceInfoData *SP_DEVINFO_DATA) (err error) = setupapi.SetupDiSetSelectedDevice
|
||||
|
Reference in New Issue
Block a user