Terminal Services Administration

Terminal Services Administration

The Terminal Services API enables you to enumerate and manage Terminal Servers, client sessions, and processes.

To retrieve the names of all the Terminal Servers in a domain, call the NetServerEnum function to enumerate servers of the SV_TYPE_TERMINALSERVER type. To open a handle to a specific Terminal Server, pass the server name in a call to the WTSOpenServer function. Call the WTSCloseServer function to close the handle when you are finished with it.

You can use the handle returned by WTSOpenServer to perform the following operations on the server.

FunctionOperation
WTSDisconnectSessionDisconnects the client from a specified session. The session remains active and the user can log on again to connect to the same session.
WTSEnumerateSessionsReturns a list of sessions on the specified Terminal Server.
WTSEnumerateProcessesReturns a list of processes on the specified Terminal Server.
WTSLogoffSessionLogs off the specified session.
WTSQuerySessionInformationReturns information about the specified session on the specified Terminal Server.
WTSSendMessageShows a message box on the client display of a specified session.
WTSShutdownSystemShuts down and optionally restarts a specified Terminal Server.
WTSTerminateProcessTerminates a specified process on a specified Terminal Server.
WTSVirtualChannelOpenOpens a handle to the server end of a specified virtual channel. For more information about virtual channels, see Using Terminal Services Virtual Channels.
WTSWaitSystemEventWaits for an event, such as the creation of a client session or a user logging on to the Terminal Server.

Several of these functions allocate buffers to return information to the caller. Call the WTSFreeMemory function to free the buffer when you are finished with it.

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值