]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
setupapi: Rename SP_REMOVEDEVICE_PARAMS to RemoveDeviceParams
authorSimon Rozman <simon@rozman.si>
Thu, 7 Feb 2019 22:00:52 +0000 (23:00 +0100)
committerSimon Rozman <simon@rozman.si>
Thu, 7 Feb 2019 22:50:43 +0000 (23:50 +0100)
Signed-off-by: Simon Rozman <simon@rozman.si>
tun/wintun/setupapi/types_windows.go
tun/wintun/wintun_windows.go

index 7994f3c63f97b7c360a7e27a3f89f8ca5f9c1ed1..c024b111db7cfd96a13535dc402d83a149a030a1 100644 (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.
 )
 
-// SP_REMOVEDEVICE_PARAMS is a structure corresponding to a DIF_REMOVE install function.
-type SP_REMOVEDEVICE_PARAMS struct {
+// RemoveDeviceParams is a structure corresponding to a DIF_REMOVE install function.
+type RemoveDeviceParams struct {
        ClassInstallHeader ClassInstallHeader
        Scope              DI_REMOVEDEVICE
        HwProfile          uint32
index 176369216e809e1f5b0574a20ba9bfb9149f9493..6cc7bbb5122940e5c48730bf831eeb2289cdcb92 100644 (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.
-       removeDeviceParams := setupapi.SP_REMOVEDEVICE_PARAMS{
+       removeDeviceParams := setupapi.RemoveDeviceParams{
                ClassInstallHeader: *setupapi.MakeClassInstallHeader(setupapi.DIF_REMOVE),
                Scope:              setupapi.DI_REMOVEDEVICE_GLOBAL,
        }
@@ -310,7 +310,7 @@ func (wintun *Wintun) DeleteInterface(hwndParent uintptr) (bool, bool, error) {
 
                if *ifid == *ifid2 {
                        // Remove the device.
-                       removeDeviceParams := setupapi.SP_REMOVEDEVICE_PARAMS{
+                       removeDeviceParams := setupapi.RemoveDeviceParams{
                                ClassInstallHeader: *setupapi.MakeClassInstallHeader(setupapi.DIF_REMOVE),
                                Scope:              setupapi.DI_REMOVEDEVICE_GLOBAL,
                        }