LEFT | RIGHT |
(no file at all) | |
1 // mksyscall_windows.pl syscall_windows.go syscall_windows_amd64.go | 1 // mksyscall_windows.pl syscall_windows.go syscall_windows_amd64.go |
2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT | 2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT |
3 | 3 |
4 package syscall | 4 package syscall |
5 | 5 |
6 import "unsafe" | 6 import "unsafe" |
7 | 7 |
8 var ( | 8 var ( |
9 modkernel32 = NewLazyDLL("kernel32.dll") | 9 modkernel32 = NewLazyDLL("kernel32.dll") |
10 modadvapi32 = NewLazyDLL("advapi32.dll") | 10 modadvapi32 = NewLazyDLL("advapi32.dll") |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 errno = int(e1) | 134 errno = int(e1) |
135 } else { | 135 } else { |
136 errno = EINVAL | 136 errno = EINVAL |
137 } | 137 } |
138 } else { | 138 } else { |
139 errno = 0 | 139 errno = 0 |
140 } | 140 } |
141 return | 141 return |
142 } | 142 } |
143 | 143 |
144 func GetProcAddress(module Handle, procname string) (proc Handle, errno int) { | 144 func GetProcAddress(module Handle, procname string) (proc uintptr, errno int) { |
145 » r0, _, e1 := Syscall(procGetProcAddress.Addr(), 2, uintptr(module), uint
ptr(unsafe.Pointer(StringBytePtr(procname))), 0) | 145 » proc, _, e1 := Syscall(procGetProcAddress.Addr(), 2, uintptr(module), ui
ntptr(unsafe.Pointer(StringBytePtr(procname))), 0) |
146 » proc = Handle(r0) | |
147 if proc == 0 { | 146 if proc == 0 { |
148 if e1 != 0 { | 147 if e1 != 0 { |
149 errno = int(e1) | 148 errno = int(e1) |
150 } else { | 149 } else { |
151 errno = EINVAL | 150 errno = EINVAL |
152 } | 151 } |
153 } else { | 152 } else { |
154 errno = 0 | 153 errno = 0 |
155 } | 154 } |
156 return | 155 return |
(...skipping 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 r0, _, _ := Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIf
Row)), 0, 0) | 1313 r0, _, _ := Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIf
Row)), 0, 0) |
1315 errcode = int(r0) | 1314 errcode = int(r0) |
1316 return | 1315 return |
1317 } | 1316 } |
1318 | 1317 |
1319 func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode int) { | 1318 func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode int) { |
1320 r0, _, _ := Syscall(procGetAdaptersInfo.Addr(), 2, uintptr(unsafe.Pointe
r(ai)), uintptr(unsafe.Pointer(ol)), 0) | 1319 r0, _, _ := Syscall(procGetAdaptersInfo.Addr(), 2, uintptr(unsafe.Pointe
r(ai)), uintptr(unsafe.Pointer(ol)), 0) |
1321 errcode = int(r0) | 1320 errcode = int(r0) |
1322 return | 1321 return |
1323 } | 1322 } |
LEFT | RIGHT |