func initProc(dll *syscall.DLL, name string) *syscall.Proc { proc, _err := dll.FindProc(name) if _err != nil { log.Fatal("get proc vJoyEnabled", _err) } return proc }
func init() { var modkernel32 *syscall.DLL if modkernel32, findProcErr = syscall.LoadDLL("kernel32.dll"); findProcErr == nil { procGetFileInformationByHandleEx, findProcErr = modkernel32.FindProc("GetFileInformationByHandleEx") } }