]> Cypherpunks repositories - gostls13.git/commit
syscall: dll function load and calling changes
authorAlex Brainman <alex.brainman@gmail.com>
Sat, 15 Oct 2011 06:29:25 +0000 (17:29 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Sat, 15 Oct 2011 06:29:25 +0000 (17:29 +1100)
commit78479163cbaef707fbb7676333fdca8b0109e83b
treead8b33a1d193295975e35f4693d6e3878686887d
parentb770c9e9a2d2b19af317924f015467626be7b5a4
syscall: dll function load and calling changes

New DLL and Proc types to manage and call dll functions. These were
used to simplify syscall tests in runtime package. They were also
used to implement LazyDLL and LazyProc.

LazyProc, like Proc, now have Call function, that just a wrapper for
SyscallN. It is not as efficient as Syscall, but easier to use.

NewLazyDLL now supports non-ascii filenames.

LazyDLL and LazyProc now have Load and Find methods. These can be used
during runtime to discover if some dll functions are not present.

All dll functions now return errors that fit os.Error interface. They
also contain Windows error number.

Some of these changes are suggested by jp.

R=golang-dev, jp, rsc
CC=golang-dev
https://golang.org/cl/5272042
src/pkg/runtime/syscall_windows_test.go
src/pkg/runtime/windows/os.h
src/pkg/runtime/windows/syscall.goc
src/pkg/runtime/windows/thread.c
src/pkg/syscall/Makefile
src/pkg/syscall/dll_windows.go [new file with mode: 0644]
src/pkg/syscall/syscall_windows.go