File: kernel32_data_windows.go

package info (click to toggle)
golang-github-mattn-go-ieproxy 0.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 192 kB
  • sloc: makefile: 2
file content (19 lines) | stat: -rw-r--r-- 337 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package ieproxy

import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var kernel32 = windows.NewLazySystemDLL("kernel32.dll")
var globalFree = kernel32.NewProc("GlobalFree")

func globalFreeWrapper(ptr *uint16) {
	if ptr != nil {
		_, _, _ = globalFree.Call(uintptr(unsafe.Pointer(ptr)))
	}
}

func rTrue(r uintptr) bool {
	return r == 1
}