kernel32

package
v0.0.0-...-078ca72 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	INVALID_HANDLE_VALUE uintptr = ^uintptr(0)

	ABOVE_NORMAL_PRIORITY_CLASS uint32 = 0x00008000
	BELOW_NORMAL_PRIORITY_CLASS uint32 = 0x00004000
	HIGH_PRIORITY_CLASS         uint32 = 0x00000080
	IDLE_PRIORITY_CLASS         uint32 = 0x00000040
	NORMAL_PRIORITY_CLASS       uint32 = 0x00000020
	REALTIME_PRIORITY_CLASS     uint32 = 0x00000100

	STD_INPUT_HANDLE  uint32 = ^uint32(10 - 1)
	STD_OUTPUT_HANDLE uint32 = ^uint32(11 - 1)
	STD_ERROR_HANDLE  uint32 = ^uint32(12 - 1)

	ENABLE_PROCESSED_INPUT uint32 = 0x0001

	KEY_EVENT          uint16 = 0x0001
	LEFT_CTRL_PRESSED  uint32 = 0x0008
	LEFT_ALT_PRESSED   uint32 = 0x0002
	RIGHT_CTRL_PRESSED uint32 = 0x0004
	RIGHT_ALT_PRESSED  uint32 = 0x0001
	SHIFT_PRESSED      uint32 = 0x0010
)

Variables

This section is empty.

Functions

func GetConsoleMode

func GetConsoleMode(hConsoleHandle uintptr) (bResult bool, lpMode uint32, err error)

func GetCurrentProcess

func GetCurrentProcess() (hProcess uintptr)

func GetStdHandle

func GetStdHandle(nStdHandle uint32) (hStdHandle uintptr)

func ReadConsoleInput

func ReadConsoleInput(hConsoleInput uintptr, lpBuffer []INPUT_RECORD_KEY_EVENT, nLength uint32) (bResult bool, lpNumberOfEventsRead uint32, err error)

func SetConsoleMode

func SetConsoleMode(hConsoleHandle uintptr, dwMode uint32) (bResult bool, err error)

func SetPriorityClass

func SetPriorityClass(hProcess uintptr, dwPriorityClass uint32) (err error)

Types

type INPUT_RECORD_KEY_EVENT

type INPUT_RECORD_KEY_EVENT struct {
	EventType uint16
	KeyEvent  KEY_EVENT_RECORD
}

type KEY_EVENT_RECORD

type KEY_EVENT_RECORD struct {
	BKeyDown          uint32
	WRepeatCount      uint16
	WVirtualKeyCode   uint16
	WVirtualScanCode  uint16
	UnicodeChar       uint16
	DwControlKeyState uint32
}

Jump to

Keyboard shortcuts

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