win32

package
v0.0.0-...-c17a26e Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2018 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TH32CS_SNAPHEAPLIST = 0x00000001
	TH32CS_SNAPPROCESS  = 0x00000002
	TH32CS_SNAPTHREAD   = 0x00000004
	TH32CS_SNAPMODULE   = 0x00000008
	TH32CS_SNAPALL      = TH32CS_SNAPHEAPLIST | TH32CS_SNAPPROCESS | TH32CS_SNAPTHREAD | TH32CS_SNAPMODULE
)
View Source
const (
	MAX_MODULE_NAME32 = 255
	MAX_PATH          = 260
)
View Source
const (
	INPUT_MOUSE    = 0
	INPUT_KEYBOARD = 1
	INPUT_HARDWARE = 2
)
View Source
const (
	ErrSuccess                = "The operation completed successfully."
	ErrPartialReadWriteMemory = "Only part of a ReadProcessMemory or WriteProcessMemory request was completed."
)

Variables

This section is empty.

Functions

func CloseHandle

func CloseHandle(object HANDLE) bool

func GetCursorPos

func GetCursorPos() (x, y int, ok bool)

func GetForegroundWindow

func GetForegroundWindow() (hwnd syscall.Handle, err error)

func GetKeyState

func GetKeyState(vKey int) (keyState uint16)

func GetLastError

func GetLastError() uint32

func Module32First

func Module32First(snapshot HANDLE, me *MODULEENTRY32) bool

func Module32Next

func Module32Next(snapshot HANDLE, me *MODULEENTRY32) bool

func Process32First

func Process32First(snapshot HANDLE, me *PROCESSENTRY32) bool

func Process32Next

func Process32Next(snapshot HANDLE, me *PROCESSENTRY32) bool

func ReadProcessMemory

func ReadProcessMemory(hProcess HANDLE, lpBaseAddress uint32, size uint) (data []byte, err error)

func SendInput

func SendInput(inputs []INPUT) (err error)

func UnhookWindowsHookEx

func UnhookWindowsHookEx(hhk HHOOK) bool

func WriteProcessMemory

func WriteProcessMemory(hProcess HANDLE, lpBaseAddress uint32, data []byte, size uint) (err error)

Types

type ATOM

type ATOM uint16

type BOOL

type BOOL int32

type COLORREF

type COLORREF uint32

type DWM_FRAME_COUNT

type DWM_FRAME_COUNT uint64

type DWORD

type DWORD uint32

type HACCEL

type HACCEL HANDLE

type HANDLE

type HANDLE uintptr

func CreateToolhelp32Snapshot

func CreateToolhelp32Snapshot(flags, processId uint32) HANDLE

func OpenProcess

func OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle HANDLE, err error)

type HARDWAREINPUT

type HARDWAREINPUT struct {
	UMsg    uint32
	WParamL uint16
	WParamH uint16
}

type HBITMAP

type HBITMAP HANDLE

type HBRUSH

type HBRUSH HANDLE

type HCURSOR

type HCURSOR HANDLE

type HDC

type HDC HANDLE

type HDROP

type HDROP HANDLE

type HDWP

type HDWP HANDLE

type HENHMETAFILE

type HENHMETAFILE HANDLE

type HFONT

type HFONT HANDLE

type HGDIOBJ

type HGDIOBJ HANDLE

type HGLOBAL

type HGLOBAL HANDLE

type HGLRC

type HGLRC HANDLE

type HHOOK

type HHOOK HANDLE

func SetWindowsHookEx

func SetWindowsHookEx(idHook int, lpfn HOOKPROC, hMod HINSTANCE, dwThreadId DWORD) HHOOK

type HICON

type HICON HANDLE

type HIMAGELIST

type HIMAGELIST HANDLE

type HINSTANCE

type HINSTANCE HANDLE

func GetModuleHandle

func GetModuleHandle(modulename string) HINSTANCE

type HKEY

type HKEY HANDLE

type HKL

type HKL HANDLE

type HMENU

type HMENU HANDLE

type HMODULE

type HMODULE HANDLE

type HMONITOR

type HMONITOR HANDLE

type HOOKPROC

type HOOKPROC func(int, WPARAM, LPARAM) LRESULT

type HPEN

type HPEN HANDLE

type HRESULT

type HRESULT int32

type HRGN

type HRGN HANDLE

type HRSRC

type HRSRC HANDLE

type HTHUMBNAIL

type HTHUMBNAIL HANDLE

type HWND

type HWND HANDLE

func FindWindowW

func FindWindowW(className, windowName *uint16) HWND

type HardwareInput

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

type INPUT

type INPUT struct {
	Type uint32
	Mi   MOUSEINPUT
	Ki   KEYBDINPUT
	Hi   HARDWAREINPUT
}

type KEYBDINPUT

type KEYBDINPUT struct {
	WVk         uint16
	WScan       uint16
	DwFlags     uint32
	Time        uint32
	DwExtraInfo uintptr
}

type KbdInput

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

type LPARAM

type LPARAM uintptr

type LRESULT

type LRESULT uintptr

type MODULEENTRY32

type MODULEENTRY32 struct {
	Size         uint32
	ModuleID     uint32
	ProcessID    uint32
	GlblcntUsage uint32
	ProccntUsage uint32
	ModBaseAddr  *uint8
	ModBaseSize  uint32
	HModule      HMODULE
	SzModule     [MAX_MODULE_NAME32 + 1]uint16
	SzExePath    [MAX_PATH]uint16
}

type MOUSEINPUT

type MOUSEINPUT struct {
	Dx          int32
	Dy          int32
	MouseData   uint32
	DwFlags     uint32
	Time        uint32
	DwExtraInfo uintptr
}

type MSG

type MSG struct {
	Hwnd    HWND
	Message uint32
	WParam  uintptr
	LParam  uintptr
	Time    uint32
	Pt      POINT
}

func PeekMessage

func PeekMessage(hwnd HWND, wMsgFilterMin, wMsgFilterMax, wRemoveMsg uint32) (msg MSG, err error)

type MouseInput

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

type POINT

type POINT struct {
	X, Y int32
}

type PROCESSENTRY32

type PROCESSENTRY32 struct {
	Size            uint32
	Usage           uint32
	ProcessID       uint32
	DeafultHeapID   uintptr
	ModuleID        uint32
	Threads         uint32
	ParentProcessID uint32
	PriClassBase    uint32
	Flags           uint32
	SzExeFile       [MAX_PATH]uint8
}

type QPC_TIME

type QPC_TIME uint64

type RECT

type RECT struct {
	Left, Top, Right, Bottom int32
}

func GetClientRect

func GetClientRect(hwnd HWND) *RECT

func GetWindowRect

func GetWindowRect(hwnd HWND) *RECT

type SIZE_T

type SIZE_T uintptr

type TRACEHANDLE

type TRACEHANDLE uintptr

type ULONG_PTR

type ULONG_PTR uintptr

type WPARAM

type WPARAM uintptr

Jump to

Keyboard shortcuts

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