Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for MustFindProc (0.17 sec)

  1. src/runtime/testdata/testwinlibthrow/main.go

    package main
    
    import (
    	"os"
    	"syscall"
    )
    
    func main() {
    	dll := syscall.MustLoadDLL("veh.dll")
    	RaiseNoExcept := dll.MustFindProc("RaiseNoExcept")
    	ThreadRaiseNoExcept := dll.MustFindProc("ThreadRaiseNoExcept")
    
    	thread := len(os.Args) > 1 && os.Args[1] == "thread"
    	if !thread {
    		RaiseNoExcept.Call()
    	} else {
    		ThreadRaiseNoExcept.Call()
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 15:33:38 UTC 2023
    - 348 bytes
    - Viewed (0)
  2. src/runtime/syscall_windows_test.go

    	}
    	panic("not reached")
    }
    
    func resumeChildThread(kernel32 *syscall.DLL, childpid int) error {
    	_OpenThread := kernel32.MustFindProc("OpenThread")
    	_ResumeThread := kernel32.MustFindProc("ResumeThread")
    	_Thread32First := kernel32.MustFindProc("Thread32First")
    	_Thread32Next := kernel32.MustFindProc("Thread32Next")
    
    	snapshot, err := syscall.CreateToolhelp32Snapshot(syscall.TH32CS_SNAPTHREAD, 0)
    	if err != nil {
    		return err
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 31 16:31:35 UTC 2023
    - 32.5K bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/ws2_32.txt

    go 1.21
    
    -- utils.go --
    package main
    
    import (
    	"fmt"
    	"syscall"
    	"unsafe"
    )
    
    func hasModuleHandle() {
    	const ws2_32 = "ws2_32.dll"
    	getModuleHandle := syscall.MustLoadDLL("kernel32.dll").MustFindProc("GetModuleHandleW")
    	mod, _, _ := getModuleHandle.Call(uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(ws2_32))))
    	if mod != 0 {
    		fmt.Println(ws2_32+":", "found")
    	} else {
    		fmt.Println(ws2_32+":", "not found")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 23 18:57:32 UTC 2024
    - 730 bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/test/issue8517_windows.go

    import "C"
    
    import (
    	"syscall"
    	"testing"
    	"unsafe"
    )
    
    var issue8517counter int
    
    var (
    	kernel32              = syscall.MustLoadDLL("kernel32.dll")
    	getProcessHandleCount = kernel32.MustFindProc("GetProcessHandleCount")
    )
    
    func processHandleCount(t *testing.T) int {
    	const current_process = ^uintptr(0)
    	var c uint32
    	r, _, err := getProcessHandleCount.Call(current_process, uintptr(unsafe.Pointer(&c)))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 990 bytes
    - Viewed (0)
  5. src/runtime/testdata/testprog/syscall_windows.go

    	register("ZeroDivisionException", ZeroDivisionException)
    	register("StackMemory", StackMemory)
    }
    
    func RaiseException() {
    	const EXCEPTION_NONCONTINUABLE = 1
    	mod := syscall.MustLoadDLL("kernel32.dll")
    	proc := mod.MustFindProc("RaiseException")
    	proc.Call(0xbad, EXCEPTION_NONCONTINUABLE, 0, 0)
    	println("RaiseException should not return")
    }
    
    func ZeroDivisionException() {
    	x := 1
    	y := 0
    	z := x / y
    	println(z)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 23 17:31:31 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  6. src/syscall/dll_windows.go

    		}
    	}
    	p := &Proc{
    		Dll:  d,
    		Name: name,
    		addr: a,
    	}
    	return p, nil
    }
    
    // MustFindProc is like [DLL.FindProc] but panics if search fails.
    func (d *DLL) MustFindProc(name string) *Proc {
    	p, e := d.FindProc(name)
    	if e != nil {
    		panic(e)
    	}
    	return p
    }
    
    // Release unloads [DLL] d from memory.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/sys/windows/dll_windows.go

    		}
    	}
    	p := &Proc{
    		Dll:  d,
    		Name: name,
    		addr: a,
    	}
    	return p, nil
    }
    
    // MustFindProc is like FindProc but panics if search fails.
    func (d *DLL) MustFindProc(name string) *Proc {
    	p, e := d.FindProc(name)
    	if e != nil {
    		panic(e)
    	}
    	return p
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Dec 05 12:36:42 UTC 2020
    - 12K bytes
    - Viewed (0)
  8. src/debug/pe/file_test.go

    }
    
    func main() {
    	kernel32 := syscall.MustLoadDLL("kernel32.dll")
    	psapi := syscall.MustLoadDLL("psapi.dll")
    	getModuleHandle := kernel32.MustFindProc("GetModuleHandleW")
    	getCurrentProcess := kernel32.MustFindProc("GetCurrentProcess")
    	getModuleInformation := psapi.MustFindProc("GetModuleInformation")
    
    	procHandle, _, _ := getCurrentProcess.Call()
    	moduleHandle, _, err := getModuleHandle.Call(0)
    	if moduleHandle == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 01 02:25:16 UTC 2023
    - 22.3K bytes
    - Viewed (0)
  9. pkg/kubelet/network/dns/dns_windows.go

    	// see: https://docs.microsoft.com/windows/win32/api/iphlpapi/nf-iphlpapi-getnetworkparams
    	iphlpapidll          = windows.MustLoadDLL("iphlpapi.dll")
    	procGetNetworkParams = iphlpapidll.MustFindProc("GetNetworkParams")
    )
    
    func fileExists(filename string) (bool, error) {
    	stat, err := os.Stat(filename)
    	if os.IsNotExist(err) {
    		return false, nil
    	}
    	if err != nil {
    		return false, err
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 21 22:21:57 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"Uint64", Type, 19},
    		{"Uintptr", Type, 19},
    		{"Value", Type, 4},
    	},
    	"syscall": {
    		{"(*Cmsghdr).SetLen", Method, 0},
    		{"(*DLL).FindProc", Method, 0},
    		{"(*DLL).MustFindProc", Method, 0},
    		{"(*DLL).Release", Method, 0},
    		{"(*DLLError).Error", Method, 0},
    		{"(*DLLError).Unwrap", Method, 16},
    		{"(*Filetime).Nanoseconds", Method, 0},
    		{"(*Iovec).SetLen", Method, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top