wtsapi32

package
v0.32.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

View Source
var (
	WTSSessionStates = map[WTSConnectState]string{
		// contains filtered or unexported fields
	}
)

Functions

func Load added in v0.32.0

func Load() error

Load checks that wtsapi32.dll exports every function of this package. Call it in Build: a missing export panics on the first call otherwise.

func WTSCloseServer

func WTSCloseServer(server windows.Handle)

WTSCloseServer closes a handle opened by WTSOpenServer. The function returns void, so neither r1 nor the last error say whether it failed.

func WTSFreeMemoryEx

func WTSFreeMemoryEx(class WTSTypeClass, pMemory uintptr, numberOfEntries uint32) error

func WTSOpenServer

func WTSOpenServer(server string) (windows.Handle, error)

Types

type WTSConnectState

type WTSConnectState uint32

type WTSSession

type WTSSession struct {
	ExecEnvID   uint32
	State       WTSConnectState
	SessionID   uint32
	SessionName string
	HostName    string
	UserName    string
	DomainName  string
	FarmName    string
}

func WTSEnumerateSessionsEx

func WTSEnumerateSessionsEx(server windows.Handle, logger *slog.Logger) ([]WTSSession, error)

type WTSTypeClass

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

The valid values for the WTSTypeClass enumeration.

Jump to

Keyboard shortcuts

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