openLibrary_windows.go 414 B

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