[笔记]远程终端API,Terminal Services Administration
2007-07-08 00:41
357 查看
最近做一个远程桌面管理的软件,远程桌面接口可真难找,找了一天,终于把这几个API找出来了。
贴出来:
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.
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.
贴出来:
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.
Function | Operation |
---|---|
WTSDisconnectSession | Disconnects the client from a specified session. The session remains active and the user can log on again to connect to the same session. |
WTSEnumerateSessions | Returns a list of sessions on the specified Terminal Server. |
WTSEnumerateProcesses | Returns a list of processes on the specified Terminal Server. |
WTSLogoffSession | Logs off the specified session. |
WTSQuerySessionInformation | Returns information about the specified session on the specified Terminal Server. |
WTSSendMessage | Shows a message box on the client display of a specified session. |
WTSShutdownSystem | Shuts down and optionally restarts a specified Terminal Server. |
WTSTerminateProcess | Terminates a specified process on a specified Terminal Server. |
WTSVirtualChannelOpen | Opens a handle to the server end of a specified virtual channel. For more information about virtual channels, see Using Terminal Services Virtual Channels. |
WTSWaitSystemEvent | Waits for an event, such as the creation of a client session or a user logging on to the Terminal Server. |
相关文章推荐
- docker工作笔记1 -- 开启docker Rest api的远程调用
- Windows Server 2008 R2 配置笔记,密码设置为任意长度,远程桌面终端连接数的设置
- Terminal(终端)中代理的配置---Linux应用中遇到的问题笔记
- Linux基础学习笔记之终端(terminal)简介
- Terminal(终端) 学习笔记(1)—开发常用指令
- 【笔记】改变vim或者终端terminal的光标形状。光标变细了之后看起来爽快多了!
- Symbian学习笔记(17) - 初探WebServices API的使用(上)
- xshell远程终端操作Ubuntu server安装LAMP环境之最详细笔记之二PHP开发环境配置
- Terminal Services Administration
- 从客户端解决远程桌面超出最大终端连接数问题
- API Demos 2.3 学习笔记 (16)-- Views->Spinner
- How to make your intermittent or flaky terminal services connection a little more stable
- saltstack常用操作----salt-api 实现 通过http请求远程调用saltstack的步骤
- Windows Phone XNA api学习笔记
- Linux中记录终端(Terminal)输出到文本文件
- Linux中记录终端(Terminal)输出到文本文件
- input子系统学习笔记一 软件设计流程及相关API
- PHP and Web Services 学习笔记
- RevitAPI之在机械设备和风管终端间创建风管系统
- Linux&C语言文件学习笔记(四):文件I/O与系统API续