winapi

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: GPL-3.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FLOODFILLBORDER uint32 = iota
	FLOODFILLSURFACE
)
View Source
const (
	LWA_COLORKEY uint32 = 1 + iota
	LWA_ALPHA
)
View Source
const (
	MAPVK_VK_TO_VSC uint32 = iota
	MAPVK_VSC_TO_VK
	MAPVK_VK_TO_CHAR
	MAPVK_VSC_TO_VK_EX
	MAPVK_VK_TO_VSC_EX
)
View Source
const NULL uintptr = 0
View Source
const (
	WTS_CURRENT_SESSION = 0xffffffff
)

Variables

This section is empty.

Functions

func ActivateAudioInterfaceAsync

func ActivateAudioInterfaceAsync(deviceInterfacePath *uint16, riid REFIID, activationParams wca.PROPVARIANT, completionHandler IActivateAudioInterfaceCompletionHandlerInterface, activationOperation IActivateAudioInterfaceAsyncOperation) win.HRESULT

func ClipCursor

func ClipCursor(rect *win.RECT) (ok int, err error)

func CreateDIBSection

func CreateDIBSection(hdc win.HDC, pbmi *win.BITMAPINFO, usage uint, ppvBits uintptr, hSection win.HANDLE, offset uint32) win.HBITMAP

func CreatePen

func CreatePen(iStyle int, cWidth int, color uint32) win.HPEN

func CreateRectRgnIndirect

func CreateRectRgnIndirect(rect win.RECT) win.HRGN

func CreateSolidBrush

func CreateSolidBrush(color uint32) win.HGDIOBJ

func EnumChildWindows

func EnumChildWindows(hwnd win.HWND) []win.HWND

func EnumDesktopWindows

func EnumDesktopWindows(hDesktop win.HANDLE, lpEnumFunc uintptr, lParam uintptr) error

func ExtFloodFill

func ExtFloodFill(hdc win.HDC, x int, y int, color uint32, opType uint32) error

func FillRect

func FillRect(hdc win.HDC, rect win.RECT, hbr win.HBRUSH) error

func FindChildWindowsFromWindowText

func FindChildWindowsFromWindowText(parentHWND win.HWND, lpszClass *uint16, lpszWindow *uint16, windowText string) win.HWND

func FindWindow

func FindWindow(lpClassName, lpWindowName *uint16) win.HWND

func FindWindowEx

func FindWindowEx(hwndParent win.HWND, hwndChildAfter win.HWND, lpszClass *uint16, lpszWindow *uint16) (hwnd win.HWND)

func GetClassName

func GetClassName(hwnd win.HWND, lpClassName uintptr, nMax int) (length int)

func GetCursorPos

func GetCursorPos(lpPoint *win.POINT) bool

func GetWindowRect

func GetWindowRect(hwnd win.HWND, rect *win.RECT) bool

func GetWindowText

func GetWindowText(hwnd win.HWND, lpString []uint16, nMax int) (length int)

func GetWindowTextString

func GetWindowTextString(hwnd win.HWND) string

func InvalidateRect

func InvalidateRect(hwnd win.HWND, rect win.RECT, bErase bool) error

func MapVirtualKey

func MapVirtualKey(uCode uint32, uMapType uint32) (code uint32)

func MustUTF16FromString

func MustUTF16FromString(str string) []uint16

func MustUTF16PtrFromString

func MustUTF16PtrFromString(str string) *uint16

func PolyDraw

func PolyDraw(hdc win.HDC, apt win.POINT, aj byte, cpt int) error

func RegisterClassEx

func RegisterClassEx(windowClass *win.WNDCLASSEX) (win.ATOM, error)

func SendMessage

func SendMessage(hwnd win.HWND, msg uint32, wParam uintptr, lParam uintptr) uintptr

func SetForegroundWindow

func SetForegroundWindow(hWnd win.HWND) bool

func SetLayeredWindowAttributes

func SetLayeredWindowAttributes(hwnd win.HWND, color uint32, bAlpha byte, dwFlags uint32) error

func SetWindowRgn

func SetWindowRgn(hwnd win.HWND, hRgn win.HRGN, bRedraw bool) error

func SetWindowText

func SetWindowText(hwnd win.HWND, lpString *uint16) error

func ShowCursor

func ShowCursor(state bool) (counter int)

func ShowWindow

func ShowWindow(hWnd win.HWND, nCmdShow int32) bool

func UTF16PtrToString

func UTF16PtrToString(p *uint16) string

func UTF8PtrToString

func UTF8PtrToString(p *byte) string

func UpdateLayeredWindow

func UpdateLayeredWindow(hwnd win.HWND, hdcDst win.HDC, pptDst win.POINT, psize uintptr, hdcSrc win.HDC, pptSrc win.POINT, crKey uint32, pblend win.BLENDFUNCTION, dwFlags uint32) (ok bool)

func UpdateWindow

func UpdateWindow(hwnd win.HWND) bool

func WTSCloseServer

func WTSCloseServer(hServer win.HANDLE)

