diff options
Diffstat (limited to 'src/runtime/testdata/testwinlibthrow/main.go')
| -rw-r--r-- | src/runtime/testdata/testwinlibthrow/main.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/runtime/testdata/testwinlibthrow/main.go b/src/runtime/testdata/testwinlibthrow/main.go new file mode 100644 index 0000000000..50c483f401 --- /dev/null +++ b/src/runtime/testdata/testwinlibthrow/main.go @@ -0,0 +1,23 @@ +package main
+
+import (
+ "os"
+ "syscall"
+)
+
+func main() {
+ dll := syscall.MustLoadDLL("veh.dll")
+ RaiseExcept := dll.MustFindProc("RaiseExcept")
+ RaiseNoExcept := dll.MustFindProc("RaiseNoExcept")
+ ThreadRaiseExcept := dll.MustFindProc("ThreadRaiseExcept")
+ ThreadRaiseNoExcept := dll.MustFindProc("ThreadRaiseNoExcept")
+
+ thread := len(os.Args) > 1 && os.Args[1] == "thread"
+ if !thread {
+ RaiseExcept.Call()
+ RaiseNoExcept.Call()
+ } else {
+ ThreadRaiseExcept.Call()
+ ThreadRaiseNoExcept.Call()
+ }
+}
|
