kernel32

package
v0.0.0-...-fe889e0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: BSD-3-Clause Imports: 4 Imported by: 2

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	ERROR_SUCCESS             = 0
	ERROR_INVALID_FUNCTION    = 1
	ERROR_FILE_NOT_FOUND      = 2
	ERROR_INVALID_PARAMETER   = 87
	ERROR_INSUFFICIENT_BUFFER = 122
	ERROR_MORE_DATA           = 234
)

Error codes

View Source
const (
	GHND          = 0x0042
	GMEM_FIXED    = 0x0000
	GMEM_MOVEABLE = 0x0002
	GMEM_ZEROINIT = 0x0040
	GPTR          = GMEM_FIXED | GMEM_ZEROINIT
)

GlobalAlloc flags

View Source
const MAX_PATH = 260

Variables

View Source
var (
	PostThreadMessageW *windows.LazyProc
)

Functions

func ActivateActCtx

func ActivateActCtx(ctx handle.HANDLE) (uintptr, bool)

func CloseHandle

func CloseHandle(hObject handle.HANDLE) bool

func CreateActCtx

func CreateActCtx(ctx *ACTCTX) handle.HANDLE

func FileTimeToSystemTime

func FileTimeToSystemTime(lpFileTime *FILETIME, lpSystemTime *SYSTEMTIME) bool

func GetConsoleTitle

func GetConsoleTitle(lpConsoleTitle *uint16, nSize uint32) uint32

func GetConsoleWindow

func GetConsoleWindow() handle.HWND

func GetCurrentThreadId

func GetCurrentThreadId() uint32

func GetLastError

func GetLastError() uint32

func GetLocaleInfo

func GetLocaleInfo(Locale LCID, LCType LCTYPE, lpLCData *uint16, cchData int32) int32

func GetLogicalDriveStrings

func GetLogicalDriveStrings(nBufferLength uint32, lpBuffer *uint16) uint32

func GetModuleHandleEx

func GetModuleHandleEx(flags uint32, moduleName *uint16, module *handle.HWND) (err error)

func GetNumberFormat

func GetNumberFormat(Locale LCID, dwFlags uint32, lpValue *uint16, lpFormat *NUMBERFMT, lpNumberStr *uint16, cchNumber int32) int32

func GetPhysicallyInstalledSystemMemory

func GetPhysicallyInstalledSystemMemory(totalMemoryInKilobytes *uint64) bool

func GetProfileString

func GetProfileString(lpAppName, lpKeyName, lpDefault *uint16, lpReturnedString uintptr, nSize uint32) bool

func GetVersion

func GetVersion() uint32

func GlobalLock

func GlobalLock(hMem HGLOBAL) unsafe.Pointer

func GlobalUnlock

func GlobalUnlock(hMem HGLOBAL) bool

func LockResource

func LockResource(hResData HGLOBAL) uintptr

func MoveMemory

func MoveMemory(destination, source unsafe.Pointer, length uintptr)

func MulDiv

func MulDiv(nNumber, nNumerator, nDenominator int32) int32

func SetLastError

func SetLastError(dwErrorCode uint32)

func SizeofResource

func SizeofResource(hModule HMODULE, hResInfo HRSRC) uint32

func SystemTimeToFileTime

func SystemTimeToFileTime(lpSystemTime *SYSTEMTIME, lpFileTime *FILETIME) bool

Types

type ACTCTX

type ACTCTX struct {
	Flags                 uint32
	Source                *uint16 // UTF-16 string
	ProcessorArchitecture uint16
	LangID                uint16
	AssemblyDirectory     *uint16 // UTF-16 string
	ResourceName          *uint16 // UTF-16 string
	ApplicationName       *uint16 // UTF-16 string
	Module                HMODULE
	// contains filtered or unexported fields
}

type ATOM

type ATOM uint16

type FILETIME

type FILETIME struct {
	DwLowDateTime  uint32
	DwHighDateTime uint32
}

type HGLOBAL

type HGLOBAL handle.HANDLE

func GlobalAlloc

func GlobalAlloc(uFlags uint32, dwBytes uintptr) HGLOBAL

func GlobalFree

func GlobalFree(hMem HGLOBAL) HGLOBAL

func LoadResource

func LoadResource(hModule HMODULE, hResInfo HRSRC) HGLOBAL

type HINSTANCE

type HINSTANCE handle.HANDLE

func GetModuleHandle

func GetModuleHandle(lpModuleName *uint16) HINSTANCE

type HMODULE

type HMODULE uintptr

type HRSRC

type HRSRC uintptr

func FindResource

func FindResource(hModule HMODULE, lpName, lpType *uint16) HRSRC

type HWINEVENTHOOK

type HWINEVENTHOOK handle.HANDLE

type LANGID

type LANGID uint16

func GetThreadUILanguage

func GetThreadUILanguage() LANGID

type LCID

type LCID uint32
const (
	LOCALE_CUSTOM_DEFAULT     LCID = 0x0c00
	LOCALE_CUSTOM_UI_DEFAULT  LCID = 0x1400
	LOCALE_CUSTOM_UNSPECIFIED LCID = 0x1000
	LOCALE_INVARIANT          LCID = 0x007f
	LOCALE_USER_DEFAULT       LCID = 0x0400
	LOCALE_SYSTEM_DEFAULT     LCID = 0x0800
)

Predefined locale ids

func GetThreadLocale

func GetThreadLocale() LCID

type LCTYPE

type LCTYPE uint32
const (
	LOCALE_SDECIMAL          LCTYPE = 14
	LOCALE_STHOUSAND         LCTYPE = 15
	LOCALE_SISO3166CTRYNAME  LCTYPE = 0x5a
	LOCALE_SISO3166CTRYNAME2 LCTYPE = 0x68
	LOCALE_SISO639LANGNAME   LCTYPE = 0x59
	LOCALE_SISO639LANGNAME2  LCTYPE = 0x67
)

LCTYPE constants

type NUMBERFMT

type NUMBERFMT struct {
	NumDigits     uint32
	LeadingZero   uint32
	Grouping      uint32
	LpDecimalSep  *uint16
	LpThousandSep *uint16
	NegativeOrder uint32
}

type SYSTEMTIME

type SYSTEMTIME struct {
	WYear         uint16
	WMonth        uint16
	WDayOfWeek    uint16
	WDay          uint16
	WHour         uint16
	WMinute       uint16
	WSecond       uint16
	WMilliseconds uint16
}

Jump to

Keyboard shortcuts

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