func WTSFreeMemoryExW

func WTSFreeMemoryExW(typeClass WTS_TYPE_CLASS, pMemory uintptr, NumEntries int) (err error)

func WTSOpenServerExW

func WTSOpenServerExW(pServerName string) win.HANDLE

func WTSVirtualChannelClose

func WTSVirtualChannelClose(hChannelHandle win.HANDLE) (err error)

func WTSVirtualChannelOpenEx

func WTSVirtualChannelOpenEx(SessionId uint32, pVirtualName string, flags WTS_CHANNEL_OPTION_DYNAMIC) (handle win.HANDLE, err error)

func WTSVirtualChannelRead

func WTSVirtualChannelRead(hChannelHandle win.HANDLE, TimeOut uint32, Buffer []byte, BufferSize int, pBytesRead *uint32) (err error)

func WTSVirtualChannelWrite

func WTSVirtualChannelWrite(hChannelHandle win.HANDLE, Buffer []byte, Length int, pBytesWritten *uint32) (err error)

Types

type IActivateAudioInterfaceAsyncOperation

type IActivateAudioInterfaceAsyncOperation interface {
	ole.UnknownLike
	GetActivateResult(activateResult win.HRESULT, activateInterface ole.IUnknown)
}

type IActivateAudioInterfaceCompletionHandlerInterface

type IActivateAudioInterfaceCompletionHandlerInterface interface {
	ole.UnknownLike
	ActivateCompleted(activateOperation IActivateAudioInterfaceAsyncOperation)
}

type IID

type IID ole.GUID

type MemoryFreeFunc

type MemoryFreeFunc func() error

type REFIID

type REFIID IID

type WTSVirtualChannelReadCloser

type WTSVirtualChannelReadCloser struct {
	ChannelHandle win.HANDLE

	// 0xFFFFFFFF will be infinite
	Timeout uint32
}

func OpenWTSVirtualChannel

func OpenWTSVirtualChannel(sessionid uint32, VirtualChannelName string, flags WTS_CHANNEL_OPTION_DYNAMIC) (*WTSVirtualChannelReadCloser, error)

func (WTSVirtualChannelReadCloser) Close

func (WTSVirtualChannelReadCloser) Read

func (rw WTSVirtualChannelReadCloser) Read(b []byte) (n int, err error)

buffer should have more than 1600 byte lengths.

func (WTSVirtualChannelReadCloser) Write

func (rw WTSVirtualChannelReadCloser) Write(b []byte) (n int, err error)

type WTS_CHANNEL_OPTION_DYNAMIC

type WTS_CHANNEL_OPTION_DYNAMIC uint32
const (
	WTS_CHANNEL_OPTION_DYNAMIC_PRI_LOW     WTS_CHANNEL_OPTION_DYNAMIC = 0
	WTS_CHANNEL_OPTION_DYNAMIC_DYNAMIC     WTS_CHANNEL_OPTION_DYNAMIC = 1
	WTS_CHANNEL_OPTION_DYNAMIC_PRI_MED     WTS_CHANNEL_OPTION_DYNAMIC = 2
	WTS_CHANNEL_OPTION_DYNAMIC_PRI_HIGH    WTS_CHANNEL_OPTION_DYNAMIC = 4
	WTS_CHANNEL_OPTION_DYNAMIC_PRI_REAL    WTS_CHANNEL_OPTION_DYNAMIC = 6
	WTS_CHANNEL_OPTION_DYNAMIC_NO_COMPRESS WTS_CHANNEL_OPTION_DYNAMIC = 8
)

type WTS_CONNECTSTATE_CLASS

type WTS_CONNECTSTATE_CLASS int32
const (
	WTSCONNECTSTATEActive WTS_CONNECTSTATE_CLASS = iota
	WTSCONNECTSTATEConnected
	WTSCONNECTSTATEConnectQuery
	WTSCONNECTSTATEShadow
	WTSCONNECTSTATEDisconnected
	WTSCONNECTSTATEIdle
	WTSCONNECTSTATEListen
	WTSCONNECTSTATEReset
	WTSCONNECTSTATEDown
	WTSCONNECTSTATEInit
)

type WTS_SESSION_INFO_1

type WTS_SESSION_INFO_1 struct {
	ExecEnvID   uint32
	State       WTS_CONNECTSTATE_CLASS
	SessionID   uint32
	SessionName string
	HostName    string
	UserName    string
	DomainName  string
	FarmName    string
}

func WTSEnumerateSessionsEx

func WTSEnumerateSessionsEx(hServer win.HANDLE, pLevel *uint32, Filter uint32) (ppSessionInfo []WTS_SESSION_INFO_1, err error)

WTSEnumerateSessionsEx gets sesion list

type WTS_TYPE_CLASS

type WTS_TYPE_CLASS int
const (
	WTSTypeProcessInfoLevel0 WTS_TYPE_CLASS = iota
	WTSTypeProcessInfoLevel1
	WTSTypeSessionInfoLevel1
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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