summaryrefslogtreecommitdiffhomepage
path: root/tun/wintun
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-02-07 23:00:52 +0100
committerSimon Rozman <simon@rozman.si>2019-02-07 23:50:43 +0100
commit0525f6b112b21250f028c1373bbd4ecf3df1702b (patch)
tree7706173655109667c973b8ab80b8621a7fc2988b /tun/wintun
parent9d830826c53d9b8cd14cf0fcd43fdf4183de4c47 (diff)
setupapi: Rename SP_REMOVEDEVICE_PARAMS to RemoveDeviceParams
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'tun/wintun')
-rw-r--r--tun/wintun/setupapi/types_windows.go4
-rw-r--r--tun/wintun/wintun_windows.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/tun/wintun/setupapi/types_windows.go b/tun/wintun/setupapi/types_windows.go
index 7994f3c..c024b11 100644
--- a/tun/wintun/setupapi/types_windows.go
+++ b/tun/wintun/setupapi/types_windows.go
@@ -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
diff --git a/tun/wintun/wintun_windows.go b/tun/wintun/wintun_windows.go
index 1763692..6cc7bbb 100644
--- a/tun/wintun/wintun_windows.go
+++ b/tun/wintun/wintun_windows.go
@@ -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,
}