summaryrefslogtreecommitdiff
path: root/tun/wintun/dll_fromrsrc_windows.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-03-03 15:05:19 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-03-08 21:04:09 -0700
commit4885e7c9549e8d6812eb7aa069e863a349f50e84 (patch)
tree65871ccc7e13c6de5b0385cc703753dc56a29ff0 /tun/wintun/dll_fromrsrc_windows.go
parent497ba95de7833566d696768c8a366e39fdb40f8b (diff)
downloadwireguard-go-4885e7c9549e8d6812eb7aa069e863a349f50e84.tar.gz
wireguard-go-4885e7c9549e8d6812eb7aa069e863a349f50e84.zip
memmod: use resource functions from x/sys
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tun/wintun/dll_fromrsrc_windows.go')
-rw-r--r--tun/wintun/dll_fromrsrc_windows.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/tun/wintun/dll_fromrsrc_windows.go b/tun/wintun/dll_fromrsrc_windows.go
index d107ba9..dc70486 100644
--- a/tun/wintun/dll_fromrsrc_windows.go
+++ b/tun/wintun/dll_fromrsrc_windows.go
@@ -16,7 +16,6 @@ import (
"golang.org/x/sys/windows"
"golang.zx2c4.com/wireguard/tun/wintun/memmod"
- "golang.zx2c4.com/wireguard/tun/wintun/resource"
)
type lazyDLL struct {
@@ -37,11 +36,11 @@ func (d *lazyDLL) Load() error {
}
const ourModule windows.Handle = 0
- resInfo, err := resource.FindByName(ourModule, d.Name, resource.RT_RCDATA)
+ resInfo, err := windows.FindResource(ourModule, d.Name, windows.RT_RCDATA)
if err != nil {
return fmt.Errorf("Unable to find \"%v\" RCDATA resource: %w", d.Name, err)
}
- data, err := resource.Load(ourModule, resInfo)
+ data, err := windows.LoadResourceData(ourModule, resInfo)
if err != nil {
return fmt.Errorf("Unable to load resource: %w", err)
}