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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 procCertFreeCertificateContext = modcrypt32.NewProc("CertFreeCerti
ficateContext") | 100 procCertFreeCertificateContext = modcrypt32.NewProc("CertFreeCerti
ficateContext") |
101 procCertVerifyCertificateChainPolicy = modcrypt32.NewProc("CertVerifyCer
tificateChainPolicy") | 101 procCertVerifyCertificateChainPolicy = modcrypt32.NewProc("CertVerifyCer
tificateChainPolicy") |
102 procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyEx
W") | 102 procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyEx
W") |
103 procRegCloseKey = modadvapi32.NewProc("RegCloseKey"
) | 103 procRegCloseKey = modadvapi32.NewProc("RegCloseKey"
) |
104 procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfo
KeyW") | 104 procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfo
KeyW") |
105 procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyEx
W") | 105 procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyEx
W") |
106 procRegQueryValueExW = modadvapi32.NewProc("RegQueryValu
eExW") | 106 procRegQueryValueExW = modadvapi32.NewProc("RegQueryValu
eExW") |
107 procGetCurrentProcessId = modkernel32.NewProc("GetCurrentPr
ocessId") | 107 procGetCurrentProcessId = modkernel32.NewProc("GetCurrentPr
ocessId") |
108 procGetConsoleMode = modkernel32.NewProc("GetConsoleMo
de") | 108 procGetConsoleMode = modkernel32.NewProc("GetConsoleMo
de") |
109 procWriteConsoleW = modkernel32.NewProc("WriteConsole
W") | 109 procWriteConsoleW = modkernel32.NewProc("WriteConsole
W") |
| 110 procGetModuleFileNameW = modkernel32.NewProc("GetModuleFil
eNameW") |
110 procWSAStartup = modws2_32.NewProc("WSAStartup") | 111 procWSAStartup = modws2_32.NewProc("WSAStartup") |
111 procWSACleanup = modws2_32.NewProc("WSACleanup") | 112 procWSACleanup = modws2_32.NewProc("WSACleanup") |
112 procWSAIoctl = modws2_32.NewProc("WSAIoctl") | 113 procWSAIoctl = modws2_32.NewProc("WSAIoctl") |
113 procsocket = modws2_32.NewProc("socket") | 114 procsocket = modws2_32.NewProc("socket") |
114 procsetsockopt = modws2_32.NewProc("setsockopt") | 115 procsetsockopt = modws2_32.NewProc("setsockopt") |
115 procgetsockopt = modws2_32.NewProc("getsockopt") | 116 procgetsockopt = modws2_32.NewProc("getsockopt") |
116 procbind = modws2_32.NewProc("bind") | 117 procbind = modws2_32.NewProc("bind") |
117 procconnect = modws2_32.NewProc("connect") | 118 procconnect = modws2_32.NewProc("connect") |
118 procgetsockname = modws2_32.NewProc("getsockname") | 119 procgetsockname = modws2_32.NewProc("getsockname") |
119 procgetpeername = modws2_32.NewProc("getpeername") | 120 procgetpeername = modws2_32.NewProc("getpeername") |
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1231 if r1 == 0 { | 1232 if r1 == 0 { |
1232 if e1 != 0 { | 1233 if e1 != 0 { |
1233 err = error(e1) | 1234 err = error(e1) |
1234 } else { | 1235 } else { |
1235 err = EINVAL | 1236 err = EINVAL |
1236 } | 1237 } |
1237 } | 1238 } |
1238 return | 1239 return |
1239 } | 1240 } |
1240 | 1241 |
| 1242 func GetModuleFileName(module Handle, fn *uint16, len uint32) (n uint32, err err
or) { |
| 1243 r0, _, e1 := Syscall(procGetModuleFileNameW.Addr(), 3, uintptr(module),
uintptr(unsafe.Pointer(fn)), uintptr(len)) |
| 1244 n = uint32(r0) |
| 1245 if n == 0 { |
| 1246 if e1 != 0 { |
| 1247 err = error(e1) |
| 1248 } else { |
| 1249 err = EINVAL |
| 1250 } |
| 1251 } |
| 1252 return |
| 1253 } |
| 1254 |
1241 func WSAStartup(verreq uint32, data *WSAData) (sockerr error) { | 1255 func WSAStartup(verreq uint32, data *WSAData) (sockerr error) { |
1242 r0, _, _ := Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(u
nsafe.Pointer(data)), 0) | 1256 r0, _, _ := Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(u
nsafe.Pointer(data)), 0) |
1243 if r0 != 0 { | 1257 if r0 != 0 { |
1244 sockerr = Errno(r0) | 1258 sockerr = Errno(r0) |
1245 } | 1259 } |
1246 return | 1260 return |
1247 } | 1261 } |
1248 | 1262 |
1249 func WSACleanup() (err error) { | 1263 func WSACleanup() (err error) { |
1250 r1, _, e1 := Syscall(procWSACleanup.Addr(), 0, 0, 0, 0) | 1264 r1, _, e1 := Syscall(procWSACleanup.Addr(), 0, 0, 0, 0) |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1702 r1, _, e1 := Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t),
uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen))) | 1716 r1, _, e1 := Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t),
uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen))) |
1703 if r1 == 0 { | 1717 if r1 == 0 { |
1704 if e1 != 0 { | 1718 if e1 != 0 { |
1705 err = error(e1) | 1719 err = error(e1) |
1706 } else { | 1720 } else { |
1707 err = EINVAL | 1721 err = EINVAL |
1708 } | 1722 } |
1709 } | 1723 } |
1710 return | 1724 return |
1711 } | 1725 } |
LEFT | RIGHT |