Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DLL ¶
A DLL implements access to a single DLL.
func (*DLL) FindProc ¶
FindProc searches DLL d for procedure named name and returns *Proc if found. It returns an error if search fails.
func (*DLL) MustFindProc ¶
MustFindProc is like FindProc but panics if search fails.
type LazyDLL ¶
type LazyDLL struct { Name string // contains filtered or unexported fields }
A LazyDLL implements access to a single DLL. It will delay the load of the DLL until the first call to its Handle method or to one of its LazyProc's Addr method.
LazyDLL is subject to the same DLL preloading attacks as documented on LoadDLL.
Use LazyDLL in golang.org/x/sys/windows for a secure way to load system DLLs.
func NewLazyDLL ¶
NewLazyDLL creates new LazyDLL associated with DLL file.
type LazyProc ¶
type LazyProc struct { Name string // contains filtered or unexported fields }
A LazyProc implements access to a procedure inside a LazyDLL. It delays the lookup until the Addr, Call, or Find method is called.
func (*LazyProc) Addr ¶
Addr returns the address of the procedure represented by p. The return value can be passed to Syscall to run the procedure.
type Proc ¶
A Proc implements access to a procedure inside a DLL.
func (*Proc) Addr ¶
Addr returns the address of the procedure represented by p. The return value can be passed to Syscall to run the procedure.
func (*Proc) Call ¶
Call executes procedure p with arguments a. It will panic, if more then 15 arguments are supplied.
The returned error is always non-nil, constructed from the result of GetLastError. Callers must inspect the primary return value to decide whether an error occurred (according to the semantics of the specific function being called) before consulting the error. The error will be guaranteed to contain syscall.Errno.