summaryrefslogtreecommitdiffstats
path: root/src/runtime/testdata/testwinlibthrow/main.go
blob: ce0c92f252ffefa49e58a0ca9008773bfcada341 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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()
	}
}