| 1 | // SPDX-License-Identifier: Apache-2.0 |
| 2 | // SPDX-FileCopyrightText: 2023 The Ebitengine Authors |
| 3 | |
| 4 | package main |
| 5 | |
| 6 | import "syscall" |
| 7 | |
| 8 | func openLibrary(name string) (uintptr, error) { |
| 9 | // Use [syscall.LoadLibrary] here to avoid external dependencies (#270). |
| 10 | // For actual use cases, [golang.org/x/sys/windows.NewLazySystemDLL] is recommended. |
| 11 | handle, err := syscall.LoadLibrary(name) |
| 12 | return uintptr(handle), err |
| 13 | } |