Documentation
¶
Index ¶
- Constants
- func CBool(b bool) int8
- func CSlice[S ~[]E, E any](s S) unsafe.Pointer
- func CString(s string) unsafe.Pointer
- func Call[F ~uintptr](fn F, args ...any)
- func CallRaw(fn uintptr, args ...uintptr) (r1, r2 uintptr, err syscall.Errno)
- func CallRet[T any, F ~uintptr](fn F, args ...any) (ret T)
- func Dlclose(handle uintptr) error
- func Dlopen(path string, mode int) (uintptr, error)
- func Dlsym(handle uintptr, name string) (uintptr, error)
- func GetExternVariant[T any, L ~uintptr](lib L, name string) (pv *T, err error)
- func GoBool[T comparable](v T) bool
- func GoSlice[T comparable](p unsafe.Pointer) []T
- func GoSliceN[T any](p unsafe.Pointer, n int) []T
- func GoSliceNTemp[T any](p unsafe.Pointer, n int) []T
- func GoSliceTemp[T comparable](p unsafe.Pointer) []T
- func GoString(s unsafe.Pointer) string
- func GoStringN(s unsafe.Pointer, n int) string
- func GoStringNTemp(s unsafe.Pointer, n int) string
- func GoStringTemp(s unsafe.Pointer) string
- func Length[T comparable](p unsafe.Pointer) (n int)
- func Memcpy(dst, src unsafe.Pointer, size uintptr)
- func Memset(p unsafe.Pointer, val byte, size uintptr)
- func NewCallback(fn any) uintptr
- func RegisterFunc(pf any, cfn uintptr) (err error)
- func RegisterLibFunc(pf any, lib uintptr, symbol string) (err error)
- func Strlen(s unsafe.Pointer) (n int)
- type Char
- type Double
- type Float
- type Int
- type Intptr
- type LazyLibrary
- type LazySymbol
- type Library
- type Long
- type LongLong
- type Pointer
- type Short
- type Sizet
- type Ssize
- type Symbol
- type Uchar
- type Uint
- type Uintptr
- type Ulong
- type UlongLong
- type Ushort
Constants ¶
View Source
const ( RTLD_DEFAULT = purego.RTLD_DEFAULT RTLD_LAZY = purego.RTLD_LAZY RTLD_NOW = purego.RTLD_NOW RTLD_LOCAL = purego.RTLD_LOCAL RTLD_GLOBAL = purego.RTLD_GLOBAL )
Variables ¶
This section is empty.
Functions ¶
func Dlopen ¶
Dlopen examines the dynamic library or bundle file specified by path.
The mode was ignored on Windows.
func GetExternVariant ¶
func GoBool ¶
func GoBool[T comparable](v T) bool
func GoSlice ¶
func GoSlice[T comparable](p unsafe.Pointer) []T
func GoSliceTemp ¶
func GoSliceTemp[T comparable](p unsafe.Pointer) []T
func GoStringTemp ¶
func Length ¶
func Length[T comparable](p unsafe.Pointer) (n int)
Length Get the length of an array ending with zero
func NewCallback ¶
func RegisterFunc ¶
Types ¶
type LazyLibrary ¶
type LazyLibrary struct {
// contains filtered or unexported fields
}
func NewLazyLibrary ¶
func NewLazyLibrary(name string) *LazyLibrary
func (*LazyLibrary) Handle ¶ added in v0.0.3
func (l *LazyLibrary) Handle() (handle uintptr, err error)
func (*LazyLibrary) Load ¶
func (l *LazyLibrary) Load() error
func (*LazyLibrary) NewSymbol ¶
func (l *LazyLibrary) NewSymbol(name string) *LazySymbol
type LazySymbol ¶
type LazySymbol struct {
// contains filtered or unexported fields
}
func (*LazySymbol) Addr ¶
func (s *LazySymbol) Addr() (addr uintptr, err error)
func (*LazySymbol) CallRaw ¶
func (s *LazySymbol) CallRaw(args ...uintptr) (r1, r2 uintptr, err error)
func (*LazySymbol) Find ¶
func (s *LazySymbol) Find() error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.