Documentation ¶
Rendered for windows/amd64
Index ¶
- Constants
- Variables
- func CreateConsoleProcessAttachedToPTY(hpc windows.Handle, commandLine, workDir string, envs []string) (*windows.ProcessInformation, error)
- func CreateEnvBlock(envv []string) ([]uint16, error)
- func EnableVirtualTerminalProcessing() error
- func SetRawMode() (inHandle, outHandle windows.Handle)
- func WinCloseHandles(handles ...windows.Handle) error
- func WinConsoleScreenSize() (size windows.Coord, err error)
- func WinIsConPtyAvailable() bool
- func WinIsDataAvailable(handle windows.Handle) (bytesAvailable int, err error)
- type ConPty
- type ConPtyOption
- type HandleWrapper
- type StartupInfoEx
Constants ¶
View Source
const ( PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE uintptr = 0x20016 STILL_ACTIVE uint32 = 259 )
Variables ¶
View Source
var (
ErrConPtyUnsupported = errors.New("ConPty is not available on this version of Windows")
)
Functions ¶
func CreateEnvBlock ¶
CreateEnvBlock converts an array of environment strings into the representation required by CreateProcess: a sequence of NUL terminated strings followed by a nil. Last bytes are two UCS-2 NULs, or four NUL bytes. If any string contains a NUL, it returns (nil, EINVAL).
func EnableVirtualTerminalProcessing ¶
func EnableVirtualTerminalProcessing() error
func SetRawMode ¶
func WinCloseHandles ¶
WinCloseHandles This will only return the first error.
func WinConsoleScreenSize ¶
func WinIsConPtyAvailable ¶
func WinIsConPtyAvailable() bool
Types ¶
type ConPty ¶
type ConPty struct {
// contains filtered or unexported fields
}
type ConPtyOption ¶
type ConPtyOption func(args *conPtyArgs)
func ConPtyDimensions ¶
func ConPtyDimensions(width, height int16) ConPtyOption
func ConPtyEnvs ¶
func ConPtyEnvs(envs ...string) ConPtyOption
func ConPtyWorkDir ¶
func ConPtyWorkDir(workDir string) ConPtyOption
type HandleWrapper ¶
type HandleWrapper struct {
// contains filtered or unexported fields
}
func (*HandleWrapper) Close ¶
func (h *HandleWrapper) Close() error
func (*HandleWrapper) GetHandle ¶
func (h *HandleWrapper) GetHandle() windows.Handle
type StartupInfoEx ¶
type StartupInfoEx struct {
// contains filtered or unexported fields
}
func GetStartupInfoExForPTY ¶
func GetStartupInfoExForPTY(hpc windows.Handle) (*StartupInfoEx, error)
Click to show internal directories.
Click to hide internal directories.