LEFT | RIGHT |
(no file at all) | |
1 // mksyscall_windows.pl -l32 syscall_windows.go security_windows.go syscall_wind
ows_386.go | 1 // mksyscall_windows.pl -l32 syscall_windows.go security_windows.go syscall_wind
ows_386.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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 procCertFreeCertificateChain = modcrypt32.NewProc("CertFreeCerti
ficateChain") | 97 procCertFreeCertificateChain = modcrypt32.NewProc("CertFreeCerti
ficateChain") |
98 procCertCreateCertificateContext = modcrypt32.NewProc("CertCreateCer
tificateContext") | 98 procCertCreateCertificateContext = modcrypt32.NewProc("CertCreateCer
tificateContext") |
99 procCertFreeCertificateContext = modcrypt32.NewProc("CertFreeCerti
ficateContext") | 99 procCertFreeCertificateContext = modcrypt32.NewProc("CertFreeCerti
ficateContext") |
100 procCertVerifyCertificateChainPolicy = modcrypt32.NewProc("CertVerifyCer
tificateChainPolicy") | 100 procCertVerifyCertificateChainPolicy = modcrypt32.NewProc("CertVerifyCer
tificateChainPolicy") |
101 procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyEx
W") | 101 procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyEx
W") |
102 procRegCloseKey = modadvapi32.NewProc("RegCloseKey"
) | 102 procRegCloseKey = modadvapi32.NewProc("RegCloseKey"
) |
103 procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfo
KeyW") | 103 procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfo
KeyW") |
104 procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyEx
W") | 104 procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyEx
W") |
105 procRegQueryValueExW = modadvapi32.NewProc("RegQueryValu
eExW") | 105 procRegQueryValueExW = modadvapi32.NewProc("RegQueryValu
eExW") |
106 procGetCurrentProcessId = modkernel32.NewProc("GetCurrentPr
ocessId") | 106 procGetCurrentProcessId = modkernel32.NewProc("GetCurrentPr
ocessId") |
| 107 procGetConsoleMode = modkernel32.NewProc("GetConsoleMo
de") |
| 108 procWriteConsoleW = modkernel32.NewProc("WriteConsole
W") |
107 procWSAStartup = modws2_32.NewProc("WSAStartup") | 109 procWSAStartup = modws2_32.NewProc("WSAStartup") |
108 procWSACleanup = modws2_32.NewProc("WSACleanup") | 110 procWSACleanup = modws2_32.NewProc("WSACleanup") |
109 procWSAIoctl = modws2_32.NewProc("WSAIoctl") | 111 procWSAIoctl = modws2_32.NewProc("WSAIoctl") |
110 procsocket = modws2_32.NewProc("socket") | 112 procsocket = modws2_32.NewProc("socket") |
111 procsetsockopt = modws2_32.NewProc("setsockopt") | 113 procsetsockopt = modws2_32.NewProc("setsockopt") |
112 procgetsockopt = modws2_32.NewProc("getsockopt") | 114 procgetsockopt = modws2_32.NewProc("getsockopt") |
113 procbind = modws2_32.NewProc("bind") | 115 procbind = modws2_32.NewProc("bind") |
114 procconnect = modws2_32.NewProc("connect") | 116 procconnect = modws2_32.NewProc("connect") |
115 procgetsockname = modws2_32.NewProc("getsockname") | 117 procgetsockname = modws2_32.NewProc("getsockname") |
116 procgetpeername = modws2_32.NewProc("getpeername") | 118 procgetpeername = modws2_32.NewProc("getpeername") |
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 } | 1192 } |
1191 return | 1193 return |
1192 } | 1194 } |
1193 | 1195 |
1194 func getCurrentProcessId() (pid uint32) { | 1196 func getCurrentProcessId() (pid uint32) { |
1195 r0, _, _ := Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0) | 1197 r0, _, _ := Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0) |
1196 pid = uint32(r0) | 1198 pid = uint32(r0) |
1197 return | 1199 return |
1198 } | 1200 } |
1199 | 1201 |
| 1202 func GetConsoleMode(console Handle, mode *uint32) (err error) { |
| 1203 r1, _, e1 := Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uin
tptr(unsafe.Pointer(mode)), 0) |
| 1204 if int(r1) == 0 { |
| 1205 if e1 != 0 { |
| 1206 err = error(e1) |
| 1207 } else { |
| 1208 err = EINVAL |
| 1209 } |
| 1210 } |
| 1211 return |
| 1212 } |
| 1213 |
| 1214 func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32,
reserved *byte) (err error) { |
| 1215 r1, _, e1 := Syscall6(procWriteConsoleW.Addr(), 5, uintptr(console), uin
tptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), u
intptr(unsafe.Pointer(reserved)), 0) |
| 1216 if int(r1) == 0 { |
| 1217 if e1 != 0 { |
| 1218 err = error(e1) |
| 1219 } else { |
| 1220 err = EINVAL |
| 1221 } |
| 1222 } |
| 1223 return |
| 1224 } |
| 1225 |
1200 func WSAStartup(verreq uint32, data *WSAData) (sockerr error) { | 1226 func WSAStartup(verreq uint32, data *WSAData) (sockerr error) { |
1201 r0, _, _ := Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(u
nsafe.Pointer(data)), 0) | 1227 r0, _, _ := Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(u
nsafe.Pointer(data)), 0) |
1202 if r0 != 0 { | 1228 if r0 != 0 { |
1203 sockerr = Errno(r0) | 1229 sockerr = Errno(r0) |
1204 } | 1230 } |
1205 return | 1231 return |
1206 } | 1232 } |
1207 | 1233 |
1208 func WSACleanup() (err error) { | 1234 func WSACleanup() (err error) { |
1209 r1, _, e1 := Syscall(procWSACleanup.Addr(), 0, 0, 0, 0) | 1235 r1, _, e1 := Syscall(procWSACleanup.Addr(), 0, 0, 0, 0) |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1648 r1, _, e1 := Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t),
uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen))) | 1674 r1, _, e1 := Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t),
uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen))) |
1649 if int(r1) == 0 { | 1675 if int(r1) == 0 { |
1650 if e1 != 0 { | 1676 if e1 != 0 { |
1651 err = error(e1) | 1677 err = error(e1) |
1652 } else { | 1678 } else { |
1653 err = EINVAL | 1679 err = EINVAL |
1654 } | 1680 } |
1655 } | 1681 } |
1656 return | 1682 return |
1657 } | 1683 } |
LEFT | RIGHT |