setupapi: Rename SP_REMOVEDEVICE_PARAMS to RemoveDeviceParams

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2019-02-07 23:00:52 +01:00
parent 9d830826c5
commit 0525f6b112
2 changed files with 4 additions and 4 deletions

View File

@ -284,8 +284,8 @@ const (
DI_REMOVEDEVICE_CONFIGSPECIFIC DI_REMOVEDEVICE = 0x00000002 // Make this change to only the hardware profile specified by HwProfile. this flag only applies to root-enumerated devices. When Windows removes the device from the last hardware profile in which it was configured, Windows performs a global removal. DI_REMOVEDEVICE_CONFIGSPECIFIC DI_REMOVEDEVICE = 0x00000002 // Make this change to only the hardware profile specified by HwProfile. this flag only applies to root-enumerated devices. When Windows removes the device from the last hardware profile in which it was configured, Windows performs a global removal.
) )
// SP_REMOVEDEVICE_PARAMS is a structure corresponding to a DIF_REMOVE install function. // RemoveDeviceParams is a structure corresponding to a DIF_REMOVE install function.
type SP_REMOVEDEVICE_PARAMS struct { type RemoveDeviceParams struct {
ClassInstallHeader ClassInstallHeader ClassInstallHeader ClassInstallHeader
Scope DI_REMOVEDEVICE Scope DI_REMOVEDEVICE
HwProfile uint32 HwProfile uint32

View File

@ -249,7 +249,7 @@ func CreateInterface(description string, hwndParent uintptr) (*Wintun, bool, err
} }
// The interface failed to install, or the interface ID was unobtainable. Clean-up. // The interface failed to install, or the interface ID was unobtainable. Clean-up.
removeDeviceParams := setupapi.SP_REMOVEDEVICE_PARAMS{ removeDeviceParams := setupapi.RemoveDeviceParams{
ClassInstallHeader: *setupapi.MakeClassInstallHeader(setupapi.DIF_REMOVE), ClassInstallHeader: *setupapi.MakeClassInstallHeader(setupapi.DIF_REMOVE),
Scope: setupapi.DI_REMOVEDEVICE_GLOBAL, Scope: setupapi.DI_REMOVEDEVICE_GLOBAL,
} }
@ -310,7 +310,7 @@ func (wintun *Wintun) DeleteInterface(hwndParent uintptr) (bool, bool, error) {
if *ifid == *ifid2 { if *ifid == *ifid2 {
// Remove the device. // Remove the device.
removeDeviceParams := setupapi.SP_REMOVEDEVICE_PARAMS{ removeDeviceParams := setupapi.RemoveDeviceParams{
ClassInstallHeader: *setupapi.MakeClassInstallHeader(setupapi.DIF_REMOVE), ClassInstallHeader: *setupapi.MakeClassInstallHeader(setupapi.DIF_REMOVE),
Scope: setupapi.DI_REMOVEDEVICE_GLOBAL, Scope: setupapi.DI_REMOVEDEVICE_GLOBAL,
} }