Documentation
¶
Index ¶
- Constants
- func EnumerateSessions(server windows.Handle) (map[uint32]Session, error)
- func SessionId() (uint32, error)
- func SessionName(server windows.Handle, sessionId uint32) (string, error)
- func SessionUsername(server windows.Handle, sessionId uint32) (username string, domain string, err error)
- type Session
- type WTS_CONNECTSTATE_CLASS
- type WTS_INFO_CLASS
- type WTS_SESSION_INFO_1W
- type WTS_TYPE_CLASS
Constants ¶
View Source
const ( NOTIFY_FOR_ALL_SESSIONS uint32 = 1 NOTIFY_FOR_THIS_SESSION uint32 = 0 )
View Source
const ( WTS_CONSOLE_CONNECT = 0x1 WTS_CONSOLE_DISCONNECT = 0x2 WTS_REMOTE_CONNECT = 0x3 WTS_REMOTE_DISCONNECT = 0x4 WTS_SESSION_LOGON = 0x5 WTS_SESSION_LOGOFF = 0x6 WTS_SESSION_LOCK = 0x7 WTS_SESSION_UNLOCK = 0x8 WTS_SESSION_REMOTE_CONTROL = 0x9 WTS_SESSION_CREATE = 0xa WTS_SESSION_TERMINATE = 0xb )
View Source
const WM_WTSSESSION_CHANGE uint32 = 0x02b1
View Source
const WTS_CURRENT_SERVER windows.Handle = windows.Handle(0)
View Source
const WTS_CURRENT_SERVER_HANDLE windows.Handle = 0
View Source
const WTS_CURRENT_SESSION uint32 = 0xffffffff
Variables ¶
This section is empty.
Functions ¶
func SessionName ¶
SessionName returns session name for specified session.
Types ¶
type WTS_CONNECTSTATE_CLASS ¶
type WTS_CONNECTSTATE_CLASS int32
const ( WTSActive WTS_CONNECTSTATE_CLASS = iota // User logged on to WinStation WTSConnected // WinStation connected to client WTSConnectQuery // In the process of connecting to client WTSShadow // Shadowing another WinStation WTSDisconnected // WinStation logged on without client WTSIdle // Waiting for client to connect WTSListen // WinStation is listening for connection WTSReset // WinStation is being reset WTSDown // WinStation is down due to error WTSInit // WinStation in initialization )
type WTS_INFO_CLASS ¶
type WTS_INFO_CLASS uint32
const ( WTSInitialProgram WTS_INFO_CLASS = iota WTSApplicationName WTSWorkingDirectory WTSOEMId WTSSessionId WTSUserName WTSWinStationName // Despite its name, specifying this type does not return the window station name. Rather, it returns the name of the Remote Desktop Services session. WTSDomainName WTSConnectState WTSClientBuildNumber WTSClientName WTSClientDirectory WTSClientProductId WTSClientHardwareId WTSClientAddress WTSClientDisplay WTSClientProtocolType WTSIdleTime WTSLogonTime WTSIncomingBytes WTSOutgoingBytes WTSIncomingFrames WTSOutgoingFrames WTSClientInfo WTSSessionInfo WTSSessionInfoEx WTSConfigInfo WTSValidationInfo // Info Class value used to fetch Validation Information through the WTSQuerySessionInformation WTSSessionAddressV4 WTSIsRemoteSession )
type WTS_SESSION_INFO_1W ¶
type WTS_SESSION_INFO_1W struct {
ExecEnvId uint32
State WTS_CONNECTSTATE_CLASS
SessionId uint32
// contains filtered or unexported fields
}
type WTS_TYPE_CLASS ¶
type WTS_TYPE_CLASS int32
const ( WTSTypeProcessInfoLevel0 WTS_TYPE_CLASS = iota WTSTypeProcessInfoLevel1 WTSTypeSessionInfoLevel1 )
Click to show internal directories.
Click to hide internal directories.