Skip to content

Commit

Permalink
memmod: use resource functions from x/sys
Browse files Browse the repository at this point in the history
Signed-off-by: Jason A. Donenfeld <[email protected]>
  • Loading branch information
zx2c4 committed Mar 9, 2021
1 parent 497ba95 commit 4885e7c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 266 deletions.
5 changes: 2 additions & 3 deletions tun/wintun/dll_fromrsrc_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
}
Expand Down
8 changes: 0 additions & 8 deletions tun/wintun/resource/mksyscall.go

This file was deleted.

143 changes: 0 additions & 143 deletions tun/wintun/resource/resource_windows.go

This file was deleted.

112 changes: 0 additions & 112 deletions tun/wintun/resource/zsyscall_windows.go

This file was deleted.

0 comments on commit 4885e7c

Please sign in to comment.