Skip to content

Commit ebcaf25

Browse files
committed
memmod: use resource functions from x/sys
Signed-off-by: Jason A. Donenfeld <[email protected]>
1 parent b3cd88b commit ebcaf25

File tree

4 files changed

+2
-266
lines changed

4 files changed

+2
-266
lines changed

tun/wintun/dll_fromrsrc_windows.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"golang.org/x/sys/windows"
1717

1818
"golang.zx2c4.com/wireguard/tun/wintun/memmod"
19-
"golang.zx2c4.com/wireguard/tun/wintun/resource"
2019
)
2120

2221
type lazyDLL struct {
@@ -37,11 +36,11 @@ func (d *lazyDLL) Load() error {
3736
}
3837

3938
const ourModule windows.Handle = 0
40-
resInfo, err := resource.FindByName(ourModule, d.Name, resource.RT_RCDATA)
39+
resInfo, err := windows.FindResource(ourModule, d.Name, windows.RT_RCDATA)
4140
if err != nil {
4241
return fmt.Errorf("Unable to find \"%v\" RCDATA resource: %w", d.Name, err)
4342
}
44-
data, err := resource.Load(ourModule, resInfo)
43+
data, err := windows.LoadResourceData(ourModule, resInfo)
4544
if err != nil {
4645
return fmt.Errorf("Unable to load resource: %w", err)
4746
}

tun/wintun/resource/mksyscall.go

Lines changed: 0 additions & 8 deletions
This file was deleted.

tun/wintun/resource/resource_windows.go

Lines changed: 0 additions & 143 deletions
This file was deleted.

tun/wintun/resource/zsyscall_windows.go

Lines changed: 0 additions & 112 deletions
This file was deleted.

0 commit comments

Comments
 (0)