mirror of
https://github.com/fumiama/gozel.git
synced 2026-06-18 00:05:33 +08:00
init: project framework
This commit is contained in:
27
init_windows.go
Normal file
27
init_windows.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package gozel
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
const (
|
||||
zeLibraryName = "ze_loader.dll"
|
||||
)
|
||||
|
||||
var (
|
||||
libZeLoader syscall.DLL
|
||||
)
|
||||
|
||||
func InitZe() error {
|
||||
h, err := syscall.LoadLibrary(zeLibraryName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
libZeLoader = syscall.DLL{Handle: h, Name: zeLibraryName}
|
||||
procZeInitDrivers, err = libZeLoader.FindProc("zeInitDrivers")
|
||||
if err != nil {
|
||||
return fmt.Errorf("zeInitDrivers not found in ze_loader.dll: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user