gengort

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const INVALID_PROC = ^uintptr(0)

Variables

This section is empty.

Functions

func CCall0

func CCall0(proc uintptr) uintptr

func CCall1

func CCall1(proc uintptr, a uintptr) uintptr

func CCall10

func CCall10(proc uintptr, a, b, c, d, e, f, g, h, i, j uintptr) uintptr

func CCall11

func CCall11(proc uintptr, a, b, c, d, e, f, g, h, i, j, k uintptr) uintptr

func CCall12

func CCall12(proc uintptr, a, b, c, d, e, f, g, h, i, j, k, l uintptr) uintptr

func CCall2

func CCall2(proc uintptr, a, b uintptr) uintptr

func CCall3

func CCall3(proc uintptr, a, b, c uintptr) uintptr

func CCall4

func CCall4(proc uintptr, a, b, c, d uintptr) uintptr

func CCall5

func CCall5(proc uintptr, a, b, c, d, e uintptr) uintptr

func CCall6

func CCall6(proc uintptr, a, b, c, d, e, f uintptr) uintptr

func CCall7

func CCall7(proc uintptr, a, b, c, d, e, f, g uintptr) uintptr

func CCall8

func CCall8(proc uintptr, a, b, c, d, e, f, g, h uintptr) uintptr

func CCall9

func CCall9(proc uintptr, a, b, c, d, e, f, g, h, i uintptr) uintptr

func MarshallSyscall

func MarshallSyscall[T any](data T) uintptr

func ReadBitcast

func ReadBitcast[T any](p unsafe.Pointer) T

func UnmarshallSyscall

func UnmarshallSyscall[T any](ptr uintptr) (res T)

func Validate

func Validate(ptrToStruct any, size, align uintptr, fields ...any)

func WriteBitcast

func WriteBitcast[T any](p unsafe.Pointer, value T)

Types

type Library

type Library struct {
	Name string
	// contains filtered or unexported fields
}

func NewLibrary

func NewLibrary(name string) *Library

func (*Library) Assign

func (l *Library) Assign(lib LoadedLibrary)

func (*Library) Get

func (l *Library) Get() (LoadedLibrary, error)

func (*Library) Import

func (l *Library) Import(name string) Proc

func (*Library) ImportNow

func (l *Library) ImportNow(name string) PreloadProc

func (*Library) LoadEmbed

func (l *Library) LoadEmbed(data []byte) (LoadedLibrary, error)

func (*Library) LoadFrom

func (l *Library) LoadFrom(path string) (LoadedLibrary, error)

type LoadedLibrary

type LoadedLibrary interface {
	Lookup(name string) uintptr
}

func FindLibrary

func FindLibrary(name string) (LoadedLibrary, error)

func LoadLibrary

func LoadLibrary(name string) (LoadedLibrary, error)

func LoadLibraryEmbed

func LoadLibraryEmbed(data []byte) (LoadedLibrary, error)

type PreloadProc

type PreloadProc uintptr

func (PreloadProc) Addr

func (p PreloadProc) Addr() uintptr

func (PreloadProc) Call0

func (lp PreloadProc) Call0() (r1 uintptr)

func (PreloadProc) Call1

func (lp PreloadProc) Call1(a uintptr) (r1 uintptr)

func (PreloadProc) Call10

func (lp PreloadProc) Call10(a, b, c, d, e, f, g, h, i, j uintptr) (r1 uintptr)

func (PreloadProc) Call11

func (lp PreloadProc) Call11(a, b, c, d, e, f, g, h, i, j, k uintptr) (r1 uintptr)

func (PreloadProc) Call12

func (lp PreloadProc) Call12(a, b, c, d, e, f, g, h, i, j, k, l uintptr) (r1 uintptr)

func (PreloadProc) Call2

func (lp PreloadProc) Call2(a, b uintptr) (r1 uintptr)

func (PreloadProc) Call3

func (lp PreloadProc) Call3(a, b, c uintptr) (r1 uintptr)

func (PreloadProc) Call4

func (lp PreloadProc) Call4(a, b, c, d uintptr) (r1 uintptr)

func (PreloadProc) Call5

func (lp PreloadProc) Call5(a, b, c, d, e uintptr) (r1 uintptr)

func (PreloadProc) Call6

func (lp PreloadProc) Call6(a, b, c, d, e, f uintptr) (r1 uintptr)

func (PreloadProc) Call7

func (lp PreloadProc) Call7(a, b, c, d, e, f, g uintptr) (r1 uintptr)

func (PreloadProc) Call8

func (lp PreloadProc) Call8(a, b, c, d, e, f, g, h uintptr) (r1 uintptr)

func (PreloadProc) Call9

func (lp PreloadProc) Call9(a, b, c, d, e, f, g, h, i uintptr) (r1 uintptr)

type Proc

type Proc struct {
	// contains filtered or unexported fields
}

func (*Proc) Addr

func (lp *Proc) Addr() uintptr

func (*Proc) Call0

func (lp *Proc) Call0() (r1 uintptr)

func (*Proc) Call1

func (lp *Proc) Call1(a uintptr) (r1 uintptr)

func (*Proc) Call10

func (lp *Proc) Call10(a, b, c, d, e, f, g, h, i, j uintptr) (r1 uintptr)

func (*Proc) Call11

func (lp *Proc) Call11(a, b, c, d, e, f, g, h, i, j, k uintptr) (r1 uintptr)

func (*Proc) Call12

func (lp *Proc) Call12(a, b, c, d, e, f, g, h, i, j, k, l uintptr) (r1 uintptr)

func (*Proc) Call2

func (lp *Proc) Call2(a, b uintptr) (r1 uintptr)

func (*Proc) Call3

func (lp *Proc) Call3(a, b, c uintptr) (r1 uintptr)

func (*Proc) Call4

func (lp *Proc) Call4(a, b, c, d uintptr) (r1 uintptr)

func (*Proc) Call5

func (lp *Proc) Call5(a, b, c, d, e uintptr) (r1 uintptr)

func (*Proc) Call6

func (lp *Proc) Call6(a, b, c, d, e, f uintptr) (r1 uintptr)

func (*Proc) Call7

func (lp *Proc) Call7(a, b, c, d, e, f, g uintptr) (r1 uintptr)

func (*Proc) Call8

func (lp *Proc) Call8(a, b, c, d, e, f, g, h uintptr) (r1 uintptr)

func (*Proc) Call9

func (lp *Proc) Call9(a, b, c, d, e, f, g, h, i uintptr) (r1 uintptr)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL