LEFT | RIGHT |
(Both sides are equal) |
1 // Copyright 2012 The Go Authors. All rights reserved. | 1 // Copyright 2012 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package syscall_test | 5 package syscall_test |
6 | 6 |
7 import ( | 7 import ( |
8 "io/ioutil" | 8 "io/ioutil" |
9 "os" | 9 "os" |
10 "path/filepath" | 10 "path/filepath" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 proc, err := syscall.GetProcAddress(h, "GetVersion") | 63 proc, err := syscall.GetProcAddress(h, "GetVersion") |
64 if err != nil { | 64 if err != nil { |
65 abort("GetProcAddress", err) | 65 abort("GetProcAddress", err) |
66 } | 66 } |
67 r, _, _ := syscall.Syscall(uintptr(proc), 0, 0, 0, 0) | 67 r, _, _ := syscall.Syscall(uintptr(proc), 0, 0, 0, 0) |
68 major := byte(r) | 68 major := byte(r) |
69 minor := uint8(r >> 8) | 69 minor := uint8(r >> 8) |
70 build := uint16(r >> 16) | 70 build := uint16(r >> 16) |
71 print("windows version ", major, ".", minor, " (Build ", build, ")\n") | 71 print("windows version ", major, ".", minor, " (Build ", build, ")\n") |
72 } | 72 } |
LEFT | RIGHT |