...

Source file src/runtime/testdata/testwinlibthrow/main.go

Documentation: runtime/testdata/testwinlibthrow

     1  package main
     2  
     3  import (
     4  	"os"
     5  	"syscall"
     6  )
     7  
     8  func main() {
     9  	dll := syscall.MustLoadDLL("veh.dll")
    10  	RaiseNoExcept := dll.MustFindProc("RaiseNoExcept")
    11  	ThreadRaiseNoExcept := dll.MustFindProc("ThreadRaiseNoExcept")
    12  
    13  	thread := len(os.Args) > 1 && os.Args[1] == "thread"
    14  	if !thread {
    15  		RaiseNoExcept.Call()
    16  	} else {
    17  		ThreadRaiseNoExcept.Call()
    18  	}
    19  }
    20  

View as plain text