您的位置:首页 > 其它

[笔记]远程终端API,Terminal Services Administration

2007-07-08 00:41 357 查看
最近做一个远程桌面管理的软件,远程桌面接口可真难找,找了一天,终于把这几个API找出来了。
贴出来:

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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: