github.com/ebitengine/purego@v0.8.0-alpha.2.0.20240512170805-6cd12240d332/internal/load/load_windows.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: 2024 The Ebitengine Authors 3 4 package load 5 6 import "golang.org/x/sys/windows" 7 8 func OpenLibrary(name string) (uintptr, error) { 9 handle, err := windows.LoadLibrary(name) 10 return uintptr(handle), err 11 } 12 13 func OpenSymbol(lib uintptr, name string) (uintptr, error) { 14 return windows.GetProcAddress(windows.Handle(lib), name) 15 }