1
0
mirror of https://github.com/golang/go synced 2024-10-04 20:21:22 -06:00
go/src/pkg/syscall/zsyscall_mingw_386.go

54 lines
1.3 KiB
Go
Raw Normal View History

// mksyscall.sh -l32 syscall_mingw.go
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
package syscall
import "unsafe"
func GetLastError() (lasterrno int) {
r0, _, _ := Syscall(SYS_GET_LAST_ERROR, 0, 0, 0)
lasterrno = int(r0)
return
}
func LoadLibraryA(libname string) (handle Module, errno int) {
r0, _, e1 := Syscall(SYS_LOAD_LIBRARY_A, uintptr(unsafe.Pointer(StringBytePtr(libname))), 0, 0)
handle = Module(r0)
errno = int(e1)
return
}
func FreeLibrary(handle Module) (ok Bool, errno int) {
r0, _, e1 := Syscall(SYS_FREE_LIBRARY, uintptr(handle), 0, 0)
ok = Bool(r0)
errno = int(e1)
return
}
func GetProcAddress(module Module, procname string) (proc uint32, errno int) {
r0, _, e1 := Syscall(SYS_GET_PROC_ADDRESS, uintptr(module), uintptr(unsafe.Pointer(StringBytePtr(procname))), 0)
proc = uint32(r0)
errno = int(e1)
return
}
func GetVersion() (ver uint32, errno int) {
r0, _, e1 := Syscall(SYS_GET_VERSION, 0, 0, 0)
ver = uint32(r0)
errno = int(e1)
return
}
func Close(fd int) (errno int) {
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
errno = int(e1)
return
}
func read(fd int, buf *byte, nbuf int) (n int, errno int) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
errno = int(e1)
return
}